]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
blktrace: Show requests without sector
authorJan Kara <jack@suse.cz>
Thu, 7 Feb 2019 10:55:39 +0000 (11:55 +0100)
committerMarcelo Henrique Cerri <marcelo.cerri@canonical.com>
Fri, 17 Jan 2020 17:21:40 +0000 (14:21 -0300)
commit226fc96a961db08a225e665130453fae39187aeb
treeaed55456b319323bca9587b2bca9498b001d8ebb
parent33a47b9e768a3349ee0fff75fd4346157e0e0d1d
blktrace: Show requests without sector

BugLink: https://bugs.launchpad.net/bugs/1855787
[ Upstream commit 0803de78049fe1b0baf44bcddc727b036fb9139b ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
include/linux/blktrace_api.h