diff options
| author | Andrey Vagin <[email protected]> | 2014-04-07 22:38:34 +0000 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2014-04-07 23:36:04 +0000 |
| commit | 49d063cb353265c3af701bab215ac438ca7df36d (patch) | |
| tree | d69fa40233df60a711965a37c8bd68c1f86edd1f /fs/proc/array.c | |
| parent | fs/proc/meminfo: meminfo_proc_show(): fix typo in comment (diff) | |
| download | kernel-49d063cb353265c3af701bab215ac438ca7df36d.tar.gz kernel-49d063cb353265c3af701bab215ac438ca7df36d.zip | |
proc: show mnt_id in /proc/pid/fdinfo
Currently we don't have a way how to determing from which mount point
file has been opened. This information is required for proper dumping
and restoring file descriptos due to presence of mount namespaces. It's
possible, that two file descriptors are opened using the same paths, but
one fd references mount point from one namespace while the other fd --
from other namespace.
$ ls -l /proc/1/fd/1
lrwx------ 1 root root 64 Mar 19 23:54 /proc/1/fd/1 -> /dev/null
$ cat /proc/1/fdinfo/1
pos: 0
flags: 0100002
mnt_id: 16
$ cat /proc/1/mountinfo | grep ^16
16 32 0:4 / /dev rw,nosuid shared:2 - devtmpfs devtmpfs rw,size=1013356k,nr_inodes=253339,mode=755
Signed-off-by: Andrey Vagin <[email protected]>
Acked-by: Pavel Emelyanov <[email protected]>
Acked-by: Cyrill Gorcunov <[email protected]>
Cc: Rob Landley <[email protected]>
Cc: Al Viro <[email protected]>
Cc: Oleg Nesterov <[email protected]>
Cc: "Eric W. Biederman" <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'fs/proc/array.c')
0 files changed, 0 insertions, 0 deletions
