diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-01-17 00:20:21 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-01-21 21:27:10 +0300 |
commit | d7e77f53e90e1eb87838eed7c651531427b9114a (patch) | |
tree | f5e54a0751c8b51d9dcbd8522af1fb70e26331bf /fs/bcachefs/xattr.c | |
parent | ec4edd7b9d2038a97e0ba3fad8fc8492b0d12d35 (diff) | |
download | linux-d7e77f53e90e1eb87838eed7c651531427b9114a.tar.xz |
bcachefs: opts->compression can now also be applied in the background
The "apply this compression method in the background" paths now use the
compression option if background_compression is not set; this means that
setting or changing the compression option will cause existing data to
be compressed accordingly in the background.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/xattr.c')
-rw-r--r-- | fs/bcachefs/xattr.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/bcachefs/xattr.c b/fs/bcachefs/xattr.c index 5a1858fb9879..9c0d2316031b 100644 --- a/fs/bcachefs/xattr.c +++ b/fs/bcachefs/xattr.c @@ -590,8 +590,9 @@ err: mutex_unlock(&inode->ei_update_lock); if (value && - (opt_id == Opt_background_compression || - opt_id == Opt_background_target)) + (opt_id == Opt_background_target || + opt_id == Opt_background_compression || + (opt_id == Opt_compression && !inode_opt_get(c, &inode->ei_inode, background_compression)))) bch2_set_rebalance_needs_scan(c, inode->ei_inode.bi_inum); return bch2_err_class(ret); |