]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/md/dm-cache-policy-mq.c
Merge remote-tracking branch 'device-mapper/for-next'
[karo-tx-linux.git] / drivers / md / dm-cache-policy-mq.c
index 7f1aaa38a7e0eb1fb20f78bb63196a23270c90ef..5c3e044b67b969efb756367616932ddb5fae2b11 100644 (file)
@@ -72,7 +72,7 @@ static enum io_pattern iot_pattern(struct io_tracker *t)
 
 static void iot_update_stats(struct io_tracker *t, struct bio *bio)
 {
-       if (bio->bi_sector == from_oblock(t->last_end_oblock) + 1)
+       if (bio->bi_iter.bi_sector == from_oblock(t->last_end_oblock) + 1)
                t->nr_seq_samples++;
        else {
                /*
@@ -87,7 +87,7 @@ static void iot_update_stats(struct io_tracker *t, struct bio *bio)
                t->nr_rand_samples++;
        }
 
-       t->last_end_oblock = to_oblock(bio->bi_sector + bio_sectors(bio) - 1);
+       t->last_end_oblock = to_oblock(bio_end_sector(bio) - 1);
 }
 
 static void iot_check_for_pattern_switch(struct io_tracker *t)