From owner-freebsd-fs@freebsd.org Fri Sep 8 17:28:39 2017 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D2590E23E26 for ; Fri, 8 Sep 2017 17:28:39 +0000 (UTC) (envelope-from martin@lispworks.com) Received: from lwfs1-cam.cam.lispworks.com (mail.lispworks.com [46.17.166.21]) by mx1.freebsd.org (Postfix) with ESMTP id 6ACED633C9 for ; Fri, 8 Sep 2017 17:28:38 +0000 (UTC) (envelope-from martin@lispworks.com) Received: from higson.cam.lispworks.com (higson.cam.lispworks.com [192.168.1.7]) by lwfs1-cam.cam.lispworks.com (8.15.2/8.15.2) with ESMTP id v88HSXhX093393; Fri, 8 Sep 2017 18:28:33 +0100 (BST) (envelope-from martin@lispworks.com) Received: from higson.cam.lispworks.com (localhost.localdomain [127.0.0.1]) by higson.cam.lispworks.com (8.14.4) id v88HSXRY010333; Fri, 8 Sep 2017 18:28:33 +0100 Received: (from martin@localhost) by higson.cam.lispworks.com (8.14.4/8.14.4/Submit) id v88HSXP7010329; Fri, 8 Sep 2017 18:28:33 +0100 Date: Fri, 8 Sep 2017 18:28:33 +0100 Message-Id: <201709081728.v88HSXP7010329@higson.cam.lispworks.com> From: Martin Simmons To: freebsd-fs@freebsd.org In-reply-to: <87lglp6zj8.fsf@vostro.rath.org> (message from Nikolaus Rath on Fri, 08 Sep 2017 15:22:19 +0100) Subject: Re: umount() taking minutes for FUSE filesystems References: <87bmn44ruu.fsf@vostro.rath.org> <87o9qyrbs8.fsf@vostro.rath.org> <2FAD66DE-031B-4B36-9E85-C7BC6B52B5E6@gmail.com> <29de6425-9f92-3bd8-f446-1c9dded33b15@freebsd.org> <87k21dzdrp.fsf@thinkpad.rath.org> <201709051811.v85IBmbO005440@higson.cam.lispworks.com> <87ingugw2v.fsf@thinkpad.rath.org> <201709081143.v88BhEOn001626@higson.cam.lispworks.com> <87lglp6zj8.fsf@vostro.rath.org> X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Sep 2017 17:28:40 -0000 >>>>> On Fri, 08 Sep 2017 15:22:19 +0100, Nikolaus Rath said: > > On Sep 08 2017, Martin Simmons wrote: > > > That will prevent the kernel from sending FUSE_DESTROY, but what is the > > purpose of FUSE_DESTROY if the user program can't respond to it? > > In most cases, umount() is not called by the filesystem but by the > user. In that case, the FUSE_DESTROY request gives the filesystem a > chance to clean-up and exit the main loop. OK, that makes sense. > That said, the filesystem could also detect the unmount by the kernel > closing the fd. So I'm not sure what is gained by the extra request > either... Theoretically, at least under Linux the destroy handler could > perform some notify_* operations, but I don't see how that would be > useful when the filesystem will be unmounted anyway. I don't think the kernel itself ever closes the fd (except implicitly in the case where the filesystem program dies unexpected). __Martin