diff options
author | Philipp Reisner <philipp.reisner@linbit.com> | 2009-12-22 07:35:52 -0500 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2010-01-12 04:02:46 -0500 |
commit | a393db6f10ef2d4f28257234cfc730e744dfb6a4 (patch) | |
tree | 3f947cce6b5ef9ea2a1959123b36da6f7de23870 /drivers/block/drbd/drbd_receiver.c | |
parent | b10d96cb9c9a2a0029d28910ca517f4003051b04 (diff) |
drbd: Allow online resizing of DRBD devices while peer not reachable (needs to be explicitly forced)
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block/drbd/drbd_receiver.c')
-rw-r--r-- | drivers/block/drbd/drbd_receiver.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c index e3716fadc6a5..f22a5283128a 100644 --- a/drivers/block/drbd/drbd_receiver.c +++ b/drivers/block/drbd/drbd_receiver.c | |||
@@ -2870,7 +2870,7 @@ static int receive_sizes(struct drbd_conf *mdev, struct p_header *h) | |||
2870 | 2870 | ||
2871 | /* Never shrink a device with usable data during connect. | 2871 | /* Never shrink a device with usable data during connect. |
2872 | But allow online shrinking if we are connected. */ | 2872 | But allow online shrinking if we are connected. */ |
2873 | if (drbd_new_dev_size(mdev, mdev->ldev) < | 2873 | if (drbd_new_dev_size(mdev, mdev->ldev, 0) < |
2874 | drbd_get_capacity(mdev->this_bdev) && | 2874 | drbd_get_capacity(mdev->this_bdev) && |
2875 | mdev->state.disk >= D_OUTDATED && | 2875 | mdev->state.disk >= D_OUTDATED && |
2876 | mdev->state.conn < C_CONNECTED) { | 2876 | mdev->state.conn < C_CONNECTED) { |
@@ -2885,7 +2885,7 @@ static int receive_sizes(struct drbd_conf *mdev, struct p_header *h) | |||
2885 | #undef min_not_zero | 2885 | #undef min_not_zero |
2886 | 2886 | ||
2887 | if (get_ldev(mdev)) { | 2887 | if (get_ldev(mdev)) { |
2888 | dd = drbd_determin_dev_size(mdev); | 2888 | dd = drbd_determin_dev_size(mdev, 0); |
2889 | put_ldev(mdev); | 2889 | put_ldev(mdev); |
2890 | if (dd == dev_size_error) | 2890 | if (dd == dev_size_error) |
2891 | return FALSE; | 2891 | return FALSE; |