Commit d6fc6c93 authored by Amir Goldstein's avatar Amir Goldstein Committed by Andreas Gruenbacher

gfs2: fs: derive f_fsid from s_uuid

gfs2 already has optional persistent uuid.

Use that uuid to report f_fsid in statfs(2), same as ext2/ext4/zonefs.

This allows gfs2 to be monitored by fanotify filesystem watch.
for example, with inotify-tools 4.23.8.0, the following command can be
used to watch changes over entire filesystem:

  fsnotifywatch --filesystem /mnt/gfs2
Signed-off-by: default avatarAmir Goldstein <amir73il@gmail.com>
Reviewed-by: default avatarJan Kara <jack@suse.cz>
Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
parent 0b2355fe
...@@ -1006,6 +1006,7 @@ static int gfs2_statfs(struct dentry *dentry, struct kstatfs *buf) ...@@ -1006,6 +1006,7 @@ static int gfs2_statfs(struct dentry *dentry, struct kstatfs *buf)
buf->f_files = sc.sc_dinodes + sc.sc_free; buf->f_files = sc.sc_dinodes + sc.sc_free;
buf->f_ffree = sc.sc_free; buf->f_ffree = sc.sc_free;
buf->f_namelen = GFS2_FNAMESIZE; buf->f_namelen = GFS2_FNAMESIZE;
buf->f_fsid = uuid_to_fsid(sb->s_uuid.b);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment