]> git.baikalelectronics.ru Git - kernel.git/commit
blktrace: Show requests without sector
authorJan Kara <jack@suse.cz>
Thu, 7 Feb 2019 10:55:39 +0000 (11:55 +0100)
committerJens Axboe <axboe@kernel.dk>
Thu, 7 Feb 2019 19:57:17 +0000 (12:57 -0700)
commit3cd48823e525a5332551c9acf1ee1d896623ccdd
treeffaa5b77647c61a2a92cd054e1fbe81283213f29
parente0c842aff834e3d2909779c45932b82a46ac90fd
blktrace: Show requests without sector

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.

Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/linux/blktrace_api.h