ublk_drv: return flag of UBLK_F_URING_CMD_COMP_IN_TASK in case of module
[ Upstream commit224e858f21] UBLK_F_URING_CMD_COMP_IN_TASK needs to be set and returned to userspace if ublk driver is built as module, otherwise userspace may get wrong flags shown. Fixes:71f28f3136("ublk_drv: add io_uring based userspace block driver") Signed-off-by: Ming Lei <ming.lei@redhat.com> Reviewed-by: ZiyangZhang <ZiyangZhang@linux.alibaba.com> Link: https://lore.kernel.org/r/20221029010432.598367-2-ming.lei@redhat.com Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
52d7b11b32
commit
e7cf4cc23e
@@ -1507,6 +1507,9 @@ static int ublk_ctrl_add_dev(struct io_uring_cmd *cmd)
|
||||
*/
|
||||
ub->dev_info.flags &= UBLK_F_ALL;
|
||||
|
||||
if (!IS_BUILTIN(CONFIG_BLK_DEV_UBLK))
|
||||
ub->dev_info.flags |= UBLK_F_URING_CMD_COMP_IN_TASK;
|
||||
|
||||
/* We are not ready to support zero copy */
|
||||
ub->dev_info.flags &= ~UBLK_F_SUPPORT_ZERO_COPY;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user