summaryrefslogtreecommitdiff
path: root/fs/bcachefs/journal_io.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2021-12-14 22:24:41 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-23 00:09:19 +0300
commit8244f3209b5b49a6bde9921d7825af9f57161b23 (patch)
tree344a619bee4976ff0983bf0bb6bba7b81e532a71 /fs/bcachefs/journal_io.c
parentd05117e36a7290cbfa8ebcc05c6facb60a5bcefb (diff)
downloadlinux-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/journal_io.c')
-rw-r--r--fs/bcachefs/journal_io.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/bcachefs/journal_io.c b/fs/bcachefs/journal_io.c
index 1a8c0a7eaca7..ae28cee127e3 100644
--- a/fs/bcachefs/journal_io.c
+++ b/fs/bcachefs/journal_io.c
@@ -709,7 +709,7 @@ reread:
case JOURNAL_ENTRY_NONE:
if (!saw_bad)
return 0;
- sectors = c->opts.block_size;
+ sectors = block_sectors(c);
goto next_block;
case JOURNAL_ENTRY_BAD:
saw_bad = true;
@@ -718,7 +718,7 @@ reread:
* field of the journal entry we read, so try reading
* again at next block boundary:
*/
- sectors = c->opts.block_size;
+ sectors = block_sectors(c);
break;
default:
return ret;