diff options
| author | Kent Overstreet <kent.overstreet@linux.dev> | 2025-05-02 12:23:59 -0400 |
|---|---|---|
| committer | Kent Overstreet <kent.overstreet@linux.dev> | 2025-05-21 20:14:41 -0400 |
| commit | 7b8c41c178742c680e6acb610a760f9e007cfeac (patch) | |
| tree | 0ccb7658b45c73cae34fdbd230b3d1e54a83f00a /fs/bcachefs/io_write.c | |
| parent | bcachefs: snapshot delete progress indicator (diff) | |
| download | linux-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/io_write.c')
| -rw-r--r-- | fs/bcachefs/io_write.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/bcachefs/io_write.c b/fs/bcachefs/io_write.c index add141ac45b5..399df8fede8b 100644 --- a/fs/bcachefs/io_write.c +++ b/fs/bcachefs/io_write.c @@ -279,6 +279,12 @@ static inline int bch2_extent_update_i_size_sectors(struct btree_trans *trans, inode_update_flags = 0; } + /* + * 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 - so we may have to skip + * the nojournal optimization: + */ if (inode->k.p.snapshot != iter.snapshot) { inode->k.p.snapshot = iter.snapshot; inode_update_flags = 0; |
