From 916cd9b2c88ee93cad985baf8066ee0a7acbb4c3 Mon Sep 17 00:00:00 2001 From: Mikulas Patocka Date: Thu, 2 Apr 2009 19:55:26 +0100 Subject: [PATCH] --- yaml --- r: 140156 b: refs/heads/master c: 35bf659b008e83e725dcd30f542e38461dbb867c h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/md/dm-snap.c | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 79a00331be5e..28af6d7a9bc6 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c66213921c816f6b1b16a84911618ba9a363b134 +refs/heads/master: 35bf659b008e83e725dcd30f542e38461dbb867c diff --git a/trunk/drivers/md/dm-snap.c b/trunk/drivers/md/dm-snap.c index eb7291a84203..462750c66319 100644 --- a/trunk/drivers/md/dm-snap.c +++ b/trunk/drivers/md/dm-snap.c @@ -1080,6 +1080,13 @@ static int snapshot_map(struct dm_target *ti, struct bio *bio, goto out_unlock; } + e = lookup_exception(&s->complete, chunk); + if (e) { + free_pending_exception(pe); + remap_exception(s, e, bio, chunk); + goto out_unlock; + } + pe = __find_pending_exception(s, pe, chunk); if (!pe) { __invalidate_snapshot(s, -ENOMEM); @@ -1226,6 +1233,12 @@ static int __origin_write(struct list_head *snapshots, struct bio *bio) goto next_snapshot; } + e = lookup_exception(&snap->complete, chunk); + if (e) { + free_pending_exception(pe); + goto next_snapshot; + } + pe = __find_pending_exception(snap, pe, chunk); if (!pe) { __invalidate_snapshot(snap, -ENOMEM);