From patchwork Fri May 1 14:21:36 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonthan Brassow X-Patchwork-Id: 21450 X-Patchwork-Delegate: agk@redhat.com Received: from hormel.redhat.com (hormel1.redhat.com [209.132.177.33]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n41ELesc016644 for ; Fri, 1 May 2009 14:21:40 GMT Received: from listman.util.phx.redhat.com (listman.util.phx.redhat.com [10.8.4.110]) by hormel.redhat.com (Postfix) with ESMTP id 3E6AB61A739; Fri, 1 May 2009 10:21:39 -0400 (EDT) Received: from int-mx2.corp.redhat.com ([172.16.27.26]) by listman.util.phx.redhat.com (8.13.1/8.13.1) with ESMTP id n41ELbPV010971 for ; Fri, 1 May 2009 10:21:38 -0400 Received: from hydrogen.msp.redhat.com (hydrogen.msp.redhat.com [10.15.80.1]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n41ELbCm030932 for ; Fri, 1 May 2009 10:21:37 -0400 Received: from hydrogen.msp.redhat.com (localhost.localdomain [127.0.0.1]) by hydrogen.msp.redhat.com (8.14.1/8.14.1) with ESMTP id n41ELa0k030783 for ; Fri, 1 May 2009 09:21:36 -0500 Received: (from jbrassow@localhost) by hydrogen.msp.redhat.com (8.14.1/8.14.1/Submit) id n41ELa5r030782 for dm-devel@redhat.com; Fri, 1 May 2009 09:21:36 -0500 Date: Fri, 1 May 2009 09:21:36 -0500 From: Jonathan Brassow Message-Id: <200905011421.n41ELa5r030782@hydrogen.msp.redhat.com> To: dm-devel@redhat.com X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 X-loop: dm-devel@redhat.com Subject: [dm-devel] [PATCH 31 of 33] DM Snapshot: change parameters to __lookup_pending_exception X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.5 Precedence: junk Reply-To: device-mapper development List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com 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 --- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel 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);