summaryrefslogtreecommitdiff
path: root/drivers/block/drbd/drbd_nl.c
diff options
context:
space:
mode:
authorPhilipp Reisner <philipp.reisner@linbit.com>2011-09-29 13:00:14 +0200
committerPhilipp Reisner <philipp.reisner@linbit.com>2012-11-08 16:58:04 +0100
commit9bcd2521827bb7c418a83a77474c449d6496d55c (patch)
treeaae5995f4d1d6b72d0a7ccd30d31fab01be29a45 /drivers/block/drbd/drbd_nl.c
parent22d81140aea85f9ac388fa12768dc502ef00eaae (diff)
drbd: fix "stalled" empty resync
With sync-after dependencies, given "lucky" timing of pause/unpause events, and the end of an empty (0 bits set) resync was sometimes not detected on the SyncTarget, leading to a "stalled" SyncSource state. Fixed this by expecting not only "Inconsistent -> UpToDate" but also "Consistent -> UpToDate" transitions for the peer disk state to end a resync. 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_nl.c')
-rw-r--r--drivers/block/drbd/drbd_nl.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c
index e64b1c897c82..16c3710e1b9c 100644
--- a/drivers/block/drbd/drbd_nl.c
+++ b/drivers/block/drbd/drbd_nl.c
@@ -2262,7 +2262,7 @@ int drbd_adm_resize(struct sk_buff *skb, struct genl_info *info)
if (rs.no_resync && mdev->tconn->agreed_pro_version < 93) {
retcode = ERR_NEED_APV_93;
- goto fail;
+ goto fail_ldev;
}
rcu_read_lock();
@@ -2272,7 +2272,7 @@ int drbd_adm_resize(struct sk_buff *skb, struct genl_info *info)
new_disk_conf = kmalloc(sizeof(struct disk_conf), GFP_KERNEL);
if (!new_disk_conf) {
retcode = ERR_NOMEM;
- goto fail;
+ goto fail_ldev;
}
}
@@ -2310,6 +2310,10 @@ int drbd_adm_resize(struct sk_buff *skb, struct genl_info *info)
fail:
drbd_adm_finish(info, retcode);
return 0;
+
+ fail_ldev:
+ put_ldev(mdev);
+ goto fail;
}
int drbd_adm_resource_opts(struct sk_buff *skb, struct genl_info *info)