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] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 29 Apr 2009 11:25:32 +0200 (CEST)
From:	Geert Uytterhoeven <Geert.Uytterhoeven@...ycom.com>
To:	Tejun Heo <tj@...nel.org>
cc:	axboe@...nel.dk,
	Linux Kernel Development <linux-kernel@...r.kernel.org>,
	linux-scsi@...r.kernel.org, jeff@...zik.org,
	linux-ide@...r.kernel.org,
	"James E.J. Bottomley" <James.Bottomley@...senPartnership.com>,
	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, 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,
	David Woodhouse <dwmw2@...radead.org>, schwidefsky@...ibm.com,
	ballabio_dario@....com, "David S. Miller" <davem@...emloft.net>,
	Paul Russell <rusty@...tcorp.com.au>,
	Markus.Lidel@...dowconnect.com, bharrosh@...asas.com
Subject: Re: [PATCH 04/10] block: implement blk_rq_pos/[cur_]sectors() and
 convert obvious ones

On Wed, 29 Apr 2009, Tejun Heo wrote:
> Implement accessors - blk_rq_pos(), blk_rq_sectors() and
> blk_rq_cur_sectors() which return rq->sector, rq->hard_nr_sectors and
> rq->hard_cur_sectors respectively and convert direct references of the
> said fields to the accessors.
> 
> This is in preparation of request data length handling cleanup.
> 
> [ Impact: cleanup ]
> 
> Signed-off-by: Tejun Heo <tj@...nel.org>
> Cc: Geert Uytterhoeven <Geert.Uytterhoeven@...ycom.com>

>  drivers/block/ps3disk.c         |    2 +-

Acked-by: Geert Uytterhoeven <Geert.Uytterhoeven@...ycom.com>

> --- a/include/linux/blkdev.h
> +++ b/include/linux/blkdev.h
> @@ -832,13 +832,30 @@ static inline void blk_run_address_space(struct address_space *mapping)
>  extern void blkdev_dequeue_request(struct request *req);
>  
>  /*
> - * blk_end_request() takes bytes instead of sectors as a complete size.
> - * blk_rq_bytes() returns bytes left to complete in the entire request.
> - * blk_rq_cur_bytes() returns bytes left to complete in the current segment.
> + * blk_rq_pos()		: the current sector
> + * blk_rq_bytes()	: bytes left in the entire request
> + * blk_rq_cur_bytes()	: bytes left in the current segment
> + * blk_rq_sectors()	: sectors left in the entire request
> + * blk_rq_cur_sectors()	: sectors left in the current segment
>   */
> +static inline sector_t blk_rq_pos(struct request *rq)
                                     ^
				     const?
> +{
> +	return rq->hard_sector;
> +}
> +
>  extern unsigned int blk_rq_bytes(struct request *rq);
>  extern unsigned int blk_rq_cur_bytes(struct request *rq);
>  
> +static inline unsigned int blk_rq_sectors(struct request *rq)
					     ^
					     const?
> +{
> +	return rq->hard_nr_sectors;
> +}
> +
> +static inline unsigned int blk_rq_cur_sectors(struct request *rq)
						 ^
						 const?
> +{
> +	return rq->hard_cur_sectors;
> +}
> +

With kind regards,

Geert Uytterhoeven
Software Architect
Techsoft Centre

Technology and Software Centre Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium

Phone:    +32 (0)2 700 8453
Fax:      +32 (0)2 700 8622
E-mail:   Geert.Uytterhoeven@...ycom.com
Internet: http://www.sony-europe.com/

A division of Sony Europe (Belgium) N.V.
VAT BE 0413.825.160 · RPR Brussels
Fortis · BIC GEBABEBB · IBAN BE41293037680010
--
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