Return-Path: Received: from out1-smtp.messagingengine.com ([66.111.4.25]:41805 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727371AbeITB36 (ORCPT ); Wed, 19 Sep 2018 21:29:58 -0400 From: Nikolaus Rath To: Miklos Szeredi Cc: linux-fsdevel@vger.kernel.org, Maxim Patlasov , Miklos Szeredi , fuse-devel Subject: Re: [fuse-devel] [fuse] When do writes to fuse fd block? References: <87in31whbl.fsf@vostro.rath.org> Date: Wed, 19 Sep 2018 20:50:28 +0100 In-Reply-To: (Miklos Szeredi's message of "Wed, 19 Sep 2018 20:33:33 +0200") Message-ID: <8736u52rnf.fsf@vostro.rath.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Sep 19 2018, Miklos Szeredi wrote: > On Wed, Sep 19, 2018 at 7:03 PM, Nikolaus Rath wrote: >> Hi, >> >> Are there any conditions under which a write to the fuse file descriptor >> may block? >> >> It seems to me that this should never be the case - except possibly when >> sending a FUSE_NOTIFY_INVAL_ENTRY or FUSE_NOTIFY_DELETE request that is >> related for to an ongoing file system operation. Here would would much >> appreciate if someone could clarify what operations exactly would cause >> the write to block. > > NOTIFY_INVAL_ENTRY and NOTIFY_DELETE lock the parent directory > i_mutex. Operations which run under i_mutex of parent are: lookup, > symlink, mknod, mkdir, unlink, rmdir, rename, link, create, rename2. > Operations which run under i_mutex of object: setattr, unlink, rmdir, > rename, setxattr, removexattr, readdir, readdirplus, rename2. Thanks! Could you also confirm if that's the only situation where a write might block? In other words, in all other cases I can safely skip a select/poll/epoll for writability of fuse fd and be guaranteed that the write will proceed immediately? Best, -Nikolaus --=20 GPG Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F =C2=BBTime flies like an arrow, fruit flies like a Banana.=C2= =AB