diff options
author | Joe Thornber <ejt@redhat.com> | 2017-05-11 06:14:16 -0400 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2017-05-14 21:53:11 -0400 |
commit | 072792dcdfc8d5f91a26050e5665285f50afebf5 (patch) | |
tree | 597428541018bbbcdda239d50bc8b4e21b975292 /drivers/md/dm-cache-target.c | |
parent | 2ea659a9ef488125eb46da6eb571de5eae5c43f6 (diff) |
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/md/dm-cache-target.c')
-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; |