diff options
author | Nikolay Borisov <nborisov@suse.com> | 2017-06-16 14:39:20 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-06-20 14:22:48 +0200 |
commit | 7dfb8be11b5d1db4325414ce16b8c164e08f52d8 (patch) | |
tree | 8c9a616a9730750aa21daedb558e742450b78f67 /fs/btrfs/qgroup.c | |
parent | eca152edf57e04f61d5a79e404d8e6c147278fdf (diff) | |
download | linux-7dfb8be11b5d1db4325414ce16b8c164e08f52d8.tar.bz2 |
btrfs: Round down values which are written for total_bytes_size
We got an internal report about a file system not wanting to mount
following 99e3ecfcb9f4 ("Btrfs: add more validation checks for
superblock").
BTRFS error (device sdb1): super_total_bytes 1000203816960 mismatch with
fs_devices total_rw_bytes 1000203820544
Subtracting the numbers we get a difference of less than a 4kb. Upon
closer inspection it became apparent that mkfs actually rounds down the
size of the device to a multiple of sector size. However, the same
cannot be said for various functions which modify the total size and are
called from btrfs_balance as well as when adding a new device. So this
patch ensures that values being saved into on-disk data structures are
always rounded down to a multiple of sectorsize.
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/qgroup.c')
0 files changed, 0 insertions, 0 deletions