[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240709011134.79954-1-youling.tang@linux.dev>
Date: Tue, 9 Jul 2024 09:11:33 +0800
From: Youling Tang <youling.tang@...ux.dev>
To: Kent Overstreet <kent.overstreet@...ux.dev>
Cc: linux-bcachefs@...r.kernel.org,
linux-kernel@...r.kernel.org,
Youling Tang <youling.tang@...ux.dev>,
Youling Tang <tangyouling@...inos.cn>
Subject: [PATCH 1/2] bcachefs: Add support for FS_IOC_GETFSUUID
From: Kent Overstreet <kent.overstreet@...ux.dev>
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@...ux.dev>
Signed-off-by: Youling Tang <tangyouling@...inos.cn>
---
fs/bcachefs/fs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/bcachefs/fs.c b/fs/bcachefs/fs.c
index 3ea8dbc4d8e4..011ee5075a52 100644
--- a/fs/bcachefs/fs.c
+++ b/fs/bcachefs/fs.c
@@ -1977,7 +1977,7 @@ static int bch2_fs_get_tree(struct fs_context *fc)
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));
--
2.34.1
Powered by blists - more mailing lists