• M
    Btrfs: fix wrong device bytes_used in the super block · ce7213c7
    Miao Xie 提交于
    device->bytes_used will be changed when allocating a new chunk, 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.
    
    Though it is not big problem because we don't use it now, but anyway
    it is better that we make it be consistent with the common metadata,
    maybe we will use it in the future.
    Signed-off-by: NMiao Xie <miaox@cn.fujitsu.com>
    Signed-off-by: NChris Mason <clm@fb.com>
    ce7213c7
transaction.c 54.3 KB