Le 11/01/2016 17:32, John Ferlan a écrit :
On 01/11/2016 12:50 PM, Joe Harvell wrote:
John/Jan:
I actually made a patch similar to this and was about to submit it for
review. Now I see there is a more thorough version here already
submitted just over a year ago. I don't see any evidence of this in
the git repo. Are there any plans to commit it?
---
Joe Harvell
--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list
I was referring to John's patch posted on 12 Dec 2014.
For those that don't keep that much history in their mailbox...
http://www.redhat.com/archives/libvir-list/2014-December/msg00706.html
There's also a related bz:
https://bugzilla.redhat.com/show_bug.cgi?id=1060287
So from my perspective, this has languished in one of my local git
branches. I got busy with other things and this has never really
surfaced to anywhere near the top of my todo list.
John
That's what I suspected. If the testing part is why it's languishing,
here is a simpler patch with less functionality. This patch just makes
Thin LVs and Snapshot Thin LVs (once you activate them) detectable by
libvirt. Would it be worth me submitting this as a patch?
---
Joe
diff -ur a/src/storage/storage_backend_logical.c b/src/storage/storage_backend_logical.c
--- a/src/storage/storage_backend_logical.c 2015-10-29 01:35:32.000000000 -0500
+++ b/src/storage/storage_backend_logical.c 2016-01-11 10:22:36.807282623 -0600
@@ -64,8 +64,6 @@
}
-#define VIR_STORAGE_VOL_LOGICAL_SEGTYPE_STRIPED "striped"
-
struct virStorageBackendLogicalPoolVolData {
virStoragePoolObjPtr pool;
virStorageVolDefPtr vol;
@@ -165,13 +163,11 @@
VIR_STORAGE_VOL_OPEN_DEFAULT) < 0)
goto cleanup;
- nextents = 1;
- if (STREQ(groups[4], VIR_STORAGE_VOL_LOGICAL_SEGTYPE_STRIPED)) {
- if (virStrToLong_i(groups[5], NULL, 10, &nextents) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("malformed volume extent stripes value"));
- goto cleanup;
- }
+ nextents = 0;
+ if (virStrToLong_i(groups[5], NULL, 10, &nextents) < 0) {
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("malformed volume extent stripes value"));
+ goto cleanup;
}
/* Finally fill in extents information */
@@ -227,14 +223,15 @@
goto cleanup;
}
- err = regexec(reg, groups[3], nvars, vars, 0);
- regfree(reg);
- if (err != 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("malformed volume extent devices value"));
- goto cleanup;
+ if(groups[3] != NULL && *groups[3] != '\0') {
+ err = regexec(reg, groups[3], nvars, vars, 0);
+ regfree(reg);
+ if (err != 0) {
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("malformed volume extent devices value"));
+ goto cleanup;
+ }
}
-
p = groups[3];
/* vars[0] is skipped */
@@ -311,7 +308,8 @@
* striped, so "," is not a suitable separator either (rhbz 727474).
*/
const char *regexes[] = {
- "^\\s*(\\S+)#(\\S*)#(\\S+)#(\\S+)#(\\S+)#([0-9]+)#(\\S+)#([0-9]+)#([0-9]+)#(\\S+)#?\\s*$"
+// name orig uuid devs sgtype stripes segsz vgextsz sz lvattr
+ "^\\s*(\\S+)#(\\S*)#(\\S+)#(\\S*)#(\\S+)#([0-9]+)#(\\S+)#([0-9]+)#([0-9]+)#(\\S+)#?\\s*$"
};
int vars[] = {
10
--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list