diff options
-rw-r--r-- | fs/namespace.c | 16 | ||||
-rw-r--r-- | include/linux/fs.h | 1 |
2 files changed, 17 insertions, 0 deletions
diff --git a/fs/namespace.c b/fs/namespace.c index d1edf26025dc..dffe6f49ab93 100644 --- a/fs/namespace.c +++ b/fs/namespace.c | |||
@@ -1002,6 +1002,18 @@ const struct seq_operations mounts_op = { | |||
1002 | .show = show_vfsmnt | 1002 | .show = show_vfsmnt |
1003 | }; | 1003 | }; |
1004 | 1004 | ||
1005 | static int uuid_is_nil(u8 *uuid) | ||
1006 | { | ||
1007 | int i; | ||
1008 | u8 *cp = (u8 *)uuid; | ||
1009 | |||
1010 | for (i = 0; i < 16; i++) { | ||
1011 | if (*cp++) | ||
1012 | return 0; | ||
1013 | } | ||
1014 | return 1; | ||
1015 | } | ||
1016 | |||
1005 | static int show_mountinfo(struct seq_file *m, void *v) | 1017 | static int show_mountinfo(struct seq_file *m, void *v) |
1006 | { | 1018 | { |
1007 | struct proc_mounts *p = m->private; | 1019 | struct proc_mounts *p = m->private; |
@@ -1040,6 +1052,10 @@ static int show_mountinfo(struct seq_file *m, void *v) | |||
1040 | if (IS_MNT_UNBINDABLE(mnt)) | 1052 | if (IS_MNT_UNBINDABLE(mnt)) |
1041 | seq_puts(m, " unbindable"); | 1053 | seq_puts(m, " unbindable"); |
1042 | 1054 | ||
1055 | if (!uuid_is_nil(mnt->mnt_sb->s_uuid)) | ||
1056 | /* print the uuid */ | ||
1057 | seq_printf(m, " uuid:%pU", mnt->mnt_sb->s_uuid); | ||
1058 | |||
1043 | /* Filesystem specific data */ | 1059 | /* Filesystem specific data */ |
1044 | seq_puts(m, " - "); | 1060 | seq_puts(m, " - "); |
1045 | show_type(m, sb); | 1061 | show_type(m, sb); |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 3f64630c0e10..f2143e0942c2 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -1408,6 +1408,7 @@ struct super_block { | |||
1408 | wait_queue_head_t s_wait_unfrozen; | 1408 | wait_queue_head_t s_wait_unfrozen; |
1409 | 1409 | ||
1410 | char s_id[32]; /* Informational name */ | 1410 | char s_id[32]; /* Informational name */ |
1411 | u8 s_uuid[16]; /* UUID */ | ||
1411 | 1412 | ||
1412 | void *s_fs_info; /* Filesystem private info */ | 1413 | void *s_fs_info; /* Filesystem private info */ |
1413 | fmode_t s_mode; | 1414 | fmode_t s_mode; |