This is a note to let you know that I've just added the patch titled md/raid1: Use blk_opf_t for read and write operations to the 6.1-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: md-raid1-use-blk_opf_t-for-read-and-write-operations.patch and it can be found in the queue-6.1 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 7dab24554dedd4e6f408af8eb2d25c89997a6a1f Mon Sep 17 00:00:00 2001 From: Bart Van Assche <bvanassche@xxxxxxx> Date: Sun, 7 Jan 2024 16:12:23 -0800 Subject: md/raid1: Use blk_opf_t for read and write operations From: Bart Van Assche <bvanassche@xxxxxxx> commit 7dab24554dedd4e6f408af8eb2d25c89997a6a1f upstream. Use the type blk_opf_t for read and write operations instead of int. This patch does not affect the generated code but fixes the following sparse warning: drivers/md/raid1.c:1993:60: sparse: sparse: incorrect type in argument 5 (different base types) expected restricted blk_opf_t [usertype] opf got int rw Cc: Song Liu <song@xxxxxxxxxx> Cc: Jens Axboe <axboe@xxxxxxxxx> Fixes: 3c5e514db58f ("md/raid1: Use the new blk_opf_t type") Cc: stable@xxxxxxxxxxxxxxx # v6.0+ Reported-by: kernel test robot <lkp@xxxxxxxxx> Closes: https://lore.kernel.org/oe-kbuild-all/202401080657.UjFnvQgX-lkp@xxxxxxxxx/ Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx> Signed-off-by: Song Liu <song@xxxxxxxxxx> Link: https://lore.kernel.org/r/20240108001223.23835-1-bvanassche@xxxxxxx Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/md/raid1.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c @@ -1972,12 +1972,12 @@ static void end_sync_write(struct bio *b } static int r1_sync_page_io(struct md_rdev *rdev, sector_t sector, - int sectors, struct page *page, int rw) + int sectors, struct page *page, blk_opf_t rw) { if (sync_page_io(rdev, sector, sectors << 9, page, rw, false)) /* success */ return 1; - if (rw == WRITE) { + if (rw == REQ_OP_WRITE) { set_bit(WriteErrorSeen, &rdev->flags); if (!test_and_set_bit(WantReplacement, &rdev->flags)) @@ -2094,7 +2094,7 @@ static int fix_sync_read_error(struct r1 rdev = conf->mirrors[d].rdev; if (r1_sync_page_io(rdev, sect, s, pages[idx], - WRITE) == 0) { + REQ_OP_WRITE) == 0) { r1_bio->bios[d]->bi_end_io = NULL; rdev_dec_pending(rdev, mddev); } @@ -2109,7 +2109,7 @@ static int fix_sync_read_error(struct r1 rdev = conf->mirrors[d].rdev; if (r1_sync_page_io(rdev, sect, s, pages[idx], - READ) != 0) + REQ_OP_READ) != 0) atomic_add(s, &rdev->corrected_errors); } sectors -= s; @@ -2321,7 +2321,7 @@ static void fix_read_error(struct r1conf atomic_inc(&rdev->nr_pending); rcu_read_unlock(); r1_sync_page_io(rdev, sect, s, - conf->tmppage, WRITE); + conf->tmppage, REQ_OP_WRITE); rdev_dec_pending(rdev, mddev); } else rcu_read_unlock(); @@ -2338,7 +2338,7 @@ static void fix_read_error(struct r1conf atomic_inc(&rdev->nr_pending); rcu_read_unlock(); if (r1_sync_page_io(rdev, sect, s, - conf->tmppage, READ)) { + conf->tmppage, REQ_OP_READ)) { atomic_add(s, &rdev->corrected_errors); pr_info("md/raid1:%s: read error corrected (%d sectors at %llu on %pg)\n", mdname(mddev), s, Patches currently in stable-queue which might be from bvanassche@xxxxxxx are queue-6.1/md-raid1-use-blk_opf_t-for-read-and-write-operations.patch queue-6.1/scsi-ufs-core-simplify-power-management-during-async-scan.patch queue-6.1/block-make-blk_def_max_sectors-unsigned.patch