From: Shaohua Li <shli@kernel.org>
To: Vivek Goyal <vgoyal@redhat.com>, "axboe@kernel.dk" <axboe@kernel.dk>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"neilb@suse.de" <neilb@suse.de>,
martin.petersen@oracle.com
Subject: [patch 2/2]scsi: use correct API to get request position and size
Date: Wed, 21 Mar 2012 20:14:40 +0800 [thread overview]
Message-ID: <4F69C630.3000604@kernel.org> (raw)
Let sd driver use correct API to get request position and size.
Signed-off-by: Shaohua Li <shli@fusionio.com>
---
drivers/scsi/sd.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
Index: linux/drivers/scsi/sd.c
===================================================================
--- linux.orig/drivers/scsi/sd.c 2012-03-21 18:09:55.302320287 +0800
+++ linux/drivers/scsi/sd.c 2012-03-21 18:17:50.705774450 +0800
@@ -539,9 +539,8 @@ static void sd_config_discard(struct scs
static int scsi_setup_discard_cmnd(struct scsi_device *sdp, struct
request *rq)
{
struct scsi_disk *sdkp = scsi_disk(rq->rq_disk);
- struct bio *bio = rq->bio;
- sector_t sector = bio->bi_sector;
- unsigned int nr_sectors = bio_sectors(bio);
+ sector_t sector = blk_rq_pos(rq);
+ unsigned int nr_sectors = blk_rq_sectors(rq);
unsigned int len;
int ret;
char *buf;
reply other threads:[~2012-03-21 12:14 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=4F69C630.3000604@kernel.org \
--to=shli@kernel.org \
--cc=axboe@kernel.dk \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=neilb@suse.de \
--cc=vgoyal@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox