From 52e401f1b5039b3508736838128de52b912dfc58 Mon Sep 17 00:00:00 2001 From: "Aneesh Kumar K.V" Date: Sat, 29 Jan 2011 18:43:38 +0530 Subject: [PATCH] --- yaml --- r: 234281 b: refs/heads/master c: 93f1c20bc8cdb757be50566eff88d65c3b26881f h: refs/heads/master i: 234279: 7554331b070e0dc2f5317eddfa795b913652d319 v: v3 --- [refs] | 2 +- trunk/fs/namespace.c | 16 ++++++++++++++++ trunk/include/linux/fs.h | 1 + 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 8a52a172e108..6a2f0f904747 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a51571ccb8be1b88aea502ebba8350519682c16d +refs/heads/master: 93f1c20bc8cdb757be50566eff88d65c3b26881f diff --git a/trunk/fs/namespace.c b/trunk/fs/namespace.c index d1edf26025dc..dffe6f49ab93 100644 --- a/trunk/fs/namespace.c +++ b/trunk/fs/namespace.c @@ -1002,6 +1002,18 @@ const struct seq_operations mounts_op = { .show = show_vfsmnt }; +static int uuid_is_nil(u8 *uuid) +{ + int i; + u8 *cp = (u8 *)uuid; + + for (i = 0; i < 16; i++) { + if (*cp++) + return 0; + } + return 1; +} + static int show_mountinfo(struct seq_file *m, void *v) { struct proc_mounts *p = m->private; @@ -1040,6 +1052,10 @@ static int show_mountinfo(struct seq_file *m, void *v) if (IS_MNT_UNBINDABLE(mnt)) seq_puts(m, " unbindable"); + if (!uuid_is_nil(mnt->mnt_sb->s_uuid)) + /* print the uuid */ + seq_printf(m, " uuid:%pU", mnt->mnt_sb->s_uuid); + /* Filesystem specific data */ seq_puts(m, " - "); show_type(m, sb); diff --git a/trunk/include/linux/fs.h b/trunk/include/linux/fs.h index 3f64630c0e10..f2143e0942c2 100644 --- a/trunk/include/linux/fs.h +++ b/trunk/include/linux/fs.h @@ -1408,6 +1408,7 @@ struct super_block { wait_queue_head_t s_wait_unfrozen; char s_id[32]; /* Informational name */ + u8 s_uuid[16]; /* UUID */ void *s_fs_info; /* Filesystem private info */ fmode_t s_mode;