iowatcher: Handle REQUEUE events
authorJan Kara <jack@suse.cz>
Thu, 4 Apr 2013 10:18:28 +0000 (06:18 -0400)
committerChris Mason <clm@fb.com>
Wed, 24 Sep 2014 19:02:09 +0000 (12:02 -0700)
When requeue event happens we have to decrease number of in-flight
requests. Otherwise they drift away.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
iowatcher/blkparse.c

index c9ae3e7409668d22a39e393d1786adecc5779592..43eb26986adf761bc23b7e8084e4de017047a849 100644 (file)
@@ -1052,6 +1052,11 @@ void add_pending_io(struct trace *trace, struct graph_line_data *gld)
                        hash_queued_io(trace->io);
                return;
        }
+       if (action == __BLK_TA_REQUEUE) {
+               if (ios_in_flight > 0)
+                       ios_in_flight--;
+               return;
+       }
        if (action != __BLK_TA_ISSUE)
                return;