aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/blktrace_api.h
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-02-11 09:26:45 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-02-11 09:26:45 +0100
commitc744ca39f28f9a1e94a62ba02483619925d25ddc (patch)
treebfcd445d31c88130cb0833675e2c7ea1c40f47e0 /include/linux/blktrace_api.h
parentserial: max310x: Correction of the initial setting of the MODE1 bits for various supported ICs. (diff)
parentLinux 5.0-rc6 (diff)
downloadwireguard-linux-c744ca39f28f9a1e94a62ba02483619925d25ddc.tar.xz
wireguard-linux-c744ca39f28f9a1e94a62ba02483619925d25ddc.zip
Merge 5.0-rc6 into tty-next
We need the tty fixes in here for other patches to be based on. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to '')
-rw-r--r--include/linux/blktrace_api.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/linux/blktrace_api.h b/include/linux/blktrace_api.h
index 8804753805ac..7bb2d8de9f30 100644
--- a/include/linux/blktrace_api.h
+++ b/include/linux/blktrace_api.h
@@ -116,7 +116,13 @@ extern void blk_fill_rwbs(char *rwbs, unsigned int op, int bytes);
static inline sector_t blk_rq_trace_sector(struct request *rq)
{
- return blk_rq_is_passthrough(rq) ? 0 : blk_rq_pos(rq);
+ /*
+ * Tracing should ignore starting sector for passthrough requests and
+ * requests where starting sector didn't get set.
+ */
+ if (blk_rq_is_passthrough(rq) || blk_rq_pos(rq) == (sector_t)-1)
+ return 0;
+ return blk_rq_pos(rq);
}
static inline unsigned int blk_rq_trace_nr_sectors(struct request *rq)