You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
btrfs-progs: convert: prevent data chunks to go beyond device size
[BUG]
There is a bug report that kernel is rejecting a converted btrfs that
has dev extents beyond device boundary.
The involved device extent is at 999627694980, length is 30924800,
meanwhile the device is 999658557440.
The device is size not aligned to 64K, meanwhile the dev extent is
aligned to 64K.
[CAUSE]
For converted btrfs, the source fs has all its freedom to choose its
size, as long as it's aligned to the fs block size.
So when adding new converted data block groups we need to do extra
alignment, but in make_convert_data_block_groups() we are rounding up
the end, which can exceed the device size.
[FIX]
Instead of rounding up to stripe boundary, rounding it down to prevent
going beyond the device boundary.
Reported-by: Andieqqq <zeige265975@gmail.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
0 commit comments