From: Zdenek Kabelac <zkabelac@fedoraproject.org>
To: lvm-devel@redhat.com
Subject: master - libdm: enable no_flush for driver version > 11
Date: Mon, 26 Oct 2015 06:39:12 +0000 (UTC) [thread overview]
Message-ID: <20151026063912.5586460EE7@fedorahosted.org> (raw)
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=428ca9b1207eba53ffc721bd9e528a1a148128c2
Commit: 428ca9b1207eba53ffc721bd9e528a1a148128c2
Parent: f898cf7539149a54a121b0aae59076c2d647bb37
Author: Zdenek Kabelac <zkabelac@redhat.com>
AuthorDate: Mon Oct 26 07:37:59 2015 +0100
Committer: Zdenek Kabelac <zkabelac@redhat.com>
CommitterDate: Mon Oct 26 07:37:59 2015 +0100
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.
---
libdm/ioctl/libdm-iface.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/libdm/ioctl/libdm-iface.c b/libdm/ioctl/libdm-iface.c
index 58a8dfe..2a36b77 100644
--- a/libdm/ioctl/libdm-iface.c
+++ b/libdm/ioctl/libdm-iface.c
@@ -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)
next reply other threads:[~2015-10-26 6:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-26 6:39 Zdenek Kabelac [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-10-26 6:35 master - libdm: enable no_flush for driver version > 11 Zdenek Kabelac
2015-10-25 22:46 Zdenek Kabelac
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151026063912.5586460EE7@fedorahosted.org \
--to=zkabelac@fedoraproject.org \
--cc=lvm-devel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.