From axboe@suse.de Thu Mar 17 19:53:03 2005
Return-Path: <axboe@suse.de>
X-Original-To: con@kolivas.org
Delivered-To: con@kolivas.org
Received: from bhhdoa.org.au (bhhdoa.org.au [216.17.101.199])
	by mail.kolivas.org (Postfix) with ESMTP id 9282BC5C97
	for <con@kolivas.org>; Thu, 17 Mar 2005 19:53:07 +1100 (EST)
Received: from virtualhost.dk (ns.virtualhost.dk [195.184.98.160])
	by bhhdoa.org.au (Postfix) with ESMTP id 437335140F
	for <con@kolivas.org>; Thu, 17 Mar 2005 20:20:23 +1100 (EST)
Received: from [62.242.22.158] (helo=wiggum.home.kernel.dk)
	by virtualhost.dk with esmtp (Exim 3.36 #1)
	id 1DBqka-0006FN-00
	for con@kolivas.org; Thu, 17 Mar 2005 09:53:04 +0100
Received: from axboe by wiggum.home.kernel.dk with local (Exim 4.44)
	id 1DBqkZ-0000D3-Ds
	for con@kolivas.org; Thu, 17 Mar 2005 09:53:03 +0100
Date: Thu, 17 Mar 2005 09:53:03 +0100
From: Jens Axboe <axboe@suse.de>
To: con@kolivas.org
Subject: [axboe@suse.de: Re: [PATCH] fix accounting with prioritized bio's]
Message-ID: <20050317085303.GO7842@suse.de>
Mime-Version: 1.0
Content-Type: text/plain;
  charset=us-ascii
Content-Disposition: inline
X-UID: 804
X-Length: 2265
Status: R
X-Status: NC
X-KMail-EncryptionState:  
X-KMail-SignatureState:  
X-KMail-MDN-Sent:  
X-Spam-Checker-Version: SpamAssassin 3.0.0 (2004-09-13) on localhost
X-Spam-Level: 
X-Spam-Status: No, score=-0.7 required=5.0 tests=AWL,BAYES_00,
	FORGED_RCVD_HELO autolearn=ham version=3.0.0

Hi,

You want this one as well, it affects accounting with prio requests.

----- Forwarded message from Jens Axboe <axboe@suse.de> -----

From: Jens Axboe <axboe@suse.de>
Date: Tue, 15 Mar 2005 09:14:30 +0100
To: Andrew Morton <akpm@osdl.org>
Subject: Re: [PATCH] fix accounting with prioritized bio's

On Tue, Mar 15 2005, Jens Axboe wrote:
> Hi Andrew,
> 
> blk_partition_remap() needs to use bio_data_dir(), as bio->bi_rw can
> contain prio bits as well.

Damn, should just be bio_data_dir(bio) of course.

***

blk_partition_remap() needs to use bio_data_dir(), as bio->bi_rw can
contain prio bits as well.

Signed-off-by: Jens Axboe <axboe@suse.de>

Index: linux-2.6.11-ck7/drivers/block/ll_rw_blk.c
===================================================================
--- linux-2.6.11-ck7.orig/drivers/block/ll_rw_blk.c	2005-05-01 10:36:04.000000000 +1000
+++ linux-2.6.11-ck7/drivers/block/ll_rw_blk.c	2005-05-01 10:36:06.000000000 +1000
@@ -2519,7 +2519,7 @@ static inline void blk_partition_remap(s
 	if (bdev != bdev->bd_contains) {
 		struct hd_struct *p = bdev->bd_part;
 
-		switch (bio->bi_rw) {
+		switch (bio_data_dir(bio)) {
 		case READ:
 			p->read_sectors += bio_sectors(bio);
 			p->reads++;

