1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

libdm: enable no_flush for driver version > 11

It appears the driver version 11 has troubles with usage of no_flush
So require at least version 12.
This commit is contained in:
Zdenek Kabelac 2015-10-26 07:37:59 +01:00
parent f898cf7539
commit 428ca9b120

View 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)
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)