-
Notifications
You must be signed in to change notification settings - Fork 249
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
btrfs-progs: check: detect deprecated inode cache
[BUG] There are reports about deprecated inode cache causing newer kernels to rejecting them. Such inode cache is rarely utilized and already fully deprecated since v5.11, and newer kernel will reject data extents of inode cache since v6.11. But original mode btrfs check won't detect nor report them as error. Meanwhile lowmem mode can properly detect and report them: ERROR: root 5 INODE[18446744073709551604] nlink(1) not equal to inode_refs(0) ERROR: invalid imode mode bits: 00 ERROR: invalid inode generation 18446744073709551604 or transid 1 for ino 18446744073709551605, expect [0, 72) ERROR: root 5 INODE[18446744073709551605] is orphan item Since those inode cache paid no attention to properly maintain all the numbers, they are easy targets for more recent lowmem mode. [CAUSE] For original mode, it has extra hardcoded hacks to avoid nlink checks for inode cache inode. Furthermore original mode doesn't check the mode bits nor its generation. [FIX] For original mode, remove the hack for inode cache so that the deprecated inode cache can be reported as an error. For both modes, add extra global message to direct the affected users to use 'btrfs rescue clear-ino-cache' to clear the deprecated cache. Pull-request: #891 Signed-off-by: Qu Wenruo <[email protected]>
- Loading branch information
1 parent
2c87982
commit 30a1398
Showing
3 changed files
with
21 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters