]> sourceware.org Git - lvm2.git/commitdiff
libdm: enforce writethrough mode for cleaner
authorZdenek Kabelac <zkabelac@redhat.com>
Tue, 13 Oct 2015 12:06:15 +0000 (14:06 +0200)
committerZdenek Kabelac <zkabelac@redhat.com>
Tue, 13 Oct 2015 12:35:48 +0000 (14:35 +0200)
With "cleaner" policy always use 'writethrough' mode.

WHATS_NEW_DM
libdm/libdm-deptree.c

index e89ead0d3ee96c5466db80e85a03b1bfa7815557..e76087588fc10fb0120ea5bd89963dd7efdc9e54 100644 (file)
@@ -1,5 +1,6 @@
 Version 1.02.110 - 
 ======================================
+  Enforce writethrough mode for cleaner policy.
   Add support for recognition and deactivation of MD devices to blkdeactivate.
   Move target status functions out of libdm-deptree.
   Correct use of max_write_behind parameter when generating raid target line.
index ef283e9c0e944fd0ec2c71a1d875b63d720b1000..afdce8d726d4c30177392842508fb0b59577167c 100644 (file)
@@ -3302,7 +3302,8 @@ int dm_tree_node_add_cache_target(struct dm_tree_node *node,
                return_0;
 
        seg->data_block_size = data_block_size;
-       seg->flags = feature_flags;
+       /* Enforce WriteThough mode for cleaner policy */
+       seg->flags = (strcmp(policy_name, "cleaner") == 0) ? DM_CACHE_FEATURE_WRITETHROUGH : feature_flags;
        seg->policy_name = policy_name;
 
        /* FIXME: better validation missing */
This page took 0.045795 seconds and 5 git commands to generate.