Skip to content

btrfs: fix inlined file extent items in data reloc

Qu Wenruo linux-btrfs stable 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 1 replyIn review
  2. v22 patches 3 repliesSuperseded
  3. v12 patches 2 repliesSuperseded

Changes in v3 from the cover letter

- Use btrfs_is_data_reloc_root()

- Reword the cause analyze to avoid confusion

- Expand the [FIX] section to explain why disabling compression will avoid inlined extents

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2btrfs: do not try compression for data reloc inodesfs/btrfs/btrfs_inode.h+2 -00 replies
2/2btrfs: reject inline file extents item in get_new_location()fs/btrfs/relocation.c+7 -00 replies

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchFilipe Manana
SeriesR-b
1/2
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/2] btrfs: fix inlined file extent items in data reloc

[CHANGELOG]
v3:
- Use btrfs_is_data_reloc_root()

- Reword the cause analyze to avoid confusion

- Expand the [FIX] section to explain why disabling compression will avoid inlined extents

v2:
- Add more explanation on why we can created inlined extents even if relocation is preallocating space

- Add the fixes: tag since the behavior is caused by a specific commit

There is a syzbot report that an inlined file extent item in a data reloc inode triggered a sanity check in get_new_location().

It turns out that we can create inlined file extents for data reloc inodes in the first place after commit 3eaf5f082c4c ("btrfs: extract inlined creation into a dedicated delalloc helper").

So the first patch will avoid compression for data reloc inodes first, then the second patch to reject inlined file extent items in get_new_location(), making the checks more robust.

Qu Wenruo (2):
btrfs: do not try compression for data reloc inodes
btrfs: reject inline file extents item in get_new_location()

 fs/btrfs/btrfs_inode.h | 2 ++
 fs/btrfs/relocation.c  | 7 +++++++
 2 files changed, 9 insertions(+)
Signature · 1 line
2.54.0