eparate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Closes: https://lore.kernel.org/oe-kbuild-all/202510240319.bLypyxx1-lkp@intel.com/ All error/warnings (new ones prefixed by >>): 781 | static DEFINE_IO_URING_CMD_TASK_WORK(blk_cmd_complete) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ block/ioctl.c: In function 'DEFINE_IO_URING_CMD_TASK_WORK': 784 | { | ^ block/ioctl.c:798:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token 798 | { | ^ block/ioctl.c:853:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token 853 | { | ^ 781 | static DEFINE_IO_URING_CMD_TASK_WORK(blk_cmd_complete) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ block/ioctl.c: At top level: 781 | static DEFINE_IO_URING_CMD_TASK_WORK(blk_cmd_complete) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 772 | static void blk_cmd_complete(struct io_uring_cmd *cmd, unsigned int issue_flags) | ^~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors -- 410 | static DEFINE_IO_URING_CMD_TASK_WORK(nvme_uring_task_cb) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/nvme/host/ioctl.c: In function 'DEFINE_IO_URING_CMD_TASK_WORK': 414 | { | ^ drivers/nvme/host/ioctl.c:441:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token 441 | { | ^ drivers/nvme/host/ioctl.c:534:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token 534 | { | ^ drivers/nvme/host/ioctl.c:544:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token 544 | { | ^ drivers/nvme/host/ioctl.c:575:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token 575 | { | ^ drivers/nvme/host/ioctl.c:605:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token 605 | { | ^ drivers/nvme/host/ioctl.c:620:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token 620 | { | ^ drivers/nvme/host/ioctl.c:632:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token 632 | { | ^ drivers/nvme/host/ioctl.c:643:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token 643 | { | ^ drivers/nvme/host/ioctl.c:666:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token 666 | { | ^ drivers/nvme/host/ioctl.c:676:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token 676 | { | ^ drivers/nvme/host/ioctl.c:777:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token 777 | { | ^ drivers/nvme/host/ioctl.c:805:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token 805 | { | ^ drivers/nvme/host/ioctl.c:842:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token 842 | { | ^ 410 | static DEFINE_IO_URING_CMD_TASK_WORK(nvme_uring_task_cb) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/nvme/host/ioctl.c: At top level: 410 | static DEFINE_IO_URING_CMD_TASK_WORK(nvme_uring_task_cb) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 401 | static void nvme_uring_task_cb(struct io_uring_cmd *ioucmd, | ^~~~~~~~~~~~~~~~~~ 329 | static int nvme_user_cmd64(struct nvme_ctrl *ctrl, struct nvme_ns *ns, | ^~~~~~~~~~~~~~~ 281 | static int nvme_user_cmd(struct nvme_ctrl *ctrl, struct nvme_ns *ns, | ^~~~~~~~~~~~~ 206 | static int nvme_submit_io(struct nvme_ns *ns, struct nvme_user_io __user *uio) | ^~~~~~~~~~~~~~ cc1: some warnings being treated as errors vim +/int +781 block/ioctl.c 771 > 772 static void blk_cmd_complete(struct io_uring_cmd *cmd, unsigned int issue_flags) 773 { 774 struct blk_iou_cmd *bic = io_uring_cmd_to_pdu(cmd, struct blk_iou_cmd); 775 776 if (bic->res == -EAGAIN && bic->nowait) 777 io_uring_cmd_issue_blocking(cmd); 778 else 779 io_uring_cmd_done(cmd, bic->res, issue_flags); 780 } > 781 static DEFINE_IO_URING_CMD_TASK_WORK(blk_cmd_complete) 782 783 static void bio_cmd_bio_end_io(struct bio *bio) > 784 { 785 struct io_uring_cmd *cmd = bio->bi_private; 786 struct blk_iou_cmd *bic = io_uring_cmd_to_pdu(cmd, struct blk_iou_cmd); 787 788 if (unlikely(bio->bi_status) && !bic->res) 789 bic->res = blk_status_to_errno(bio->bi_status); 790 791 io_uring_cmd_do_in_task_lazy(cmd, blk_cmd_complete); 792 bio_put(bio); 793 } 794 795 static int blkdev_cmd_discard(struct io_uring_cmd *cmd, 796 struct block_device *bdev, 797 uint64_t start, uint64_t len, bool nowait) > 798 { 799 struct blk_iou_cmd *bic = io_uring_cmd_to_pdu(cmd, struct blk_iou_cmd); 800 gfp_t gfp = nowait ? GFP_NOWAIT : GFP_KERNEL; 801 sector_t sector = start >> SECTOR_SHIFT; 802 sector_t nr_sects = len >> SECTOR_SHIFT; 803 struct bio *prev = NULL, *bio; 804 int err; 805 806 if (!bdev_max_discard_sectors(bdev)) 807 return -EOPNOTSUPP; 808 if (!(file_to_blk_mode(cmd->file) & BLK_OPEN_WRITE)) 809 return -EBADF; 810 if (bdev_read_only(bdev)) 811 return -EPERM; 812 err = blk_validate_byte_range(bdev, start, len); 813 if (err) 814 return err; 815 816 err = filemap_invalidate_pages(bdev->bd_mapping, start, 817 start + len - 1, nowait); 818 if (err) 819 return err; 820 821 while (true) { 822 bio = blk_alloc_discard_bio(bdev, §or, &nr_sects, gfp); 823 if (!bio) 824 break; 825 if (nowait) { 826 /* 827 * Don't allow multi-bio non-blocking submissions as 828 * subsequent bios may fail but we won't get a direct 829 * indication of that. Normally, the caller should 830 * retry from a blocking context. 831 */ 832 if (unlikely(nr_sects)) { 833 bio_put(bio); 834 return -EAGAIN; 835 } 836 bio->bi_opf |= REQ_NOWAIT; 837 } 838 839 prev = bio_chain_and_submit(prev, bio); 840 } 841 if (unlikely(!prev)) 842 return -EAGAIN; 843 if (unlikely(nr_sects)) 844 bic->res = -EAGAIN; 845 846 prev->bi_private = cmd; 847 prev->bi_end_io = bio_cmd_bio_end_io; 848 submit_bio(prev); 849 return -EIOCBQUEUED; 850 } 851 852 int blkdev_uring_cmd(struct io_uring_cmd *cmd, unsigned int issue_flags) > 853 { 854 struct block_device *bdev = I_BDEV(cmd->file->f_mapping->host); 855 struct blk_iou_cmd *bic = io_uring_cmd_to_pdu(cmd, struct blk_iou_cmd); 856 const struct io_uring_sqe *sqe = cmd->sqe; 857 u32 cmd_op = cmd->cmd_op; 858 uint64_t start, len; 859 860 if (unlikely(sqe->ioprio || sqe->__pad1 || sqe->len || 861 sqe->rw_flags || sqe->file_index)) 862 return -EINVAL; 863 864 bic->res = 0; 865 bic->nowait = issue_flags & IO_URING_F_NONBLOCK; 866 867 start = READ_ONCE(sqe->addr); 868 len = READ_ONCE(sqe->addr3); 869 870 switch (cmd_op) { 871 case BLOCK_URING_CMD_DISCARD: 872 return blkdev_cmd_discard(cmd, bdev, start, len, bic->nowait); 873 } 874 return -EINVAL; 875 } -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki[PATCH 3/3] io_uring/uring_cmd: avoid double indirect call in task work dispatchkernel test robot undefinedCaleb Sander Mateos , Jens Axboe , Miklos Szeredi , Ming Lei , Keith Busch , Christoph Hellwig , Sagi Grimberg , Chris Mason , David Sterba undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined