Nikolay Borisov 0e4324a4c3 btrfs: round down size diff when shrinking/growing device
Further testing showed that the fix introduced in 7dfb8be11b5d ("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: 7dfb8be11b5d ("btrfs: Round down values which are written for total_bytes_size")
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2017-07-24 16:05:00 +02:00
..
2017-05-05 15:24:52 -04:00
2017-03-28 16:16:52 +02:00
2017-05-12 15:57:15 -07:00
2017-06-14 19:37:23 +02:00
2017-04-19 14:21:23 +02:00
2017-06-04 11:56:53 -07:00
2017-04-20 12:09:55 -06:00
2017-05-05 13:36:10 -07:00
2017-06-17 17:34:41 +09:00
2017-04-17 12:52:27 -04:00
2017-02-27 18:43:46 -08:00
2016-12-14 23:48:11 -05:00
2017-02-27 18:43:46 -08:00
2017-05-08 17:15:12 -07:00
2017-06-09 16:28:01 -04:00