diff options
author | Joe Thornber <ejt@redhat.com> | 2017-05-11 12:14:16 +0200 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2017-05-15 03:53:11 +0200 |
commit | 072792dcdfc8d5f91a26050e5665285f50afebf5 (patch) | |
tree | 597428541018bbbcdda239d50bc8b4e21b975292 /drivers | |
parent | Linux 4.12-rc1 (diff) | |
download | linux-072792dcdfc8d5f91a26050e5665285f50afebf5.tar.xz linux-072792dcdfc8d5f91a26050e5665285f50afebf5.zip |
dm cache: fix incorrect 'idle_time' reset in IO tracker
Some bios have no payload (eg, a FLUSH), don't reset the idle_time when
these come in.
Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/md/dm-cache-target.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/md/dm-cache-target.c b/drivers/md/dm-cache-target.c index 1db375f50a13..0760ba409c21 100644 --- a/drivers/md/dm-cache-target.c +++ b/drivers/md/dm-cache-target.c @@ -94,6 +94,9 @@ static void iot_io_begin(struct io_tracker *iot, sector_t len) static void __iot_io_end(struct io_tracker *iot, sector_t len) { + if (!len) + return; + iot->in_flight -= len; if (!iot->in_flight) iot->idle_time = jiffies; |