Re: History of Lazy and Force unmouting

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

 



On Mon, Oct 30, 2017 at 04:41:12PM -0500, Joshua Watt wrote:
> I was hoping to get some background on why the util-linux umount
> command doesn't allow lazy unmounting (the -l flag) to be combined with
> force unmounting (the -f flag). If both flags are specified, umount
> only passes MNT_DETACH to the kernel instead of MNT_DETACH | MNT_FORCE.

The current libmount code follows the original mount(*) behavior. The
flag MNT_DETACH is supported since util-linux 2.11m (year 2001).

>  I looked through the kernel code, and it appears that the two flags
> are orthogonal, so you *should* be able to specify both? I tried
> looking back in the git history of util-linux, but it appears to have
> been that way since support for lazy unmounting was added in 2006.

2006 is time when the code was imported to the git. The important
tarball are older.

Anyway, does it make sense to use the both flags in the same time?

>From kernel code it seems that MNT_FORCE forces FS driver to kill all
resources (by op->umount_begin()) before the umount, so what do you 
expect from later MNT_DETACH?

The problem is that libmount prefers MNT_DETACH, so if you specify
both flags that MNT_FORCE is silently ignored. It would be better
prefer MNT_FORCE or accept both flags and don't try to be more smart
than kernel.

    Karel

-- 
 Karel Zak  <kzak@xxxxxxxxxx>
 http://karelzak.blogspot.com
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux