d_path() results in presence of detached mounts

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

 



Hello!

Recently I've got a question from a user about the following:

# unshare --mount swapon /dev/sda3
# cat /proc/swaps
Filename                                Type            Size            Used            Priority
/sda3                                   partition       2098152         0               -2

Now everything works as expected here AFAICS. When namespace gets created
/dev mount is cloned into it. When swapon exits, the namespace is
destroyed and /dev mount clone is detached (no parent, namespace NULL).
Hence when d_path() crawls the path it stops at the mountpoint root and
exits. There's not much we can do about this but when discussing the
situation internally, Michal proposed that d_path() could append something
like "(detached)" to the path string - similarly to "(deleted)". That could
somewhat reduce the confusion about such paths? What do people think about
this?

								Honza
-- 
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR




[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