]> git.karo-electronics.de Git - linux-beck.git/commitdiff
drbd: Turn no-md-flushes into md-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:46 +0000 (16:55 +0100)
Change the --no-md-flushes drbdsetup command line option as well as
the no_md_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_nl.c
include/linux/drbd_genl.h

index 9af097416e2646f3816d9469a56c5a6358ae6332..4a946a877bdebafa17af6ca21b99828b9537548d 100644 (file)
@@ -1449,10 +1449,10 @@ int drbd_adm_attach(struct sk_buff *skb, struct genl_info *info)
 
        /* Reset the "barriers don't work" bits here, then force meta data to
         * be written, to ensure we determine if barriers are supported. */
-       if (new_disk_conf->no_md_flush)
-               set_bit(MD_NO_FUA, &mdev->flags);
-       else
+       if (new_disk_conf->md_flushes)
                clear_bit(MD_NO_FUA, &mdev->flags);
+       else
+               set_bit(MD_NO_FUA, &mdev->flags);
 
        /* Point of no return reached.
         * Devices and memory are no longer released by error cleanup below.
index 30ad6600b4449ef31937c40e961c57464b2093a1..53518fc231543b4e57db48e758dbe0b58e88ba52 100644 (file)
@@ -125,7 +125,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,  disk_drain, 1)
-       __flg_field_def(19, GENLA_F_MANDATORY,  no_md_flush, 0)
+       __flg_field_def(19, GENLA_F_MANDATORY,  md_flushes, 1)
 )
 
 GENL_struct(DRBD_NLA_RESOURCE_OPTS, 4, res_opts,