Woops,
Do not use 'ss' after it has been used as a list iterator. Besides,
each snapshare needs to have its associated table notified of the event.
Will send replacement patch shortly.
Bug was caught by QA department's snapshot tests - specifically,
overfilling the snapshot.
brassow
On Mar 19, 2009, at 4:37 PM, Jonathan Brassow wrote:
static void __invalidate_snapshot(struct dm_snapshot *s, int err)
{
+ struct dm_snapshare *ss;
char *tmp_str = "ES_INVALIDATE";
if (!s->valid)
@@ -734,12 +823,15 @@ static void __invalidate_snapshot(struct
else if (err == -ENOMEM)
DMERR("Invalidating snapshot: Unable to allocate exception.");
- if (s->store->type->message)
- s->store->type->message(s->store, 1, &tmp_str);
+
+ /* Invalidating the snapshot will invalidate all snapshares. */
+ list_for_each_entry(ss, &s->shared_list, shared_list)
+ if (ss->store->type->message)
+ ss->store->type->message(ss->store, 1, &tmp_str);
s->valid = 0;
- dm_table_event(s->store->ti->table);
+ dm_table_event(ss->store->ti->table);
}
--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel