Re: [PATCH/RFC] VFS: LOOKUP_MOUNTPOINT should used cached info whenever possible.

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

 



On Fri, 21 Apr 2023, Al Viro wrote:
> On Tue, Apr 18, 2023 at 07:26:34AM +1000, NeilBrown wrote:
> 
> > MNT_FORCE is, I think, a good idea and a needed functionality that has
> > never been implemented well.
> > MNT_FORCE causes nfs_umount_begin to be called as you noted, which
> > aborts all pending RPCs on that filesystem.
> 
> Suppose it happens to be mounted in another namespace as well.  Or bound
> at different mountpoint, for that matter.  What should MNT_FORCE do?
> 

1/ set a "forced-unmount" flag on the vfs_mount which causes any syscall
   that uses the vfsmount (whether from an fd, or found in a path walk,
   or elsewhere), except for close(), to abort with an error;
2/ call ->umount_begin passing in the vfs_mount.  The fs can abort any
   outstanding transaction on any fd from that vfs_mount.   Possibly
   it might instead abort a wait rather than the whole transaction,
   particularly if requests using some other vfs_mount might also be
   interested in the transaction
3/ ->close() on a force-unmount vfs_mount would clean up without
   blocking indefinitely, discarding dirty data if necessary.

This still depends on the application to close all fds that return
errors (and to chdir out of a problematic directory).  But at least it
*allows* applications to do that without requiring that they be killed.

Thanks,
NeilBrown



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

  Powered by Linux