btrfs-progs: mkfs: --rootdir related fixes
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 3 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | btrfs-progs: properly initialized extent generation for __btrfs_record_file_extent()kernel-shared/ | +1 | 2 replies | |
| 2/2 | btrfs-progs: avoid fs corruption if rootdir contains ino smaller than BTRFS_FIRST_FREE_OBJECTIDkernel-shared/ mkfs/ | +13 | 0 replies |
Reviews trailers per patch
1 of 2 patches has a Reviewed-by or Acked-by.
| Patch | Anand Jain |
|---|---|
| 1/2 | R-b |
| 2/2 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/2] btrfs-progs: mkfs: --rootdir related fixes
I don't know if it's recent kernel tmpfs change or something else, but I'm consistently get ino number smaller than 256 from my /tmp directory.
This behavior change exposed a new problem in mkfs.btrfs --rootdir, that if some ino number (in the source directory, not in btrfs) is smaller than 256, it can screw up the backref code.
As backref code is utilizing @owner to determine if a backref is data or metadata.
And inode number smaller than 256 will make backref code to treat a data backref as tree backref, and cause corruption.
Thankfully this should not happen that easily, only when --rootdir points to a newly created fs.
Qu Wenruo (2):
btrfs-progs: properly initialized extent generation for
__btrfs_record_file_extent()
btrfs-progs: avoid fs corruption if rootdir contains ino smaller than
BTRFS_FIRST_FREE_OBJECTID
kernel-shared/extent-tree.c | 8 +++++++- mkfs/rootdir.c | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-)
Signature · 1 line
2.37.3