dect
/
linux-2.6
Archived
13
0
Fork 0

Btrfs: Don't error on resizing FS to same size

It seems overly harsh to fail a resize of a btrfs file system to the
same size when a shrink or grow would succeed.  User app GParted trips
over this error.  Allow it by bypassing the shrink or grow operation.

Signed-off-by: Mike Fleetwood <mike.fleetwood@googlemail.com>
This commit is contained in:
Mike Fleetwood 2011-11-18 18:55:01 +00:00 committed by David Sterba
parent aa38a711a8
commit ece7d20e8b
1 changed files with 1 additions and 1 deletions

View File

@ -1278,7 +1278,7 @@ static noinline int btrfs_ioctl_resize(struct btrfs_root *root,
}
ret = btrfs_grow_device(trans, device, new_size);
btrfs_commit_transaction(trans, root);
} else {
} else if (new_size < old_size) {
ret = btrfs_shrink_device(device, new_size);
}