* [PATCH] block/cgroup: Drop stale -EBUSY retry from blkg_conf_prep()
@ 2026-06-22 8:56 Yang Xiuwei
2026-06-23 1:33 ` Tao Cui
0 siblings, 1 reply; 2+ messages in thread
From: Yang Xiuwei @ 2026-06-22 8:56 UTC (permalink / raw)
To: Tejun Heo, Josef Bacik, Jens Axboe; +Cc: cgroups, linux-block, Yang Xiuwei
Since commit 8f4236d9008b ("block: remove QUEUE_FLAG_BYPASS and
->bypass") nothing in the blkcg blkg lookup/creation path
returns -EBUSY anymore. blkg_conf_prep() nevertheless still
retries at fail_exit with msleep(10) and restart_syscall()
— logic added in 2012 when blk_queue_bypass() could
cause blkg lookup/creation to fail with -EBUSY while the queue was
temporarily bypassed during elevator changes.
Signed-off-by: Yang Xiuwei <yangxiuwei@kylinos.cn>
---
block/blk-cgroup.c | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
index 3093c1c03902..259f2240e7df 100644
--- a/block/blk-cgroup.c
+++ b/block/blk-cgroup.c
@@ -919,16 +919,6 @@ int blkg_conf_prep(struct blkcg *blkcg, const struct blkcg_policy *pol,
spin_unlock_irq(&q->queue_lock);
fail_exit:
mutex_unlock(&q->blkcg_mutex);
- /*
- * If queue was bypassing, we should retry. Do so after a
- * short msleep(). It isn't strictly necessary but queue
- * can be bypassing for some time and it's always nice to
- * avoid busy looping.
- */
- if (ret == -EBUSY) {
- msleep(10);
- ret = restart_syscall();
- }
return ret;
}
EXPORT_SYMBOL_GPL(blkg_conf_prep);
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] block/cgroup: Drop stale -EBUSY retry from blkg_conf_prep()
2026-06-22 8:56 [PATCH] block/cgroup: Drop stale -EBUSY retry from blkg_conf_prep() Yang Xiuwei
@ 2026-06-23 1:33 ` Tao Cui
0 siblings, 0 replies; 2+ messages in thread
From: Tao Cui @ 2026-06-23 1:33 UTC (permalink / raw)
To: Yang Xiuwei, Tejun Heo, Josef Bacik, Jens Axboe
Cc: cui.tao, cgroups, linux-block
在 2026/6/22 16:56, Yang Xiuwei 写道:
> Since commit 8f4236d9008b ("block: remove QUEUE_FLAG_BYPASS and
> ->bypass") nothing in the blkcg blkg lookup/creation path
> returns -EBUSY anymore...
Correct. I traced every error path in blkg_conf_prep() (and blkg_create()
underneath it): the only possible values are -EINVAL, -EOPNOTSUPP, -ENOMEM,
-ENODEV and -EEXIST (from radix_tree_insert). The -EBUSY source was indeed
the blk_queue_bypass() check removed by 8f4236d9008b, so the retry branch
has been dead since 2018. Clean removal with no behavioral change.
Reviewed-by: Tao Cui <cuitao@kylinos.cn>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-06-23 1:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-22 8:56 [PATCH] block/cgroup: Drop stale -EBUSY retry from blkg_conf_prep() Yang Xiuwei
2026-06-23 1:33 ` Tao Cui
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.