]> sourceware.org Git - lvm2.git/commitdiff
libdm: enable no_flush for driver version > 11
authorZdenek Kabelac <zkabelac@redhat.com>
Mon, 26 Oct 2015 06:37:59 +0000 (07:37 +0100)
committerZdenek Kabelac <zkabelac@redhat.com>
Mon, 26 Oct 2015 06:37:59 +0000 (07:37 +0100)
It appears the driver version 11 has troubles with usage of no_flush
So require at least version 12.

libdm/ioctl/libdm-iface.c

index 58a8dfe51123e25c5627020a083803391d4efc42..2a36b77b105f0ce366319d35201fed0ae85de890 100644 (file)
@@ -1202,8 +1202,13 @@ static struct dm_ioctl *_flatten(struct dm_task *dmt, unsigned repeat_count)
 
        if (dmt->type == DM_DEVICE_SUSPEND)
                dmi->flags |= DM_SUSPEND_FLAG;
-       if (dmt->no_flush)
-               dmi->flags |= DM_NOFLUSH_FLAG;
+       if (dmt->no_flush) {
+               if (_dm_version_minor < 12)
+                       log_verbose("No flush flag unsupported by kernel. "
+                                   "Buffers will be flushed.");
+               else
+                       dmi->flags |= DM_NOFLUSH_FLAG;
+       }
        if (dmt->read_only)
                dmi->flags |= DM_READONLY_FLAG;
        if (dmt->skip_lockfs)
This page took 0.040857 seconds and 5 git commands to generate.