[PATCH] blkparse: Remove negative skips
authorAlan D. Brunelle <Alan.Brunelle@hp.com>
Mon, 30 Jan 2006 18:03:43 +0000 (19:03 +0100)
committerJens Axboe <axboe@suse.de>
Mon, 30 Jan 2006 18:03:43 +0000 (19:03 +0100)
The following patch does not insert skips that go backwards. I am not
sure why we do, but on occasion we find events that are behind where we
should be, and we don't have an entry in skipped ones - that would make
me thing it's a duplicate. But in any event, we should not be reporting
such things - they cause huge skip numbers by wrapping on an unsigned long.

blkparse.c

index ce2585591d21eb67cf05028b3fc3806f7a96ba75..459fdee7ecd2111136d181ce277ae9745ddf3b58 100644 (file)
@@ -1649,7 +1649,8 @@ skip:
                if (check_current_skips(pdi,bit->sequence))
                        return 0;
 
-               insert_skip(pdi,expected_sequence,bit->sequence-1);
+               if (expected_sequence < bit->sequence)
+                       insert_skip(pdi, expected_sequence, bit->sequence - 1);
                return 0;
        }
 }