path: root/fs/gfs2/ops_fstype.c
diff options
authorSteven Whitehouse <>2009-02-10 13:48:30 +0000
committerSteven Whitehouse <>2009-03-24 11:21:21 +0000
commit02e3cc70ecbd4352ae4d26459929f43ab1547251 (patch)
tree56d0dd9501481545e592430e408e5cf1495ed373 /fs/gfs2/ops_fstype.c
parentf15ab5619d8068a321094f4705147764d689e88e (diff)
GFS2: Expose UUID via sysfs/uevent
Since we have a UUID, we ought to expose it to the user via sysfs and uevents. We already have the fs name in both of these places (a combination of the lock proto and lock table name) so if we add the UUID as well, we have a full set. For older filesystems (i.e. those created before mkfs.gfs2 was writing UUIDs by default) the sysfs file will appear zero length, and no UUID env var will be added to the uevents. Signed-off-by: Steven Whitehouse <>
Diffstat (limited to 'fs/gfs2/ops_fstype.c')
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c
index e502b379a4d..804ca7273a4 100644
--- a/fs/gfs2/ops_fstype.c
+++ b/fs/gfs2/ops_fstype.c
@@ -234,6 +234,7 @@ static void gfs2_sb_in(struct gfs2_sb_host *sb, const void *buf)
memcpy(sb->sb_lockproto, str->sb_lockproto, GFS2_LOCKNAME_LEN);
memcpy(sb->sb_locktable, str->sb_locktable, GFS2_LOCKNAME_LEN);
+ memcpy(sb->sb_uuid, str->sb_uuid, 16);