diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2021-12-14 14:24:41 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:19 -0400 |
commit | 8244f3209b5b49a6bde9921d7825af9f57161b23 (patch) | |
tree | 344a619bee4976ff0983bf0bb6bba7b81e532a71 /fs/bcachefs/compress.c | |
parent | d05117e36a7290cbfa8ebcc05c6facb60a5bcefb (diff) | |
download | linux-stable-8244f3209b5b49a6bde9921d7825af9f57161b23.tar.gz linux-stable-8244f3209b5b49a6bde9921d7825af9f57161b23.tar.bz2 linux-stable-8244f3209b5b49a6bde9921d7825af9f57161b23.zip |
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/compress.c')
-rw-r--r-- | fs/bcachefs/compress.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/compress.c b/fs/bcachefs/compress.c index 78757dcede36..2d5dc2394bab 100644 --- a/fs/bcachefs/compress.c +++ b/fs/bcachefs/compress.c @@ -376,7 +376,7 @@ static unsigned __bio_compress(struct bch_fs *c, BUG_ON(!mempool_initialized(&c->compress_workspace[compression_type])); /* If it's only one block, don't bother trying to compress: */ - if (bio_sectors(src) <= c->opts.block_size) + if (src->bi_iter.bi_size <= c->opts.block_size) return 0; dst_data = bio_map_or_bounce(c, dst, WRITE); |