summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/xattr.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2025-05-02 12:23:59 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2025-05-21 20:14:41 -0400
commit7b8c41c178742c680e6acb610a760f9e007cfeac (patch)
tree0ccb7658b45c73cae34fdbd230b3d1e54a83f00a /fs/bcachefs/xattr.c
parentbcachefs: snapshot delete progress indicator (diff)
downloadlinux-7b8c41c178742c680e6acb610a760f9e007cfeac.tar.gz
linux-7b8c41c178742c680e6acb610a760f9e007cfeac.zip
bcachefs: Add comments for inode snapshot requirements
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/xattr.c')
-rw-r--r--fs/bcachefs/xattr.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/bcachefs/xattr.c b/fs/bcachefs/xattr.c
index 6b64cec78fb9..627f153798c6 100644
--- a/fs/bcachefs/xattr.c
+++ b/fs/bcachefs/xattr.c
@@ -176,6 +176,11 @@ int bch2_xattr_set(struct btree_trans *trans, subvol_inum inum,
if (ret)
return ret;
+ /*
+ * Besides the ctime update, extents, dirents and xattrs updates require
+ * that an inode update also happens - to ensure that if a key exists in
+ * one of those btrees with a given snapshot ID an inode is also present
+ */
inode_u->bi_ctime = bch2_current_time(c);
ret = bch2_inode_write(trans, &inode_iter, inode_u);