diff options
author | Philipp Reisner <philipp.reisner@linbit.com> | 2010-03-26 08:49:56 -0400 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2010-05-17 19:18:22 -0400 |
commit | 087c24925cf4209be1a91f8ede9241e17e9734c7 (patch) | |
tree | adb2f50d3dddf1b2d55859c0582e4f3216d9b091 /drivers | |
parent | 6495d2c6d04f4c45411fdb1b40527c24015f39d6 (diff) |
drbd: bugfix: Make resize work, if remote's size was limiting and increased in the meantime
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/block/drbd/drbd_nl.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c index 19b9a2851e7b..6cb703686b28 100644 --- a/drivers/block/drbd/drbd_nl.c +++ b/drivers/block/drbd/drbd_nl.c | |||
@@ -1477,7 +1477,6 @@ static int drbd_nl_resize(struct drbd_conf *mdev, struct drbd_nl_cfg_req *nlp, | |||
1477 | { | 1477 | { |
1478 | struct resize rs; | 1478 | struct resize rs; |
1479 | int retcode = NO_ERROR; | 1479 | int retcode = NO_ERROR; |
1480 | int ldsc = 0; /* local disk size changed */ | ||
1481 | enum determine_dev_size dd; | 1480 | enum determine_dev_size dd; |
1482 | enum dds_flags ddsf; | 1481 | enum dds_flags ddsf; |
1483 | 1482 | ||
@@ -1508,10 +1507,8 @@ static int drbd_nl_resize(struct drbd_conf *mdev, struct drbd_nl_cfg_req *nlp, | |||
1508 | goto fail; | 1507 | goto fail; |
1509 | } | 1508 | } |
1510 | 1509 | ||
1511 | if (mdev->ldev->known_size != drbd_get_capacity(mdev->ldev->backing_bdev)) { | 1510 | if (mdev->ldev->known_size != drbd_get_capacity(mdev->ldev->backing_bdev)) |
1512 | mdev->ldev->known_size = drbd_get_capacity(mdev->ldev->backing_bdev); | 1511 | mdev->ldev->known_size = drbd_get_capacity(mdev->ldev->backing_bdev); |
1513 | ldsc = 1; | ||
1514 | } | ||
1515 | 1512 | ||
1516 | mdev->ldev->dc.disk_size = (sector_t)rs.resize_size; | 1513 | mdev->ldev->dc.disk_size = (sector_t)rs.resize_size; |
1517 | ddsf = (rs.resize_force ? DDSF_FORCED : 0) | (rs.no_resync ? DDSF_NO_RESYNC : 0); | 1514 | ddsf = (rs.resize_force ? DDSF_FORCED : 0) | (rs.no_resync ? DDSF_NO_RESYNC : 0); |
@@ -1523,7 +1520,7 @@ static int drbd_nl_resize(struct drbd_conf *mdev, struct drbd_nl_cfg_req *nlp, | |||
1523 | goto fail; | 1520 | goto fail; |
1524 | } | 1521 | } |
1525 | 1522 | ||
1526 | if (mdev->state.conn == C_CONNECTED && (dd != unchanged || ldsc)) { | 1523 | if (mdev->state.conn == C_CONNECTED) { |
1527 | if (dd == grew) | 1524 | if (dd == grew) |
1528 | set_bit(RESIZE_PENDING, &mdev->flags); | 1525 | set_bit(RESIZE_PENDING, &mdev->flags); |
1529 | 1526 | ||