diff options
author | Gabriel Krisman Bertazi <krisman@collabora.com> | 2020-04-30 16:48:29 -0400 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2020-05-15 10:29:36 -0400 |
commit | 087615bf3acdafd0ba7c7c9ed5286e7b7c80fe1b (patch) | |
tree | a3ecdcc75df1e1a714466302ebb9f4f29d58bfd9 /drivers/md/dm.c | |
parent | 48338daaa00e6137a43fa5d0e54b763aa34f450b (diff) | |
download | linux-087615bf3acdafd0ba7c7c9ed5286e7b7c80fe1b.tar.bz2 |
dm mpath: pass IO start time to path selector
The HST path selector needs this information to perform path
prediction. For request-based mpath, struct request's io_start_time_ns
is used, while for bio-based, use the start_time stored in dm_io.
Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/dm.c')
-rw-r--r-- | drivers/md/dm.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c index db9e46114653..2fcb932eb4bd 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -675,6 +675,15 @@ static bool md_in_flight(struct mapped_device *md) return md_in_flight_bios(md); } +u64 dm_start_time_ns_from_clone(struct bio *bio) +{ + struct dm_target_io *tio = container_of(bio, struct dm_target_io, clone); + struct dm_io *io = tio->io; + + return jiffies_to_nsecs(io->start_time); +} +EXPORT_SYMBOL_GPL(dm_start_time_ns_from_clone); + static void start_io_acct(struct dm_io *io) { struct mapped_device *md = io->md; |