Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752428AbaANVbF (ORCPT ); Tue, 14 Jan 2014 16:31:05 -0500 Received: from fieldses.org ([174.143.236.118]:46287 "EHLO fieldses.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752327AbaANVas (ORCPT ); Tue, 14 Jan 2014 16:30:48 -0500 Date: Tue, 14 Jan 2014 16:30:44 -0500 From: "J. Bruce Fields" To: Richard Hipp Cc: Andy Lutomirski , Jeff Layton , Linux FS Devel , nfs-ganesha-devel@lists.sourceforge.net, samba-technical@lists.samba.org, "linux-kernel@vger.kernel.org" , Richard Hipp Subject: Re: [PATCH v5 13/14] locks: skip deadlock detection on FL_FILE_PVT locks 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 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@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). -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/