Re: [fuse-devel] fuse: feasible to distinguish between umount and abort?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2016-11-24 10:10 GMT+01:00 Miklos Szeredi <miklos@xxxxxxxxxx>:
> On Thu, Nov 24, 2016 at 12:11 AM, Nikolaus Rath <Nikolaus@xxxxxxxx> wrote:
>> 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).

A filesystem should check the mountpouint is already mounted when
starting right? So when it's mounted already do not start and return a
proper return value.

I'm currently working with the order of unmounting. When the userspace
filesystem detects the VFS has disconnected the
filedescriptor (event occurs but reading from it gives zero size when
using recv). This happens when terminating with kill. I do not know
this also happens
when aborting. I must say with my filesystems I've got the fd added to
epoll which watches it constantly, and when doing so it reports the
event when the VFS closes the fd.

What is the right order for the userspace daemon in this case?
I think the userspace daemon has to test the mountpoint is still mounted
and umount if it is?

Stef
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux