Mikulas Patocka 35bf659b00 dm snapshot: avoid having two exceptions for the same chunk
We need to check if the exception was completed after dropping the lock.

After regaining the lock, __find_pending_exception checks if the exception
was already placed into &s->pending hash.

But we don't check if the exception was already completed and placed into
&s->complete hash. If the process waiting in alloc_pending_exception was
delayed at this point because of a scheduling latency and the exception
was meanwhile completed, we'd miss that and allocate another pending
exception for already completed chunk.

It would lead to a situation where two records for the same chunk exist
and potential data corruption because multiple snapshot I/Os to the
affected chunk could be redirected to different locations in the
snapshot.

Cc: stable@kernel.org
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2009-04-02 19:55:26 +01:00
..
2006-01-01 22:21:50 +01:00
2007-10-20 02:01:11 +01:00
2009-04-02 19:55:24 +01:00
2009-01-06 03:05:12 +00:00
2009-01-06 03:05:10 +00:00
2007-10-20 02:01:26 +01:00
2009-01-06 03:05:12 +00:00
2009-03-04 00:57:25 -07:00
2008-02-06 10:41:18 -08:00
2009-02-25 13:18:47 +11:00
2005-09-17 11:49:58 -07:00
2005-04-16 15:20:36 -07:00
2007-10-29 07:41:32 -07:00
2005-04-16 15:20:36 -07:00
2007-10-29 07:41:32 -07:00
2007-10-29 07:41:32 -07:00
2007-10-29 07:41:32 -07:00
2009-02-25 13:18:47 +11:00
2005-04-16 15:20:36 -07:00