summaryrefslogtreecommitdiff
path: root/drivers/block/drbd
diff options
context:
space:
mode:
authorLars Ellenberg <lars.ellenberg@linbit.com>2012-10-26 00:41:50 +0200
committerPhilipp Reisner <philipp.reisner@linbit.com>2012-12-06 13:00:04 +0100
commit691631c0652bc47e6d20b0d981e23a9025fd794e (patch)
tree86f1b42988865dc1e43aba9a76b1a421b2f4144c /drivers/block/drbd
parent298307ed1d2ac4815b0ce9a5f1c9cc643f4a9aca (diff)
downloadlwn-691631c0652bc47e6d20b0d981e23a9025fd794e.tar.gz
lwn-691631c0652bc47e6d20b0d981e23a9025fd794e.zip
drbd: respect no-md-barriers setting also when changed online via disk-options
We need to propagate the configuration into the flag bits, or it won't be effective. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block/drbd')
-rw-r--r--drivers/block/drbd/drbd_nl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c
index 76bb3a684b86..536f94a1ba5d 100644
--- a/drivers/block/drbd/drbd_nl.c
+++ b/drivers/block/drbd/drbd_nl.c
@@ -1230,6 +1230,11 @@ int drbd_adm_disk_opts(struct sk_buff *skb, struct genl_info *info)
else
mdev->ldev->md.flags |= MDF_AL_DISABLED;
+ if (new_disk_conf->md_flushes)
+ clear_bit(MD_NO_FUA, &mdev->flags);
+ else
+ set_bit(MD_NO_FUA, &mdev->flags);
+
drbd_bump_write_ordering(mdev->tconn, WO_bdev_flush);
drbd_md_sync(mdev);