aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2024-07-09 09:11:33 +0800
committerKent Overstreet <kent.overstreet@linux.dev>2024-12-21 01:36:17 -0500
commit4f1a6b0ab4ef9ccd0b5940efcba32b34a5c2da08 (patch)
tree3179de9b8d62123fb3144eff06ac6722fbb109d0
parentbcachefs: Correct the description of the '--bucket=size' options (diff)
downloadwireguard-linux-4f1a6b0ab4ef9ccd0b5940efcba32b34a5c2da08.tar.xz
wireguard-linux-4f1a6b0ab4ef9ccd0b5940efcba32b34a5c2da08.zip
bcachefs: Add support for FS_IOC_GETFSUUID
Use super_set_uuid() to set `sb->s_uuid_len` to avoid returning `-ENOTTY` with sb->s_uuid_len being 0. Original patch link: [1]: https://lore.kernel.org/all/20240207025624.1019754-2-kent.overstreet@linux.dev/ Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> Signed-off-by: Youling Tang <tangyouling@kylinos.cn> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
-rw-r--r--fs/bcachefs/fs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/fs.c b/fs/bcachefs/fs.c
index 91fce04272a1..396a8f677621 100644
--- a/fs/bcachefs/fs.c
+++ b/fs/bcachefs/fs.c
@@ -2216,7 +2216,7 @@ got_sb:
sb->s_time_gran = c->sb.nsec_per_time_unit;
sb->s_time_min = div_s64(S64_MIN, c->sb.time_units_per_sec) + 1;
sb->s_time_max = div_s64(S64_MAX, c->sb.time_units_per_sec);
- sb->s_uuid = c->sb.user_uuid;
+ super_set_uuid(sb, c->sb.user_uuid.b, sizeof(c->sb.user_uuid));
sb->s_shrink->seeks = 0;
c->vfs_sb = sb;
strscpy(sb->s_id, c->name, sizeof(sb->s_id));