search for: f_ofd_setlk

Displaying 10 results from an estimated 10 matches for "f_ofd_setlk".

2014 Aug 20
6
Full MVCC in Brass
...current revision. This may fail if a new revision is committed after reading the version file; if it does, re-read the version file and try again. This has the annoying side-effect of requiring readers to start a lock-holder subprocess like writers currently do. I propose also adding support for F_OFD_SETLK, which won't require a lock-holder subprocess for either readers or writers. F_OFD_SETLK was added in Linux 3.12 (which will be in the next Debian stable) and will hopefully appear in the next version of POSIX.1, so with any luck it will become widely available in the future. If F_OFD_SETLK i...
2016 Aug 06
2
debian (1.2.22-3~bpo8+1) package build failure
I'm trying to test a trivial patch to set FD_CLOEXEC on the flintlock lockfd when using F_OFD_SETLK and am running into a build failure even in an unpatched state. This is on a Debian jessie amd64 system building the jessie-backports version. The stable version (1.2.19-1+deb8u1) works and builds fine using the same commands, however I also encountered a similar build problem in a sid chroot wit...
2016 Aug 07
2
debian (1.2.22-3~bpo8+1) package build failure
On Sat, Aug 06, 2016 at 03:43:48AM +0000, Eric Wong wrote: > Eric Wong <e at 80x24.org> wrote: > > I'm trying to test a trivial patch to set FD_CLOEXEC on the > > flintlock lockfd when using F_OFD_SETLK > > Fwiw, this is the patch I was originally going to test. > (but now I see maybe my F_SETFD might only need to be > called on F_OFD_SETLK success) Description at bottom. > > --- a/backends/flint_lock.cc > +++ b/backends/flint_lock.cc > @@ -108,6 +108,10 @@ FlintLock::...
2020 Aug 15
0
Re: [PATCH nbdkit] New ondemand plugin.
...rs, but rather doing .pwrite locking. Interesting. > + * > + * This uses a currently Linux-specific extension. It requires > + * Linux >= 3.15 (released in 2014, later backported to RHEL 7). > + * There is no sensible way to do this in pure POSIX. > + */ > +#ifdef F_OFD_SETLK > + memset (&lock, 0, sizeof lock); > + if (readonly) > + lock.l_type = F_RDLCK; > + else > + lock.l_type = F_WRLCK; > + lock.l_whence = SEEK_SET; > + lock.l_start = 0; > + lock.l_len = 0; > + if (fcntl (h->fd, F_OFD_SETLK, &lock) == -1) { > +...
2016 Jan 06
0
[klibc:master] MIPS: Update archfcntl.h
...x40000 #define O_CLOEXEC 0x80000 +#define O_PATH 0x200000 +#define O_TMPFILE 0x410000 #define O_NDELAY O_NONBLOCK @@ -53,6 +55,24 @@ #define F_SETLK64 34 #define F_SETLKW64 35 +#define F_SETOWN_EX 15 +#define F_GETOWN_EX 16 + +#define F_GETOWNER_UIDS 17 + +#define F_OFD_GETLK 36 +#define F_OFD_SETLK 37 +#define F_OFD_SETLKW 38 + +#define F_OWNER_TID 0 +#define F_OWNER_PID 1 +#define F_OWNER_PGRP 2 + +struct f_owner_ex { + int type; + pid_t pid; +}; + #define FD_CLOEXEC 1 #define F_RDLCK 0
2023 Aug 28
1
DatabaseModifiedError while iterating on mset
Olly Betts <olly at survex.com> wrote: > On Wed, Aug 23, 2023 at 01:53:27PM +0000, Eric Wong wrote: > > I'm already retrying the ->get_mset operations; but now I'm > > wondering where I'd hit DatabaseModifiedErrors while inside a > > Xapian::MSetIterator loop. > > > > I assume ->get_document is a place where it gets thrown; > > but
2018 Mar 21
2
Re: [PATCH] tests: regressions: make test-big-heap use a temporary empty file
[adding qemu lists] On 03/21/2018 07:51 AM, Richard W.M. Jones wrote: > On Wed, Mar 21, 2018 at 01:44:17PM +0100, Pino Toscano wrote: >> Newer versions of qemu use file locking for the images by default, and >> apparently that does not work with /dev/null. Since this test just >> calls qemu-img to get the format of an empty image, create a temporary >> one instead.
2018 Mar 21
2
Re: [Qemu-block] [PATCH] tests: regressions: make test-big-heap use a temporary empty file
...n qemu-img version 2.10.1 (v2.10.1-dirty) Copyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers $ ./qemu-img info /dev/null image: /dev/null file format: raw virtual size: 0 (0 bytes) disk size: 0 Also with strace: open("/dev/null", O_RDONLY|O_CLOEXEC) = 10 fcntl(10, F_OFD_SETLK, {l_type=F_RDLCK, l_whence=SEEK_SET, l_start=100, l_len=1}) = 0 ... So my kernel (4.15.9-200.fc26.x86_64) seems to have no problems with locking /dev/null. Kevin
2020 Aug 14
2
[PATCH nbdkit] New ondemand plugin.
...nts to be reading. If a client wants to write it must + * have exclusive access. + * + * This uses a currently Linux-specific extension. It requires + * Linux >= 3.15 (released in 2014, later backported to RHEL 7). + * There is no sensible way to do this in pure POSIX. + */ +#ifdef F_OFD_SETLK + memset (&lock, 0, sizeof lock); + if (readonly) + lock.l_type = F_RDLCK; + else + lock.l_type = F_WRLCK; + lock.l_whence = SEEK_SET; + lock.l_start = 0; + lock.l_len = 0; + if (fcntl (h->fd, F_OFD_SETLK, &lock) == -1) { + if (errno == EACCES || errno == EAGAIN) { +...
2016 Jan 06
5
[PATCH klibc 0/5] klibc architecture fixes
Here's an assortment of build and run-time fixes for various architectures that we've applied in Debian. Ben. Aurelien Jarno (1): ppc64: fix struct stat Ben Hutchings (2): MIPS: Update archfcntl.h syscalls: Override detection of direct socket syscalls on i386, m68k, s390 Helge Deller (1): Add pread and pwrite 32bit syscall wrappers for parisc Mauricio Faria de Oliveira