From mboxrd@z Thu Jan 1 00:00:00 1970 From: "J. Bruce Fields" Subject: Re: [PATCH v5 13/14] locks: skip deadlock detection on FL_FILE_PVT locks Date: Tue, 14 Jan 2014 16:30:44 -0500 Message-ID: <20140114213044.GD23999@fieldses.org> References: <1389277187-18211-1-git-send-email-jlayton@redhat.com> <1389277187-18211-14-git-send-email-jlayton@redhat.com> <52CF05B5.5080700@amacapital.net> <20140109194930.1692fbbe@tlielax.poochiereds.net> <20140114192713.GA22262@fieldses.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Richard Hipp , Jeff Layton , samba-technical@lists.samba.org, "linux-kernel@vger.kernel.org" , Andy Lutomirski , Linux FS Devel , nfs-ganesha-devel@lists.sourceforge.net To: Richard Hipp Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: samba-technical-bounces@lists.samba.org Errors-To: samba-technical-bounces@lists.samba.org List-Id: linux-fsdevel.vger.kernel.org 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).