Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

md/bcache: Combine two prio_io() arguments

Improve uniformity in the kernel of handling of request operation and
flags by passing these as a single argument.

Cc: Coly Li <colyli@suse.de>
Cc: Mingzhe Zou <mingzhe.zou@easystack.cn>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20220714180729.1065367-34-bvanassche@acm.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Bart Van Assche and committed by
Jens Axboe
552eee3b 9a4fd6a2

+4 -5
+4 -5
drivers/md/bcache/super.c
··· 587 587 closure_put(&ca->prio); 588 588 } 589 589 590 - static void prio_io(struct cache *ca, uint64_t bucket, int op, 591 - unsigned long op_flags) 590 + static void prio_io(struct cache *ca, uint64_t bucket, blk_opf_t opf) 592 591 { 593 592 struct closure *cl = &ca->prio; 594 593 struct bio *bio = bch_bbio_alloc(ca->set); ··· 600 601 601 602 bio->bi_end_io = prio_endio; 602 603 bio->bi_private = ca; 603 - bio_set_op_attrs(bio, op, REQ_SYNC|REQ_META|op_flags); 604 + bio->bi_opf = opf | REQ_SYNC | REQ_META; 604 605 bch_bio_map(bio, ca->disk_buckets); 605 606 606 607 closure_bio_submit(ca->set, bio, &ca->prio); ··· 660 661 BUG_ON(bucket == -1); 661 662 662 663 mutex_unlock(&ca->set->bucket_lock); 663 - prio_io(ca, bucket, REQ_OP_WRITE, 0); 664 + prio_io(ca, bucket, REQ_OP_WRITE); 664 665 mutex_lock(&ca->set->bucket_lock); 665 666 666 667 ca->prio_buckets[i] = bucket; ··· 704 705 ca->prio_last_buckets[bucket_nr] = bucket; 705 706 bucket_nr++; 706 707 707 - prio_io(ca, bucket, REQ_OP_READ, 0); 708 + prio_io(ca, bucket, REQ_OP_READ); 708 709 709 710 if (p->csum != 710 711 bch_crc64(&p->magic, meta_bucket_bytes(&ca->sb) - 8)) {