mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hirokazu Takahashi <taka@valinux.co.jp>
To: jens.axboe@oracle.com, agk@sourceware.org
Cc: dm-devel@redhat.com, linux-kernel@vger.kernel.org
Subject: [RFC][PATCH 3/10] I/O context inheritance
Date: Tue, 22 Apr 2008 22:53:55 +0900 (JST)	[thread overview]
Message-ID: <20080422.225355.07850141.taka@valinux.co.jp> (raw)
In-Reply-To: <20080422.224935.00673711.taka@valinux.co.jp>


Make every bio points the iocontext of the process which originally
generated an I/O request. (part 2)

 - Assign the iocontext which the source bio has to a bio when it is
   allocated as a bounce buffer.
 - Assign the iocontext which the source bio has to bios when the source
   bio is split into several ones, which some device mapper modules require.

Signed-off-by: Hirokazu Takahashi <taka@valinux.co.jp>


--- linux-2.6.25.bio0/mm/bounce.c	2008-04-22 15:48:32.000000000 +0900
+++ linux-2.6.25/mm/bounce.c	2008-04-22 15:51:33.000000000 +0900
@@ -195,8 +195,11 @@ static void __blk_queue_bounce(struct re
 		/*
 		 * irk, bounce it
 		 */
-		if (!bio)
+		if (!bio) {
 			bio = bio_alloc(GFP_NOIO, (*bio_orig)->bi_vcnt);
+			put_io_context(bio->bi_io_context);
+			bio->bi_io_context = ioc_object_link((*bio_orig)->bi_io_context);
+		}
 
 		to = bio->bi_io_vec + i;
 
--- linux-2.6.25.bio0/drivers/md/dm.c	2008-04-22 15:48:33.000000000 +0900
+++ linux-2.6.25/drivers/md/dm.c	2008-04-22 17:16:49.000000000 +0900
@@ -665,6 +665,7 @@ static struct bio *split_bvec(struct bio
 	clone->bi_size = to_bytes(len);
 	clone->bi_io_vec->bv_offset = offset;
 	clone->bi_io_vec->bv_len = clone->bi_size;
+	clone->bi_io_context = ioc_object_link(bio->bi_io_context);
 
 	return clone;
 }

  parent reply	other threads:[~2008-04-22 13:54 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-22 13:49 taka
2008-04-22 13:51 ` [RFC][PATCH 1/10] I/O context inheritance Hirokazu Takahashi
2008-04-22 13:53 ` [RFC][PATCH 2/10] " Hirokazu Takahashi
2008-04-22 13:53 ` Hirokazu Takahashi [this message]
2008-04-22 13:54 ` [RFC][PATCH 4/10] " Hirokazu Takahashi
2008-04-22 13:55 ` [RFC][PATCH 5/10] " Hirokazu Takahashi
2008-04-22 13:55 ` [RFC][PATCH 6/10] " Hirokazu Takahashi
2008-04-22 13:57 ` [RFC][PATCH 7/10] " Hirokazu Takahashi
2008-04-22 13:58 ` [RFC][PATCH 8/10] " Hirokazu Takahashi
2008-04-22 13:59 ` [RFC][PATCH 9/10] " Hirokazu Takahashi
2008-04-22 14:00 ` [RFC][PATCH 10/10] " Hirokazu Takahashi
2008-04-22 14:03 ` [RFC][PATCH 0/10] " Hirokazu Takahashi
2008-04-22 14:54   ` Jens Axboe
2008-04-22 18:10     ` [dm-devel] " Dan Williams
2008-04-23  3:27       ` Hirokazu Takahashi

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=20080422.225355.07850141.taka@valinux.co.jp \
    --to=taka@valinux.co.jp \
    --cc=agk@sourceware.org \
    --cc=dm-devel@redhat.com \
    --cc=jens.axboe@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®