aboutsummaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/btree_trans_commit.c
diff options
context:
space:
mode:
authorKent Overstreet <[email protected]>2024-09-24 02:32:58 +0000
committerKent Overstreet <[email protected]>2024-09-28 01:46:35 +0000
commit3672bda8f5edd8ed23c745965500ceb53286d48d (patch)
treef97788d47e10a05a0ca5f15ec37629eef6f6d1b3 /fs/bcachefs/btree_trans_commit.c
parentbcachefs: kill inode_walker_entry.seen_this_pos (diff)
downloadkernel-3672bda8f5edd8ed23c745965500ceb53286d48d.tar.gz
kernel-3672bda8f5edd8ed23c745965500ceb53286d48d.zip
bcachefs: fix transaction restart handling in check_extents(), check_dirents()
Dealing with outside state within a btree transaction is always tricky. check_extents() and check_dirents() have to accumulate counters for i_sectors and i_nlink (for subdirectories). There were two bugs: - transaction commit may return a restart; therefore we have to commit before accumulating to those counters - get_inode_all_snapshots() may return a transaction restart, before updating w->last_pos; then, on the restart, check_i_sectors()/check_subdir_count() would see inodes that were not for w->last_pos Signed-off-by: Kent Overstreet <[email protected]>
Diffstat (limited to 'fs/bcachefs/btree_trans_commit.c')
0 files changed, 0 insertions, 0 deletions