summaryrefslogtreecommitdiff
path: root/fs/btrfs/extent-io-tree.h
diff options
context:
space:
mode:
authorFilipe Manana <fdmanana@suse.com>2022-08-01 16:57:53 +0300
committerDavid Sterba <dsterba@suse.com>2022-09-26 13:27:57 +0300
commit7059c658310e641b6976c8b10a591ad7b7279c20 (patch)
tree09fc0dc5527c6509af1887e8b7e580910c047dc9 /fs/btrfs/extent-io-tree.h
parentfb731430be32068735905c05a86b9eaaa3bb60c7 (diff)
downloadlinux-7059c658310e641b6976c8b10a591ad7b7279c20.tar.xz
btrfs: simplify adding and replacing references during log replay
During log replay, when adding/replacing inode references, there are two special cases that have special code for them: 1) When we have an inode with two or more hardlinks in the same directory, therefore two or more names encoded in the same inode reference item, and one of the hard links gets renamed to the old name of another hard link - that is, the index number for a name changes. This was added in commit 0d836392cadd55 ("Btrfs: fix mount failure after fsync due to hard link recreation"), and is covered by test case generic/502 from fstests; 2) When we have several inodes that got renamed to an old name of some other inode, in a cascading style. The code to deal with this special case was added in commit 6b5fc433a7ad67 ("Btrfs: fix fsync after succession of renames of different files"), and is covered by test cases generic/526 and generic/527 from fstests. Both cases can be deal with by making sure __add_inode_ref() is always called by add_inode_ref() for every name encoded in the inode reference item, and not just for the first name that has a conflict. With such change we no longer need that special casing for the two cases mentioned before. So do those changes. Signed-off-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/extent-io-tree.h')
0 files changed, 0 insertions, 0 deletions