All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <jens.axboe@oracle.com>
To: Rene Herman <rene.herman@gmail.com>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, virtualization@lists.osdl.org,
	rusty@rustcorp.com.au, ak@suse.de
Subject: Re: [patch 8/9] lguest: the block driver
Date: Fri, 11 May 2007 14:09:55 +0200	[thread overview]
Message-ID: <20070511120955.GZ4629@kernel.dk> (raw)
In-Reply-To: <46434378.1020900@gmail.com>

On Thu, May 10 2007, Rene Herman wrote:
> On 05/09/2007 12:22 PM, Pekka Enberg wrote:
> 
> >>+static void end_entire_request(struct request *req, int uptodate)
> >>+{
> >>+       if (end_that_request_first(req, uptodate, req->hard_nr_sectors))
> >>+               BUG();
> >>+       add_disk_randomness(req->rq_disk);
> >>+       blkdev_dequeue_request(req);
> >>+       end_that_request_last(req, uptodate);
> >>+}
> >
> >Again, I would prefer this went straight into block/ll_rw_blk.c. Rene
> >and I am using something similar in the new Mitsumi driver although
> >one of us has a bug already, we're using req->nr_sectors for this...
> 
> The req->hard_nr_sectors is specifically marked block layer internal and 
> since nr_sectors is what we're requesting and reading (we can't deal with 
> partial transfers anyway since the drive won't tell us where it failed as 
> far as I've been able to see and we do want to make read requests for as 
> many sectors as possible at a time for speed) I believe that in our case 
> the nr_sectors is fine.

Using ->nr_sectors is fine, IFF you don't modify ->nr_sectors in the
driver. The generic helper will use ->hard_nr_sectors.

-- 
Jens Axboe

      reply	other threads:[~2007-05-11 12:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-09  9:51 [patch 8/9] lguest: the block driver akpm
2007-05-09 10:22 ` Pekka Enberg
2007-05-09 10:29   ` Jens Axboe
2007-05-09 10:46     ` Pekka J Enberg
2007-05-09 10:54       ` Jens Axboe
2007-05-10 16:08   ` Rene Herman
2007-05-11 12:09     ` Jens Axboe [this message]

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=20070511120955.GZ4629@kernel.dk \
    --to=jens.axboe@oracle.com \
    --cc=ak@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=penberg@cs.helsinki.fi \
    --cc=rene.herman@gmail.com \
    --cc=rusty@rustcorp.com.au \
    --cc=virtualization@lists.osdl.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.