diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c index c5aa08474a35d6b00dc2146f1792961e41ce8e04..ce9f4ca55ce20f391951022d9402c3efa1ff60f6 100644 --- a/drivers/block/drbd/drbd_nl.c +++ b/drivers/block/drbd/drbd_nl.c @@ -1229,6 +1229,9 @@ int drbd_adm_disk_opts(struct sk_buff *skb, struct genl_info *info) } mutex_unlock(&mdev->tconn->conf_update); + + drbd_bump_write_ordering(mdev->tconn, WO_bdev_flush); + drbd_md_sync(mdev); if (mdev->state.conn >= C_CONNECTED) diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c index 786a75510798426ccd142d1c27d2ffbff8035c15..e8cd4c4acc65df5b1d4501d8a643d73aa6b52f55 100644 --- a/drivers/block/drbd/drbd_receiver.c +++ b/drivers/block/drbd/drbd_receiver.c @@ -1229,7 +1229,7 @@ void drbd_bump_write_ordering(struct drbd_tconn *tconn, enum write_ordering_e wo wo = min(pwo, wo); rcu_read_lock(); idr_for_each_entry(&tconn->volumes, mdev, vnr) { - if (!get_ldev(mdev)) + if (!get_ldev_if_state(mdev, D_ATTACHING)) continue; dc = rcu_dereference(mdev->ldev->disk_conf);