From dd748a9866938248181fd22466606b5b84b3aab3 Mon Sep 17 00:00:00 2001 From: Li Lingfeng Date: Fri, 7 Jul 2023 14:51:13 +0800 Subject: [PATCH] Revert "dm: make sure dm_table is binded before queue request" hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I7FI78 -------------------------------- This reverts commit 90d1a836f017faf27c24265773171997485075ce. It's not proper to just abort IO when the map is not ready. So revert this and requeue IO to keep consistent with the community. Signed-off-by: Li Lingfeng (cherry picked from commit bc4c0996c59752ff9747204836e0be289ddf1ea0) --- drivers/md/dm-rq.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/md/dm-rq.c b/drivers/md/dm-rq.c index 8980f129b31f..0fe032147c09 100644 --- a/drivers/md/dm-rq.c +++ b/drivers/md/dm-rq.c @@ -500,15 +500,8 @@ static blk_status_t dm_mq_queue_rq(struct blk_mq_hw_ctx *hctx, if (unlikely(!ti)) { int srcu_idx; - struct dm_table *map; - - map = dm_get_live_table(md, &srcu_idx); - if (!map) { - DMERR_LIMIT("%s: mapping table unavailable, erroring io", - dm_device_name(md)); - dm_put_live_table(md, srcu_idx); - return BLK_STS_IOERR; - } + struct dm_table *map = dm_get_live_table(md, &srcu_idx); + ti = dm_table_find_target(map, 0); dm_put_live_table(md, srcu_idx); } -- GitLab