[PATCH 31 of 33] DM Snapshot: change parameters to __lookup_pending_exception

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

 



Patch name: dm-snap-change-parameters-to-__lookup_pending_exception.patch

Change the parameter to '__lookup_pending_exception' so that it takes
the exception table, not the snapshot structure.  This is necessary
for future patches, because other structures (in addition to dm_snapshot)
will have exception tables that this function will need to operate on.

Signed-off-by: Jonathan Brassow <jbrassow@xxxxxxxxxx>

Index: linux-2.6/drivers/md/dm-snap.c
===================================================================
--- linux-2.6.orig/drivers/md/dm-snap.c
+++ linux-2.6/drivers/md/dm-snap.c
@@ -834,9 +834,9 @@ static void start_copy(struct dm_snap_pe
 }
 
 static struct dm_snap_pending_exception *
-__lookup_pending_exception(struct dm_snapshot *s, chunk_t chunk)
+__lookup_pending_exception(struct dm_exception_table *pending, chunk_t chunk)
 {
-	struct dm_exception *e = dm_lookup_exception(s->pending, chunk);
+	struct dm_exception *e = dm_lookup_exception(pending, chunk);
 
 	if (!e)
 		return NULL;
@@ -865,7 +865,7 @@ __find_pending_exception(struct dm_snaps
 {
 	struct dm_snap_pending_exception *pe2;
 
-	pe2 = __lookup_pending_exception(s, chunk);
+	pe2 = __lookup_pending_exception(s->pending, chunk);
 	if (pe2) {
 		dm_free_exception(s->pending, &pe->e);
 		return pe2;
@@ -949,7 +949,7 @@ static int snapshot_map(struct dm_target
 	 * writeable.
 	 */
 	if (bio_rw(bio) == WRITE) {
-		pe = __lookup_pending_exception(s, chunk);
+		pe = __lookup_pending_exception(s->pending, chunk);
 		if (!pe) {
 			up_write(&s->lock);
 			tmp_e = dm_alloc_exception(s->pending);
@@ -1154,7 +1154,7 @@ static int __origin_write(struct list_he
 		 */
 		BUG_ON(rtn != -ENOENT);
 
-		pe = __lookup_pending_exception(snap, chunk);
+		pe = __lookup_pending_exception(snap->pending, chunk);
 		if (!pe) {
 			up_write(&snap->lock);
 			tmp_e = dm_alloc_exception(snap->pending);

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel

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

  Powered by Linux