diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2025-06-11 00:26:06 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2025-06-11 00:28:34 -0400 |
commit | 26c3224b2645dc85cb3f90910e1ce7108e7095f5 (patch) | |
tree | 2249fead794183c3a4d7365d174ae823f9f8b8ee | |
parent | 802903c8cf90f84248b31dd7776ecce148bb7b9c (diff) |
Update bcachefs sources to 5e40e376e242 bcachefs: Allow CONFIG_UNICODE=m
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
-rw-r--r-- | .bcachefs_revision | 2 | ||||
-rw-r--r-- | libbcachefs/chardev.c | 4 | ||||
-rw-r--r-- | libbcachefs/sb-members.c | 19 |
3 files changed, 7 insertions, 18 deletions
diff --git a/.bcachefs_revision b/.bcachefs_revision index 9c7af2eb..e4007c01 100644 --- a/.bcachefs_revision +++ b/.bcachefs_revision @@ -1 +1 @@ -a8d89eb264e00f606f7490b8024016708cefdf0d +5e40e376e242076ba1148c100993e99f339c2391 diff --git a/libbcachefs/chardev.c b/libbcachefs/chardev.c index 2d38466e..fde3c238 100644 --- a/libbcachefs/chardev.c +++ b/libbcachefs/chardev.c @@ -399,7 +399,7 @@ static long bch2_ioctl_data(struct bch_fs *c, return ret; } -static long bch2_ioctl_fs_usage(struct bch_fs *c, +static noinline_for_stack long bch2_ioctl_fs_usage(struct bch_fs *c, struct bch_ioctl_fs_usage __user *user_arg) { struct bch_ioctl_fs_usage arg = {}; @@ -469,7 +469,7 @@ err: } /* obsolete, didn't allow for new data types: */ -static long bch2_ioctl_dev_usage(struct bch_fs *c, +static noinline_for_stack long bch2_ioctl_dev_usage(struct bch_fs *c, struct bch_ioctl_dev_usage __user *user_arg) { struct bch_ioctl_dev_usage arg; diff --git a/libbcachefs/sb-members.c b/libbcachefs/sb-members.c index c673e76c..363eb0c6 100644 --- a/libbcachefs/sb-members.c +++ b/libbcachefs/sb-members.c @@ -325,12 +325,9 @@ static void bch2_sb_members_v1_to_text(struct printbuf *out, struct bch_sb *sb, { struct bch_sb_field_members_v1 *mi = field_to_type(f, members_v1); struct bch_sb_field_disk_groups *gi = bch2_sb_field_get(sb, disk_groups); - int nr = (vstruct_end(&mi->field) - (void *) &gi->entries[0]) / sizeof(gi->entries[0]); - - if (nr != sb->nr_devices) - prt_printf(out, "nr_devices mismatch: have %i entries, should be %u", nr, sb->nr_devices); + unsigned i; - for (int i = 0; i < nr; i++) + for (i = 0; i < sb->nr_devices; i++) member_to_text(out, members_v1_get(mi, i), gi, sb, i); } @@ -344,17 +341,9 @@ static void bch2_sb_members_v2_to_text(struct printbuf *out, struct bch_sb *sb, { struct bch_sb_field_members_v2 *mi = field_to_type(f, members_v2); struct bch_sb_field_disk_groups *gi = bch2_sb_field_get(sb, disk_groups); - int nr = (vstruct_end(&mi->field) - (void *) &gi->entries[0]) / le16_to_cpu(mi->member_bytes); - - if (nr != sb->nr_devices) - prt_printf(out, "nr_devices mismatch: have %i entries, should be %u", nr, sb->nr_devices); - - /* - * We call to_text() on superblock sections that haven't passed - * validate, so we can't trust sb->nr_devices. - */ + unsigned i; - for (int i = 0; i < nr; i++) + for (i = 0; i < sb->nr_devices; i++) member_to_text(out, members_v2_get(mi, i), gi, sb, i); } |