drbd: Turn no-disk-flushes into disk-flushes={yes|no}
authorAndreas Gruenbacher <agruen@linbit.com>
Wed, 4 May 2011 13:25:35 +0000 (15:25 +0200)
committerPhilipp Reisner <philipp.reisner@linbit.com>
Thu, 8 Nov 2012 15:55:45 +0000 (16:55 +0100)
Change the --no-disk-flushes drbdsetup command line option as well as
the no_disk_flush netlink packet.

Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
drivers/block/drbd/drbd_receiver.c
include/linux/drbd_genl.h

index 83d39859a9fe7435d57742d7b6cdfb739654c747..e7a6eeae94e2d29d71ff840d3ff6cb8b22baa409 100644 (file)
@@ -1179,7 +1179,7 @@ void drbd_bump_write_ordering(struct drbd_conf *mdev, enum write_ordering_e wo)
        rcu_read_lock();
        dc = rcu_dereference(mdev->ldev->disk_conf);
 
-       if (wo == WO_bdev_flush && dc->no_disk_flush)
+       if (wo == WO_bdev_flush && !dc->disk_flushes)
                wo = WO_drain_io;
        if (wo == WO_drain_io && dc->no_disk_drain)
                wo = WO_none;
index f143e3c0f33b0257b5672faf7b89052fe0050a06..945c4dd3470ccd61da21fb0c7d5ad37eafe739f4 100644 (file)
@@ -122,8 +122,8 @@ GENL_struct(DRBD_NLA_DISK_CONF, 3, disk_conf,
        __u32_field_def(14,     GENLA_F_MANDATORY,      c_max_rate, DRBD_C_MAX_RATE_DEF)
        __u32_field_def(15,     GENLA_F_MANDATORY,      c_min_rate, DRBD_C_MIN_RATE_DEF)
 
-       __flg_field_def(16, GENLA_F_MANDATORY,  no_disk_barrier, 0)
-       __flg_field_def(17, GENLA_F_MANDATORY,  no_disk_flush, 0)
+       __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(19, GENLA_F_MANDATORY,  no_md_flush, 0)
 )