All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Brassow <jbrassow@redhat.com>
To: dm-devel@redhat.com
Subject: [PATCH 31 of 33] DM Snapshot: change parameters to __lookup_pending_exception
Date: Fri, 1 May 2009 09:21:36 -0500	[thread overview]
Message-ID: <200905011421.n41ELa5r030782@hydrogen.msp.redhat.com> (raw)

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>

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

             reply	other threads:[~2009-05-01 14:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-01 14:21 Jonathan Brassow [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-04-06 21:37 [PATCH 31 of 33] DM Snapshot: change parameters to __lookup_pending_exception Jonathan Brassow
2009-03-25 21:38 Jonathan Brassow

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200905011421.n41ELa5r030782@hydrogen.msp.redhat.com \
    --to=jbrassow@redhat.com \
    --cc=dm-devel@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.