]> git.karo-electronics.de Git - linux-beck.git/commit
Btrfs: fix wrong disk size when writing super blocks
authorMiao Xie <miaox@cn.fujitsu.com>
Wed, 3 Sep 2014 13:35:33 +0000 (21:35 +0800)
committerChris Mason <clm@fb.com>
Wed, 17 Sep 2014 20:38:33 +0000 (13:38 -0700)
commit935e5cc935bcbf9b3d0dd59fed7dbc0f2ebca6bc
tree2489d657687317839ab01cd1c617356851839726
parent1c43366d3b3f0fa6c6e81aaf3aa18e0550245dad
Btrfs: fix wrong disk size when writing super blocks

total_size will be changed when resizing a device, and disk_total_size
will be changed if resizing is successful. Meanwhile, the on-disk super
blocks of the previous transaction might not be updated. Considering
the consistency of the metadata in the previous transaction, We should
use the size in the previous transaction to check if the super block is
beyond the boundary of the device. Fix it.

Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/check-integrity.c
fs/btrfs/dev-replace.c
fs/btrfs/disk-io.c
fs/btrfs/scrub.c
fs/btrfs/transaction.c
fs/btrfs/volumes.c
fs/btrfs/volumes.h