search for: f_getlk

Displaying 20 results from an estimated 24 matches for "f_getlk".

Did you mean: f_getfd
2007 Jun 15
2
secrets.tdb locking fun!
Hi all, After much grief today, we'd like to support the 'TODO' note in source/lib/util_tdb.c :- /* TODO: If we time out waiting for a lock, it might * be nice to use F_GETLK to get the pid of the * process currently holding the lock and print that * as part of the debugging message. -- mbp */ It could have saved us a whole-sale restart of Samba if we could have more easily identified the process that was causing us to get loads and loads of:- [2007/06/15 13:02:20,...
2018 Mar 05
2
SQLite3 on 3 node cluster FS?
Hi, tl;dr summary of below: flock() works, but what does it take to make sync()/fsync() work in a 3 node GFS cluster? I am under the impression that POSIX flock, POSIX fcntl(F_SETLK/F_GETLK,...), and POSIX read/write/sync/fsync are all supported in cluster operations, such that in theory, SQLite3 should be able to atomically lock the file (or a subset of page), modify pages, flush the pages to gluster, then release the lock, and thus satisfy the ACID property that SQLite3 appears to t...
2014 Aug 20
6
Full MVCC in Brass
...new "brasslock" that extends this to use byte R+1 to represent a lock on revision R. 1) In the writer: Lock byte 0 like usual. Then let RSAFE be the current database revision minus 1 (omitting the latest revision ensures it's available to readers that start during this writer.) Use F_GETLK to test for conflicting shared locks on revision range [0, RSAFE]. If F_GETLK returns a conflicting lock, set RSAFE to one less than the lower bound of the conflicting revision range and retry. (Multiple retries may be necessary because it is unspecified which of multiple conflicting locks F_GETLK...
2012 Jul 19
1
Mutex lock contention against Active directory domain controllers causing authentication failures
...sses) open most of the time it is very difficult to find out any other errors talking to the domain controller. In the samba source code there is an ironic comment in the mutex locking code: >From source3/lib/util_tdb.c: /* TODO: If we time out waiting for a lock, it might * be nice to use F_GETLK to get the pid of the * process currently holding the lock and print that * as part of the debugging message. -- mbp */ Right now we've worked around the problem by forcing samba to use a particular domain controller (password server = uos-ads00003-). My questions are: 1. Can somebo...
2018 Mar 05
0
SQLite3 on 3 node cluster FS?
On Mon, Mar 5, 2018 at 8:21 PM, Paul Anderson <pha at umich.edu> wrote: > Hi, > > tl;dr summary of below: flock() works, but what does it take to make > sync()/fsync() work in a 3 node GFS cluster? > > I am under the impression that POSIX flock, POSIX > fcntl(F_SETLK/F_GETLK,...), and POSIX read/write/sync/fsync are all > supported in cluster operations, such that in theory, SQLite3 should > be able to atomically lock the file (or a subset of page), modify > pages, flush the pages to gluster, then release the lock, and thus > satisfy the ACID property that...
2018 Mar 05
6
SQLite3 on 3 node cluster FS?
...Paul Anderson <pha at umich.edu> wrote: >> >> Hi, >> >> tl;dr summary of below: flock() works, but what does it take to make >> sync()/fsync() work in a 3 node GFS cluster? >> >> I am under the impression that POSIX flock, POSIX >> fcntl(F_SETLK/F_GETLK,...), and POSIX read/write/sync/fsync are all >> supported in cluster operations, such that in theory, SQLite3 should >> be able to atomically lock the file (or a subset of page), modify >> pages, flush the pages to gluster, then release the lock, and thus >> satisfy the ACI...
2018 Mar 06
0
SQLite3 on 3 node cluster FS?
...rote: > >> > >> Hi, > >> > >> tl;dr summary of below: flock() works, but what does it take to make > >> sync()/fsync() work in a 3 node GFS cluster? > >> > >> I am under the impression that POSIX flock, POSIX > >> fcntl(F_SETLK/F_GETLK,...), and POSIX read/write/sync/fsync are all > >> supported in cluster operations, such that in theory, SQLite3 should > >> be able to atomically lock the file (or a subset of page), modify > >> pages, flush the pages to gluster, then release the lock, and thus > >...
2019 Jan 21
0
[klibc:master] fcntl: Fix struct flock for 32-bit architectures
...ck + * to have 64-bit offsets, so we define it here. + */ - This happens to work on all 32-bit architectures except MIPS. */ +struct flock { + short l_type; + short l_whence; + __kernel_loff_t l_start; + __kernel_loff_t l_len; + __kernel_pid_t l_pid; + __ARCH_FLOCK64_PAD +}; #ifdef F_GETLK64 # undef F_GETLK
2001 Dec 15
0
smbsh error
...lockit(void) in smbwrapper/shared.c. The error originates in file lib/util.c in function: fcntl_lock(shared_fd,SMB_F_SETLKW,0,1,F_WRLCK) fcntl_lock calls: fcntl(8191, F_SETLKW) which sets errno = 22 (EINVAL). The only thing I could find about this error number on this command is: "cmd is F_GETLK, F_SETLK, or F_SETLKW, and arg.lockdes or the data it points to is not valid,or fildes refers to a file that does not support locking." Does anyone know how I can fix this (or some more hints on how to debug it)? Thanks, Christian _________________________________________________________...
2002 Oct 28
1
solaris 7 and cvs samba 3.x build - No locking available. Running Samba would be unsafe solaris
...#39; isn't known fcntl_lock.c:55: `O_RDONLY' undeclared (first use in this function) fcntl_lock.c:55: (Each undeclared identifier is reported only once fcntl_lock.c:55: for each function it appears in.) fcntl_lock.c:63: `F_WRLCK' undeclared (first use in this function) fcntl_lock.c:72: `F_GETLK' undeclared (first use in this function) fcntl_lock.c:75: `F_UNLCK' undeclared (first use in this function) fcntl_lock.c:84: `O_RDWR' undeclared (first use in this function) fcntl_lock.c:84: `O_CREAT' undeclared (first use in this function) fcntl_lock.c:84: `O_EXCL' undeclared (...
2004 Oct 22
1
File locking with smbd
...o it later. The problem that I discovered is that I was unable to programmatically detect whether a file was currently in use by smbd (using typical system calls). Searching through smb.conf's man page, I tried a few different options with no luck. I would like to use something like fcntl(F_GETLK...) to determine if there are any locks on the file, but I haven't been able to detect any. strace shows that smbd does lock files, but as far as I can tell, only the log files. Does smbd have the capability to lock files that it has in use? Is it possible that if it were to lock files,...
2007 Jan 22
0
checking a locked file
...%s <file>\n", argv[0]); return 1; } f = open(argv[1], O_RDONLY); the_lock.l_type = F_WRLCK; the_lock.l_whence = SEEK_SET; the_lock.l_start = 0; the_lock.l_len = 0; if(f <= 0) { fprintf(stderr, "Cannot open file: %s\n", argv[1]); return 1; } fcntl(f, F_GETLK, &the_lock); retlck = flock(f, LOCK_EX | LOCK_NB); smblck = fcntl(f, F_GETLEASE, 0); fprintf(stdout, "smblck: %x\n", smblck); close(f); if((the_lock.l_type == F_UNLCK) && (retlck == 0)) { fprintf(stdout, "File is not locked\n"); } else { fprintf(stdout, "Fi...
2002 Feb 26
0
Samba lock X Unix fcntl() lock
...lock.l_type=F_WRLCK; /*** Write lock ***/ lock.l_whence=SEEK_SET; /*** File begin ***/ lock.l_start=0; /*** Off set, 0 ***/ lock.l_len=0; /*** Up to the end of file ***/ lock.l_pid = pid; /*** this procces pid ***/ ret=fcntl(fd, F_GETLK, & lock); /** see if the file can be locked **/ if(ret==-1) { /** error, close fd and exit **/ if(lock.l_type != F_UNLCK) { /** File locked by some other proccess, show info **/ else { /** file unlocked, we can lock it **/ See t...
2002 Oct 29
1
strange locks
...ck lck; lck.l_whence = 0; lck.l_start = 0L; lck.l_len = 0L; if (-1 == (fd = open(argv[1], O_RDONLY))) { perror(argv[1]); exit(1); } do { lck.l_type = F_WRLCK; if(-1 == fcntl(fd, F_GETLK, &lck)) { perror("fcntl getlk"); exit(1); }; if (lck.l_type != F_UNLCK) { printf("%d %d %c %8ld %8ld\n", lck.l_sysid, lck.l_pid,...
2018 Mar 06
2
SQLite3 on 3 node cluster FS?
...>> Hi, >> >> >> >> tl;dr summary of below: flock() works, but what does it take to make >> >> sync()/fsync() work in a 3 node GFS cluster? >> >> >> >> I am under the impression that POSIX flock, POSIX >> >> fcntl(F_SETLK/F_GETLK,...), and POSIX read/write/sync/fsync are all >> >> supported in cluster operations, such that in theory, SQLite3 should >> >> be able to atomically lock the file (or a subset of page), modify >> >> pages, flush the pages to gluster, then release the lock, and th...
2010 Jan 06
3
Query live connections?
Hi All, I was hoping someone would know the answer to this question I had... I know the rsync daemon has the "Max connections" module, which works great. However, I was wondering if there was a good way for me to: 1: Query rsync to get the number of live connections it thinks it has? 2: Or better yet, how does rsync itself check for the number of connections? I'm trying to
2018 Mar 06
0
SQLite3 on 3 node cluster FS?
...t;> > >> >> tl;dr summary of below: flock() works, but what does it take to make > >> >> sync()/fsync() work in a 3 node GFS cluster? > >> >> > >> >> I am under the impression that POSIX flock, POSIX > >> >> fcntl(F_SETLK/F_GETLK,...), and POSIX read/write/sync/fsync are all > >> >> supported in cluster operations, such that in theory, SQLite3 should > >> >> be able to atomically lock the file (or a subset of page), modify > >> >> pages, flush the pages to gluster, then release t...
2018 Mar 06
1
SQLite3 on 3 node cluster FS?
...> >> tl;dr summary of below: flock() works, but what does it take to make >> >> >> sync()/fsync() work in a 3 node GFS cluster? >> >> >> >> >> >> I am under the impression that POSIX flock, POSIX >> >> >> fcntl(F_SETLK/F_GETLK,...), and POSIX read/write/sync/fsync are all >> >> >> supported in cluster operations, such that in theory, SQLite3 should >> >> >> be able to atomically lock the file (or a subset of page), modify >> >> >> pages, flush the pages to gluster, th...
2004 Jul 06
3
posix
mainly question for the intel folks, any chance to rerun the ltp testsuites to see how we are doing these days with all the changes ? thanks :) Wim
2006 Jun 26
2
[klibc 28/43] mips support for klibc
...efine FASYNC 0x1000 +#define O_LARGEFILE 0x2000 +#define O_DIRECT 0x8000 +#define O_DIRECTORY 0x10000 +#define O_NOFOLLOW 0x20000 +#define O_NOATIME 0x40000 + +#define O_NDELAY O_NONBLOCK + +#define F_DUPFD 0 +#define F_GETFD 1 +#define F_SETFD 2 +#define F_GETFL 3 +#define F_SETFL 4 +#define F_GETLK 14 +#define F_SETLK 6 +#define F_SETLKW 7 + +#define F_SETOWN 24 +#define F_GETOWN 23 +#define F_SETSIG 10 +#define F_GETSIG 11 + +#define F_GETLK64 33 +#define F_SETLK64 34 +#define F_SETLKW64 35 + +#define FD_CLOEXEC 1 + +#define F_RDLCK 0 +#define F_WRLCK 1 +#define F_UNLCK 2 + +#define F_E...