btrfs: add parent-child ownership check
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 3 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | btrfs: unify the error handling pattern for read_tree_block()fs/ fs/ fs/ +2 more | +34 | 0 replies | |
| 2/3 | btrfs: unify the error handling of btrfs_read_buffer()fs/ | +6 | 0 replies | |
| 3/3 | btrfs: check extent buffer owner against the owner rootidfs/ fs/ fs/ +1 more | +85 | 2 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/3] btrfs: add parent-child ownership check
Tree-checker doesn't really check owner except for empty leaf.
This allows parent-child ownership mismatch to sneak in.
Enhance the checks again tree block owner by:
- Add owner check when reading child tree blocks
- Make sure the tree root owner matches the root key
Unfortunately the check still has some cases missing, mostly for
- Log/reloc trees
Need full root key to check, which is not really possible for some backref call sites.
The first 2 patches are just cleanup to unify the error handling patterns, there are some "creative" way checking the errors, which is not really reader friendly.
The last patch is doing the real work.
Qu Wenruo (3):
btrfs: unify the error handling pattern for read_tree_block()
btrfs: unify the error handling of btrfs_read_buffer()
btrfs: check extent buffer owner against the owner rootid
fs/btrfs/backref.c | 7 +++-- fs/btrfs/ctree.c | 48 +++++++++++++++++++--------------- fs/btrfs/disk-io.c | 37 +++++++++++++++++++++----- fs/btrfs/print-tree.c | 4 +-- fs/btrfs/relocation.c | 3 ++- fs/btrfs/tree-checker.c | 57 +++++++++++++++++++++++++++++++++++++++++ fs/btrfs/tree-checker.h | 1 + 7 files changed, 125 insertions(+), 32 deletions(-)
Signature · 1 line
2.35.1