btrfs: apply strict alignment checks to extent maps
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest3 patches 1 replyIn review
- v13 patches 5 repliesSuperseded
Changes in v2 from the cover letter
- Grammar fixes
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | btrfs: tests: remove invalid file extent map testsfs/ | +49 | 0 replies | |
| 2/3 | btrfs: tests: prepare extent map tests for strict alignment checksfs/ | +11 | 0 replies | |
| 3/3 | btrfs: add strict extent map alignment checksfs/ | +12 | 0 replies |
Reviews trailers per patch
1 of 3 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Filipe Manana |
|---|---|
| Series | R-b |
| 1/3 | |
| 2/3 | R-b |
| 3/3 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 0/3] btrfs: apply strict alignment checks to extent maps
[CHANGELOG]
v2:
- Grammar fixes
Not only spelling fixes, but also extra new line after an item of a list.
- Remove unnecessary ASSERT()s inside inode tests
There is already enough comments on each test file extent item.
- Remove some unnecessary commit messages from patch 3
Which not only introduces grammar errors, but also duplicated.
Although we already have strict checks on file extent items from tree-checker, we never do proper alignment checks for extent maps.
The reason is mostly due to the failure of self tests and how hard it is to touch them, especially for the inode self tests.
I have to say the inode self test is really something, the extent maps of the self test makes no sense, and would be rejected by the tree-checker if they show up in the real world.
Thankfully only the first few file extents items are invalid, the remaining ones are totally fine.
The comments are not any better, after the first line, there are no more aligned number at all, and the numbers are not offset by 1, but 3 or even more.
Considering we're using decimals for most of our dump-tree and comments, no one is really going to note the wrong numbers until one throw them into python or whatever calculator one prefers.
The series will mostly rework the inode self tests file extent item layout so that they represent the real world better, and update the comments and make the poor person who needs to update that selftest suffer less in the future.
Then address the minor problem in the extent-map selftest where fs_info->sectorsize is never properly populated for the 4K based self test.
With all those done, we can finally put a proper alignment check into validate_extent_map() which is called for every new, merged or replaced extent map.
Qu Wenruo (3):
btrfs: tests: remove invalid file extent map tests
btrfs: tests: prepare extent map tests for strict alignment checks
btrfs: add strict extent map alignment checks
fs/btrfs/extent_map.c | 12 ++++ fs/btrfs/tests/extent-map-tests.c | 16 ++++-- fs/btrfs/tests/inode-tests.c | 96 ++++++++++++++++--------------- 3 files changed, 72 insertions(+), 52 deletions(-)
Signature · 1 line
2.52.0