diff options
author | Eric Rannaud | 2014-06-27 07:18:48 +0200 |
---|---|---|
committer | Karel Zak | 2014-07-01 10:05:16 +0200 |
commit | fb329bbc048861d6f47d33caf61f0c5b4ae68636 (patch) | |
tree | 30f503b36dab682083bbd07d05c72e8a830f81c1 /libmount/src/cache.c | |
parent | libmount: mnt_resolve_target: tiptoe around active mount points (diff) | |
download | kernel-qcow2-util-linux-fb329bbc048861d6f47d33caf61f0c5b4ae68636.tar.gz kernel-qcow2-util-linux-fb329bbc048861d6f47d33caf61f0c5b4ae68636.tar.xz kernel-qcow2-util-linux-fb329bbc048861d6f47d33caf61f0c5b4ae68636.zip |
findmnt: use mnt_cache_set_targets() for non-kernel table
findmnt compares the user-supplied path <target> with each entry in the
parsed table. To do this comparison, libmount attempts to canonicalize
the target path of each table entry, when the entry does not originate
from the kernel (kernel supplied target paths are already
canonicalized). However, if one of these entries is an active mount
point, stat(2) or readlink(2) on the mount target path can hang (e.g.
unreachable NFS server).
If the main table is not a kernel table, we parse /proc/self/mountinfo
into a secondary table and call mnt_cache_set_targets(). This allows
libmount to check that the target path of each entry in the main table
is not an active mount point, so it can avoid canonicalizing it.
Signed-off-by: Eric Rannaud <e@nanocritical.com>
Diffstat (limited to 'libmount/src/cache.c')
0 files changed, 0 insertions, 0 deletions