summaryrefslogtreecommitdiff
path: root/fs/bcachefs/xattr.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/bcachefs/xattr.c')
-rw-r--r--fs/bcachefs/xattr.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/bcachefs/xattr.c b/fs/bcachefs/xattr.c
index c286f3f8859a..70742fc8a5fc 100644
--- a/fs/bcachefs/xattr.c
+++ b/fs/bcachefs/xattr.c
@@ -6,6 +6,7 @@
#include "extents.h"
#include "fs.h"
#include "str_hash.h"
+#include "tier.h"
#include "xattr.h"
#include <linux/dcache.h>
@@ -457,6 +458,11 @@ static int bch2_xattr_bcachefs_set(const struct xattr_handler *handler,
ret = __bch2_write_inode(c, inode, inode_opt_set_fn, &s);
mutex_unlock(&inode->ei_update_lock);
+ if (value &&
+ (s.id == Opt_background_compression ||
+ s.id == Opt_background_target))
+ bch2_rebalance_add_work(c, inode->v.i_blocks);
+
return ret;
}