From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out1-smtp.messagingengine.com ([66.111.4.25]:59969 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751053AbdEaUes (ORCPT ); Wed, 31 May 2017 16:34:48 -0400 From: Nikolaus Rath To: Maxim Patlasov , linux-fsdevel Subject: Re: fuse: when are release requests queued? References: <87a860r0v9.fsf@thinkpad.rath.org> <87zidva9r3.fsf@vostro.rath.org> <87eb44a9-359f-68eb-fe42-614a0d9c8193@virtuozzo.com> <87mv9svnpk.fsf@thinkpad.rath.org> <87inkgvmp0.fsf@thinkpad.rath.org> Date: Wed, 31 May 2017 13:34:41 -0700 In-Reply-To: (Michael Theall's message of "Wed, 31 May 2017 19:51:47 +0000") Message-ID: <87a85svk7y.fsf@thinkpad.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 May 31 2017, Michael Theall wrote: >> I do not fully understand the difference you describe. What I would like >> to construct is the following scenario: >> >> 1. Userspace calls close() >> 2. Userspace close() returns >> 3. Userspace calls unlink() >> 4. Userspace unlink() returns >> 5. libfuse reads UNLINK request from kernel pipe >> 6. libfuse reads RELEASE request from kernel pipe >> >> What would be the simplest way to do that? >> > Won't unlink(2) block until the fuse server has responded? Yes, you are right. It should be: 1. Userspace calls close() 2. Userspace close() returns 3. Userspace calls unlink() 4. libfuse reads UNLINK request from kernel pipe 5. Userspace unlink() returns 6. libfuse reads RELEASE request from kernel pipe > I'm pretty sure > the close(2) should come back after the fuse server responds to FLUSH. It > sounds like with your RELEASE delay in the kernel, you should get your > steps as described buy step 4 and 5 must be swapped. No, the delay comes in between (1) and (2). 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