[PATCH 13/15] drbd: Turn no-disk-drain into disk-drain={yes|no}

From: Philipp Reisner
Date: Thu Oct 06 2011 - 09:39:56 EST


From: Andreas Gruenbacher <agruen@xxxxxxxxxx>

Change the --no-disk-drain drbdsetup command line option as well as
the no_disk_drain netlink packet.

Signed-off-by: Philipp Reisner <philipp.reisner@xxxxxxxxxx>
Signed-off-by: Lars Ellenberg <lars.ellenberg@xxxxxxxxxx>
---
drivers/block/drbd/drbd_receiver.c | 2 +-
include/linux/drbd_genl.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c
index 1024f04..a80f064 100644
--- a/drivers/block/drbd/drbd_receiver.c
+++ b/drivers/block/drbd/drbd_receiver.c
@@ -1181,7 +1181,7 @@ void drbd_bump_write_ordering(struct drbd_conf *mdev, enum write_ordering_e wo)

if (wo == WO_bdev_flush && !dc->disk_flushes)
wo = WO_drain_io;
- if (wo == WO_drain_io && dc->no_disk_drain)
+ if (wo == WO_drain_io && !dc->disk_drain)
wo = WO_none;
rcu_read_unlock();
mdev->write_ordering = wo;
diff --git a/include/linux/drbd_genl.h b/include/linux/drbd_genl.h
index c5e7a99..96e5b18 100644
--- a/include/linux/drbd_genl.h
+++ b/include/linux/drbd_genl.h
@@ -126,7 +126,7 @@ GENL_struct(DRBD_NLA_DISK_CONF, 3, disk_conf,

__flg_field_def(16, GENLA_F_MANDATORY, disk_barrier, 1)
__flg_field_def(17, GENLA_F_MANDATORY, disk_flushes, 1)
- __flg_field_def(18, GENLA_F_MANDATORY, no_disk_drain, 0)
+ __flg_field_def(18, GENLA_F_MANDATORY, disk_drain, 1)
__flg_field_def(19, GENLA_F_MANDATORY, no_md_flush, 0)
)

--
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/