[dm-devel] [PATCH] 2.6.0-t6-mm1-dm2: 5/7: Check pe->started flag

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Need to check the pe->started flag before calling start_copy(), or chunks may
be copied multiple times.

--- a/drivers/md/dm-snapshot.c	2003-10-20 12:21:30.000000000 -0500
+++ b/drivers/md/dm-snapshot.c	2003-10-20 12:10:36.000000000 -0500
@@ -1055,19 +1055,12 @@
 			down_write(&pe->snap->lock);
 			if (first)
 				queue_bio(&pe->origin_bios, bio);
-
-#if 0
 			if (!pe->started) {
 				pe->started = 1;
 				up_write(&pe->snap->lock);
 				start_copy(pe);
 			} else
 				up_write(&pe->snap->lock);
-#else
-			pe->started = 1;
-			up_write(&pe->snap->lock);
-			start_copy(pe);
-#endif
 			first = 0;
 			pe = list_entry(pe->siblings.next,
 					struct pending_exception, siblings);




[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux