1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00

Don't suppress identical table reloads if permission changes.

This commit is contained in:
Alasdair Kergon 2006-06-14 22:00:03 +00:00
parent b36647598b
commit b4fb7af1df
2 changed files with 8 additions and 6 deletions

View File

@ -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.

View 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 */