]> sourceware.org Git - dm.git/commitdiff
Don't suppress identical table reloads if permission changes.
authorAlasdair Kergon <agk@redhat.com>
Wed, 14 Jun 2006 22:00:03 +0000 (22:00 +0000)
committerAlasdair Kergon <agk@redhat.com>
Wed, 14 Jun 2006 22:00:03 +0000 (22:00 +0000)
WHATS_NEW
lib/ioctl/libdm-iface.c

index 9ef3388e092e8cd2fb22e0cf7e7b0bf4f41b47f6..98d83aeeb870eb17332d395ed6083736c3a9430d 100644 (file)
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
 Version 1.02.08 - 
 =============================
+  Don't suppress identical table reloads if permission changes.
   Fix corelog segment line.
   Suppress some compiler warnings.
 
index a54c27bce497b2c4d6f6cd32ad1cc6b08e95ac46..72594ee697d6a720b0a9b886df8d744d3076f314 100644 (file)
@@ -1461,7 +1461,6 @@ static int _reload_with_suppression_v4(struct dm_task *dmt)
 {
        struct dm_task *task;
        struct target *t1, *t2;
-       int matches = 1;
        int r;
 
        /* New task to get existing table information */
@@ -1491,6 +1490,9 @@ static int _reload_with_suppression_v4(struct dm_task *dmt)
                return r;
        }
 
+       if ((task->dmi.v4->flags & DM_READONLY_FLAG) ? 1 : 0 != dmt->read_only)
+               goto no_match;
+
        t1 = dmt->head;
        t2 = task->head;
 
@@ -1498,21 +1500,20 @@ static int _reload_with_suppression_v4(struct dm_task *dmt)
                if ((t1->start != t2->start) ||
                    (t1->length != t2->length) ||
                    (strcmp(t1->type, t2->type)) ||
-                   (strcmp(t1->params, t2->params))) {
-                       matches = 0;
-                       break;
-               }
+                   (strcmp(t1->params, t2->params)))
+                       goto no_match;
                t1 = t1->next;
                t2 = t2->next;
        }
        
-       if (matches && !t1 && !t2) {
+       if (!t1 && !t2) {
                dmt->dmi.v4 = task->dmi.v4;
                task->dmi.v4 = NULL;
                dm_task_destroy(task);
                return 1;
        }
 
+no_match:
        dm_task_destroy(task);
 
        /* Now do the original reload */
This page took 0.031261 seconds and 5 git commands to generate.