]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: When shrinking, only update disk size on success
authorChris Ball <cjb@laptop.org>
Mon, 27 Apr 2009 11:29:03 +0000 (07:29 -0400)
committerChris Mason <chris.mason@oracle.com>
Mon, 27 Apr 2009 11:40:51 +0000 (07:40 -0400)
commit74d8699ab34f981214aad93b01ab5612b9a40255
treeb8f20c01239674eea287c1665fbf96fb92dfcb00
parent390dd94d5311a79625d2d47af1e0204792927106
Btrfs: When shrinking, only update disk size on success

Previously, we updated a device's size prior to attempting a shrink
operation.  This patch moves the device resizing logic to only happen if
the shrink completes successfully.  In the process, it introduces a new
field to btrfs_device -- disk_total_bytes -- to track the on-disk size.

Signed-off-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/volumes.c
fs/btrfs/volumes.h