[PATCH v5 13/14] locks: skip deadlock detection on FL_FILE_PVT locks
J. Bruce Fields
bfields at fieldses.org
Tue Jan 14 14:30:44 MST 2014
On Tue, Jan 14, 2014 at 04:21:53PM -0500, Richard Hipp wrote:
> SQLite uses only F_SETLK, never F_SETLKW. Doesn't that mean that SQLite
> will work the same with or without deadlock detection? Doesn't deadlock
> detection only come into play with F_SETLKW?
That's correct.
> > >> (Actually, what happens if you receive a signal which waiting on a file
> > lock?)
> > >
> > > Return -EINTR.
> >
>
> Huh. SQLite is not checking for EINTR if fcntl(F_SETLK,...) fails. Should
> it be? Or does EINTR only come up for F_SETLKW?
I don't know--I wonder if a distributed filesystem, for example, might
allow even a non-blocking lock request to be interrupted? Might be
interesting to check what nfs does.
--b.
>
> We do check for EINTR and retry for other system calls (read(), write(),
> fallocate(), ftruncate(), close(), chmod(), open(), maybe others too).
More information about the samba-technical
mailing list