summaryrefslogtreecommitdiff
path: root/fs/nilfs2
diff options
context:
space:
mode:
authorRyusuke Konishi <konishi.ryusuke@gmail.com>2024-08-15 16:44:05 +0900
committerAndrew Morton <akpm@linux-foundation.org>2024-09-01 20:43:34 -0700
commitef851d44a83ed625ec22eae6bd36a1348c8af571 (patch)
treee7ecc312a1cb81701df310dddc3ef001ae70ccdb /fs/nilfs2
parent16d9691ad4b562ea19271f0788738f649c02cf3c (diff)
nilfs2: add support for FS_IOC_GETUUID
Patch series "nilfs2: add support for some common ioctls". This series adds support for common ioctls to nilfs2 for getting the volume UUID and the relative path of an FS instance within the sysfs namespace, and also implements ioctls for nilfs2 to get and set the volume label. This patch (of 2): Expose the UUID of a file system instance using the super_set_uuid helper and support the FS_IOC_GETUUID ioctl. Link: https://lkml.kernel.org/r/20240815074408.5550-1-konishi.ryusuke@gmail.com Link: https://lkml.kernel.org/r/20240815074408.5550-2-konishi.ryusuke@gmail.com Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'fs/nilfs2')
-rw-r--r--fs/nilfs2/super.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/nilfs2/super.c b/fs/nilfs2/super.c
index e835e1f5a712..167050b3ce7e 100644
--- a/fs/nilfs2/super.c
+++ b/fs/nilfs2/super.c
@@ -1063,6 +1063,9 @@ nilfs_fill_super(struct super_block *sb, struct fs_context *fc)
if (err)
goto failed_nilfs;
+ super_set_uuid(sb, nilfs->ns_sbp[0]->s_uuid,
+ sizeof(nilfs->ns_sbp[0]->s_uuid));
+
cno = nilfs_last_cno(nilfs);
err = nilfs_attach_checkpoint(sb, cno, true, &fsroot);
if (err) {