Commit 0e4324a
btrfs: round down size diff when shrinking/growing device
Further testing showed that the fix introduced in 7dfb8be ("btrfs:
Round down values which are written for total_bytes_size") was
insufficient and it could still lead to discrepancies between the
total_bytes in the super block and the device total bytes. So this patch
also ensures that the difference between old/new sizes when
shrinking/growing is also rounded down. This ensure that we won't be
subtracting/adding a non-sectorsize multiples to the superblock/device
total sizees.
Fixes: 7dfb8be ("btrfs: Round down values which are written for total_bytes_size")
Signed-off-by: Nikolay Borisov <[email protected]>
Reviewed-by: David Sterba <[email protected]>
Signed-off-by: David Sterba <[email protected]>1 parent 17024ad commit 0e4324a
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2702 | 2702 | | |
2703 | 2703 | | |
2704 | 2704 | | |
2705 | | - | |
| 2705 | + | |
2706 | 2706 | | |
2707 | 2707 | | |
2708 | 2708 | | |
| |||
4406 | 4406 | | |
4407 | 4407 | | |
4408 | 4408 | | |
4409 | | - | |
| 4409 | + | |
4410 | 4410 | | |
4411 | 4411 | | |
4412 | 4412 | | |
| |||
0 commit comments