lkml.org 
[lkml]   [2014]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5 13/14] locks: skip deadlock detection on FL_FILE_PVT locks
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).


\
 
 \ /
  Last update: 2014-01-15 08:41    [W:0.089 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site