lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20070511120955.GZ4629@kernel.dk>
Date:	Fri, 11 May 2007 14:09:55 +0200
From:	Jens Axboe <jens.axboe@...cle.com>
To:	Rene Herman <rene.herman@...il.com>
Cc:	Pekka Enberg <penberg@...helsinki.fi>,
	"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org, virtualization@...ts.osdl.org,
	rusty@...tcorp.com.au, ak@...e.de
Subject: Re: [patch 8/9] lguest: the block driver

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

-
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ