Re: [util-linux PATCH] umount: never 'stat' the path when "-c" is given.

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

 



On Wed, Jun 07 2017, Karel Zak wrote:

> On Wed, Jun 07, 2017 at 11:44:51AM +0200, Karel Zak wrote:
>> On Mon, Jun 05, 2017 at 12:32:58PM +1000, NeilBrown wrote:
>> > diff --git a/libmount/src/context_umount.c b/libmount/src/context_umount.c
>> > index e663a703cca0..693891def0e1 100644
>> > --- a/libmount/src/context_umount.c
>> > +++ b/libmount/src/context_umount.c
>> > @@ -77,6 +77,7 @@ int mnt_context_find_umount_fs(struct libmnt_context *cxt,
>> >  	 * it's usable only for canonicalized stuff (e.g. kernel mountinfo).
>> >  	 */
>> >  	if (!mnt_context_mtab_writable(cxt) && *tgt == '/' &&
>> > +	    !mnt_context_is_nocanonicalize(cxt) &&
>> >  	    !mnt_context_is_force(cxt) && !mnt_context_is_lazy(cxt))
>> >  		rc = mnt_context_get_mtab_for_target(cxt, &mtab, tgt);
>> 
>> I've changed the code to be the mount table filter also usable for
>> --no-canonicalize. It seems better to avoid mnt_resolve_path() than
>> avoid all the filter.
>
> Hmm... the filter seems like bad optimization for umount, because it
> triggers path canonicalization. I did some another changes and umount
> should be less aggressive with work with paths now.

I think I understand what you did, and it appears to still have the
desired effect for me, so I'm happy :-)

Thanks,
NeilBrown

Attachment: signature.asc
Description: PGP signature


[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