Re: [PATCH] blktrace: Show requests without sector

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed 06-02-19 12:49:46, Jens Axboe wrote:
> On 2/6/19 5:04 AM, Jan Kara wrote:
> > Currently, blktrace will not show requests that don't have any data as
> > rq->__sector is initialized to -1 which is out of device range and thus
> > discarded by act_log_check(). This is most notably the case for cache
> > flush requests sent to the device. Fix the problem by making
> > blk_rq_trace_sector() return 0 for requests without initialized sector.
> 
> Concept is fine, but man, that's not very readable. How about:
> 
> if (blk_rq_passthrough(rq) || blk_rq_pos(rq) == (sector_t) -1)
> 	return 0;
> 
> return blk_rq_pos(rq);
> 
> instead? Preferably with a comment on why blk_rq_pos() will be -1.

Good points. Will send v2 shortly. Thanks!

								Honza
-- 
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux