• M
    Btrfs: Fix wrong device size when we are resizing the device · 7df69d3e
    Miao Xie 提交于
    total_bytes of device is just a in-memory variant which is used to record
    the size of the device, and it might be changed before we resize a device,
    if the resize operation fails, it will be fallbacked. But some code used it
    to update on-disk metadata of the device, it would cause the problem that
    on-disk metadata of the devices was not consistent. We should use the other
    variant named disk_total_bytes to update the on-disk metadata of device,
    because that variant is updated only when the resize operation is successful.
    Fix it.
    Signed-off-by: NMiao Xie <miaox@cn.fujitsu.com>
    Signed-off-by: NChris Mason <clm@fb.com>
    7df69d3e
disk-io.c 112.5 KB