X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=drivers%2Fmd%2Fdm-cache-policy-mq.c;h=bfba97dcde2d5a424853882bca6cd7384ff153c9;hb=4f024f3797c43cb4b73cd2c50cec728842d0e49e;hp=416b7b752a6e0018d4a11800606a8be6b8890e22;hpb=fcd7476f9e03a36e709e0807198d47a826cc4e3a;p=mirror_ubuntu-bionic-kernel.git diff --git a/drivers/md/dm-cache-policy-mq.c b/drivers/md/dm-cache-policy-mq.c index 416b7b752a6e..bfba97dcde2d 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) 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)