From patchwork Mon Aug 3 02:13:46 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Gui Jianfeng X-Patchwork-Id: 38821 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 n732Fg8t027369 for ; Mon, 3 Aug 2009 02:15:42 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 AE4CE6197EB; Sun, 2 Aug 2009 22:15:41 -0400 (EDT) Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by listman.util.phx.redhat.com (8.13.1/8.13.1) with ESMTP id n732Fbtw010958 for ; Sun, 2 Aug 2009 22:15:37 -0400 Received: from mx1.redhat.com (mx1.redhat.com [172.16.48.31]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n732FXsn016882; Sun, 2 Aug 2009 22:15:33 -0400 Received: from song.cn.fujitsu.com (cn.fujitsu.com [222.73.24.84] (may be forged)) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n732FJel027271; Sun, 2 Aug 2009 22:15:19 -0400 Received: from tang.cn.fujitsu.com (tang.cn.fujitsu.com [10.167.250.3]) by song.cn.fujitsu.com (Postfix) with ESMTP id 19B4417003F; Mon, 3 Aug 2009 10:15:19 +0800 (CST) Received: from fnst.cn.fujitsu.com (localhost.localdomain [127.0.0.1]) by tang.cn.fujitsu.com (8.13.1/8.13.1) with ESMTP id n732G4vO010371; Mon, 3 Aug 2009 10:16:04 +0800 Received: from [127.0.0.1] (unknown [10.167.141.226]) by fnst.cn.fujitsu.com (Postfix) with ESMTPA id E92EBD40B4; Mon, 3 Aug 2009 10:17:24 +0800 (CST) Message-ID: <4A7647DA.5050607@cn.fujitsu.com> Date: Mon, 03 Aug 2009 10:13:46 +0800 From: Gui Jianfeng User-Agent: Thunderbird 2.0.0.5 (Windows/20070716) MIME-Version: 1.0 To: Vivek Goyal References: <1246564917-19603-1-git-send-email-vgoyal@redhat.com> <1246564917-19603-21-git-send-email-vgoyal@redhat.com> In-Reply-To: <1246564917-19603-21-git-send-email-vgoyal@redhat.com> X-RedHat-Spam-Score: -0.972 X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254 X-Scanned-By: MIMEDefang 2.63 on 172.16.48.31 X-loop: dm-devel@redhat.com Cc: dhaval@linux.vnet.ibm.com, snitzer@redhat.com, peterz@infradead.org, dm-devel@redhat.com, dpshah@google.com, jens.axboe@oracle.com, agk@redhat.com, balbir@linux.vnet.ibm.com, paolo.valente@unimore.it, fernando@oss.ntt.co.jp, mikew@google.com, jmoyer@redhat.com, nauman@google.com, m-ikeda@ds.jp.nec.com, lizf@cn.fujitsu.com, fchecconi@gmail.com, akpm@linux-foundation.org, jbaron@redhat.com, linux-kernel@vger.kernel.org, s-uchida@ap.jp.nec.com, righi.andrea@gmail.com, containers@lists.linux-foundation.org Subject: [dm-devel] Re: [PATCH 20/25] io-controller: map async requests to appropriate cgroup 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 Vivek Goyal wrote: ... > + > +struct io_group *io_get_io_group_bio(struct request_queue *q, struct bio *bio, > + int create) > +{ > + struct page *page = NULL; > + > + /* > + * Determine the group from task context. Even calls from > + * blk_get_request() which don't have any bio info will be mapped > + * to the task's group > + */ > + if (!bio) > + goto sync; > + > + if (bio_barrier(bio)) { > + /* > + * Map barrier requests to root group. May be more special > + * bio cases should come here > + */ > + return q->elevator->efqd.root_group; > + } > + > + /* Map the sync bio to the right group using task context */ > + if (elv_bio_sync(bio)) > + goto sync; > + > +#ifdef CONFIG_TRACK_ASYNC_CONTEXT > + /* Determine the group from info stored in page */ > + page = bio_iovec_idx(bio, 0)->bv_page; > + return io_get_io_group(q, page, create); > +#endif > + > +sync: > + return io_get_io_group(q, NULL, create); Fix build warning. block/elevator-fq.c: In function ‘io_get_io_group_bio’: block/elevator-fq.c:2075: warning: unused variable ‘page’ --- > +} > +EXPORT_SYMBOL(io_get_io_group_bio); > + diff --git a/block/elevator-fq.c b/block/elevator-fq.c index 66b10eb..d304f79 100644 --- a/block/elevator-fq.c +++ b/block/elevator-fq.c @@ -2102,7 +2102,7 @@ struct io_group *io_get_io_group_bio(struct request_queue *q, struct bio *bio, #endif sync: - return io_get_io_group(q, NULL, create); + return io_get_io_group(q, page, create); } EXPORT_SYMBOL(io_get_io_group_bio);