diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2021-12-14 22:24:41 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-23 00:09:19 +0300 |
commit | 8244f3209b5b49a6bde9921d7825af9f57161b23 (patch) | |
tree | 344a619bee4976ff0983bf0bb6bba7b81e532a71 /fs/bcachefs/extents.c | |
parent | d05117e36a7290cbfa8ebcc05c6facb60a5bcefb (diff) | |
download | linux-8244f3209b5b49a6bde9921d7825af9f57161b23.tar.xz |
bcachefs: Option improvements
This adds flags for options that must be a power of two (block size and
btree node size), and options that are stored in the superblock as a
power of two (encoded extent max).
Also: options are now stored in memory in the same units they're
displayed in (bytes): we now convert when getting and setting from the
superblock.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/extents.c')
-rw-r--r-- | fs/bcachefs/extents.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/extents.c b/fs/bcachefs/extents.c index 8592a0f6327e..161ae4fd59d9 100644 --- a/fs/bcachefs/extents.c +++ b/fs/bcachefs/extents.c @@ -1037,7 +1037,7 @@ const char *bch2_bkey_ptrs_invalid(const struct bch_fs *c, struct bkey_s_c k) if (k.k->type == KEY_TYPE_btree_ptr || k.k->type == KEY_TYPE_btree_ptr_v2) - size_ondisk = c->opts.btree_node_size; + size_ondisk = btree_sectors(c); bkey_extent_entry_for_each(ptrs, entry) { if (__extent_entry_type(entry) >= BCH_EXTENT_ENTRY_MAX) |