Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935666AbcKWXLr (ORCPT ); Wed, 23 Nov 2016 18:11:47 -0500 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:37513 "EHLO out5-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934351AbcKWXLq (ORCPT ); Wed, 23 Nov 2016 18:11:46 -0500 X-ME-Sender: X-Sasl-enc: iKAiMKkx5tZx7+cI2vbvlgfDLVRnVlsrme3sCqBixlut 1479942704 From: Nikolaus Rath To: linux-kernel , linux-fsdevel , Miklos Szeredi Cc: fuse-devel Subject: fuse: feasible to distinguish between umount and abort? Mail-Copies-To: never Mail-Followup-To: linux-kernel , linux-fsdevel , Miklos Szeredi , fuse-devel Date: Wed, 23 Nov 2016 15:11:43 -0800 Message-ID: <87a8cp3i6o.fsf@thinkpad.rath.org> User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id uANNBoBk024619 Content-Length: 969 Lines: 27 Hello, Currently, both a call to umount(2) and writing "1" to /sys/fs/fuse/connections/NNN/abort will put the /dev/fuse fd into the same state: reading from it returns ENODEV, and polling on it returns POLLERR. This causes problems for filesystems that want to ensure that the mountpoint is free when they exit. If accessing the device fd gives the above errors, they have to do an additional check to determine if they still need to unmount the mountpoint. This is difficult to do without race conditions (think of someone unmounting and immediately re-starting a new filesystem instance). Would it be possible to change the behavior of the /dev/fuse fd so that userspace can distinguish between a regular umount and use of the /sys/fs/fuse abort)? Best, -Nikolaus -- GPG encrypted emails preferred. Key id: 0xD113FCAC3C4E599F Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F »Time flies like an arrow, fruit flies like a Banana.«