diff mbox

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

Message ID 200905011421.n41ELa5r030782@hydrogen.msp.redhat.com (mailing list archive)
State Superseded, archived
Delegated to: Alasdair Kergon
Headers show

Commit Message

Jonthan Brassow May 1, 2009, 2:21 p.m. UTC
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@redhat.com>


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

Patch

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);