From: no-reply@sashiko.virtuozzo.com
To: Andrey Zhadchenko <andrey.zhadchenko@virtuozzo.com>,
alexander.ivanov@virtuozzo.com
Cc: devel@openvz.org
Subject: Re: [Devel] [PATCH hci-8.2] dm-qcow2: associate worker kthread with request blkcg on submit
Date: Tue, 1 Dec 2026 14:04:45 +0000 [thread overview]
Message-ID: <010701a231ec1741-b67c382a-d44f-431d-928f-83a737c9b53d-000000@eu-central-1.amazonses.com> (raw)
In-Reply-To: <20261201135205.163133-1-andrey.zhadchenko@virtuozzo.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] dm-qcow2: merge aux_qio lacks QIO_HAS_PARENT_FL, losing blkcg
association
--
commit 0c8c7773401f0f94f9a8fd9cadaabfa9340d3b77
Author: Andrey Zhadchenko <andrey.zhadchenko@virtuozzo.com>
dm-qcow2: associate worker kthread with request blkcg on submit
dm-qcow2 submits image file I/O from tgt->wq worker kthreads, which belong
to the root cgroup. This patch marks child qios that point to a parent qio
with a new QIO_HAS_PARENT_FL flag. qio_blkcg_css() then walks up to the
embedded root qio and calls kthread_associate_blkcg() around
qcow2_call_rw_iter().
> diff --git a/drivers/md/dm-qcow2-map.c b/drivers/md/dm-qcow2-map.c
> --- a/drivers/md/dm-qcow2-map.c
> +++ b/drivers/md/dm-qcow2-map.c
[ ... ]
> +static struct cgroup_subsys_state *qio_blkcg_css(struct qio *qio)
> +{
> + struct cgroup_subsys_state *css;
> + struct qcow2_rq *qrq;
> +
> + while (qio->flags & QIO_HAS_PARENT_FL)
> + qio = qio->endio_cb_data;
> +
> + if (qio->endio_cb != qrq_endio)
> + return NULL;
[Severity: Low]
Does this walk miss the aux_qio created in prepare_backward_merge()? That
function sets endio_cb_data to the parent qio but does not set
QIO_HAS_PARENT_FL:
aux_qio->flags = QIO_IS_MERGE_FL|QIO_FREE_ON_ENDIO_FL;
...
aux_qio->endio_cb = requeue_if_ok;
aux_qio->endio_cb_data = *qio;
When a read hits a cluster under backward merge, a child qio (for example
the compressed or COW read with merge=true) walks up to aux_qio and stops.
Since requeue_if_ok != qrq_endio, qio_blkcg_css() returns NULL. That I/O is
then submitted from the root-cgroup worker, so the submitter's block cgroup
limits are bypassed on this path.
Should QIO_HAS_PARENT_FL be added to the flags assignment in
prepare_backward_merge() so the walk continues to the original qio?
Carry the trailer below into the next revision and Sashiko will not review this patch again.
Reviewed-by: Sashiko <no-reply@sashiko.virtuozzo.com>
--
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261201135205.163133-1-andrey.zhadchenko@virtuozzo.com?part=1
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
next prev parent reply other threads:[~2026-12-01 14:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-01 13:52 Andrey Zhadchenko
2026-12-01 14:04 ` no-reply [this message]
2026-12-01 14:29 ` Konstantin Khorenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=010701a231ec1741-b67c382a-d44f-431d-928f-83a737c9b53d-000000@eu-central-1.amazonses.com \
--to=no-reply@sashiko.virtuozzo.com \
--cc=alexander.ivanov@virtuozzo.com \
--cc=andrey.zhadchenko@virtuozzo.com \
--cc=devel@openvz.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox