diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM index e89ead0d3..e76087588 100644 --- a/WHATS_NEW_DM +++ b/WHATS_NEW_DM @@ -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. diff --git a/libdm/libdm-deptree.c b/libdm/libdm-deptree.c index ef283e9c0..afdce8d72 100644 --- a/libdm/libdm-deptree.c +++ b/libdm/libdm-deptree.c @@ -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 */