diff options
Diffstat (limited to 'drivers/md/dm-cache-policy-mq.c')
-rw-r--r-- | drivers/md/dm-cache-policy-mq.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/dm-cache-policy-mq.c b/drivers/md/dm-cache-policy-mq.c index 64780ad73bb0..d13a16865d03 100644 --- a/drivers/md/dm-cache-policy-mq.c +++ b/drivers/md/dm-cache-policy-mq.c | |||
@@ -72,7 +72,7 @@ static enum io_pattern iot_pattern(struct io_tracker *t) | |||
72 | 72 | ||
73 | static void iot_update_stats(struct io_tracker *t, struct bio *bio) | 73 | static void iot_update_stats(struct io_tracker *t, struct bio *bio) |
74 | { | 74 | { |
75 | if (bio->bi_sector == from_oblock(t->last_end_oblock) + 1) | 75 | if (bio->bi_iter.bi_sector == from_oblock(t->last_end_oblock) + 1) |
76 | t->nr_seq_samples++; | 76 | t->nr_seq_samples++; |
77 | else { | 77 | else { |
78 | /* | 78 | /* |
@@ -87,7 +87,7 @@ static void iot_update_stats(struct io_tracker *t, struct bio *bio) | |||
87 | t->nr_rand_samples++; | 87 | t->nr_rand_samples++; |
88 | } | 88 | } |
89 | 89 | ||
90 | t->last_end_oblock = to_oblock(bio->bi_sector + bio_sectors(bio) - 1); | 90 | t->last_end_oblock = to_oblock(bio_end_sector(bio) - 1); |
91 | } | 91 | } |
92 | 92 | ||
93 | static void iot_check_for_pattern_switch(struct io_tracker *t) | 93 | static void iot_check_for_pattern_switch(struct io_tracker *t) |