[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1241105757.3320.1.camel@mulgrave.int.hansenpartnership.com>
Date: Thu, 30 Apr 2009 10:35:57 -0500
From: James Bottomley <James.Bottomley@...senPartnership.com>
To: Boaz Harrosh <bharrosh@...asas.com>
Cc: Tejun Heo <tj@...nel.org>, axboe@...nel.dk,
linux-kernel@...r.kernel.org, jeff@...zik.org,
linux-ide@...r.kernel.org, linux-scsi@...r.kernel.org,
bzolnier@...il.com, petkovbb@...glemail.com,
sshtylyov@...mvista.com, mike.miller@...com,
chirag.kantharia@...com, Eric.Moore@....com,
stern@...land.harvard.edu, fujita.tomonori@....ntt.co.jp,
zaitcev@...hat.com, Geert.Uytterhoeven@...ycom.com,
sfr@...b.auug.org.au, grant.likely@...retlab.ca,
paul.clements@...eleye.com, jesper.juhl@...il.com,
tim@...erelk.net, jeremy@...source.com, adrian@...en.demon.co.uk,
oakad@...oo.com, dwmw2@...radead.org, schwidefsky@...ibm.com,
ballabio_dario@....com, davem@...emloft.net, rusty@...tcorp.com.au,
Markus.Lidel@...dowconnect.com,
"Darrick J. Wong" <djwong@...ibm.com>
Subject: Re: [PATCH 08/10] block: cleanup rq->data_len usages
On Thu, 2009-04-30 at 16:47 +0300, Boaz Harrosh wrote:
> > @@ -966,7 +965,7 @@ static int scsi_init_sgtable(struct request
> *req, struct scsi_data_buffer *sdb,
> > BUG_ON(count > sdb->table.nents);
> > sdb->table.nents = count;
> > if (blk_pc_request(req))
> > - sdb->length = req->data_len;
> > + sdb->length = blk_rq_bytes(req);
> > else
> > sdb->length = blk_rq_sectors(req) << 9;
>
> Is this true. I thought they must be the same now. I was actually
> anticipating this if() removed.
Me too ... there's one of these in scsi_lib.c as well.
The difference comes because filesystem requests are always in sectors,
but BLOCK_PC requests are always in bytes .... we should be able to wrap
the accessors so they do the correct conversions.
James
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists