From: Konstantin Khorenko <khorenko@virtuozzo.com>
To: Alexey Kuznetsov <kuznet@virtuozzo.com>
Cc: azaitsev@virtuozzo.com, devel@openvz.org, kui.liu@virtuozzo.com
Subject: Re: [Devel] [PATCH hci-8.1] fs/fuse/kio: do not panic on unaligned memory access in cs accel
Date: Mon, 30 Nov 2026 17:02:57 +0100 [thread overview]
Message-ID: <179605457779.1088513.3574270513428350209.b4-review@b4> (raw)
In-Reply-To: <aw2OzUHFpvEwwuS5@mops2>
Please, send an ACK for the patch and after that
i can apply this with the following fixes on my side:
- trailers: dropped "Affects:" (it repeats the URL) and the blank
lines between them, put them in the usual order: URL, Fixes,
Feature, Signed-off-by. With the blank lines git saw only Feature:
as a trailer.
On Mon, 30 Nov 2026 22:57:17 +0800, Alexey Kuznetsov wrote:
> Nevertheless,
> new kernels have allowed O_DIRECT access to tmpfs
> (e88e0d366f9c "tmpfs: trivial support for direct IO"), which does
> not imply any memory alignment constraints. Our tests really use
> tmpfs.
Not only tmpfs. On ext4/xfs CS disks an O_DIRECT read of a hole or
an unwritten extent goes through iomap_dio_hole_iter(), which fills
the buffer without the memory alignment check of the bio path, and
ext4 data=journal falls back to buffered reads. So the BUG_ON could
fire in production before the tmpfs change, and the fix is worth
having on every branch with 5acc64b761cd.
> - vstorage deliberately does not check memory alignment anywhere.
init_crypted_data() does check it, (bv_offset | bv_len) & 511, before
the encrypted write is submitted.
> + if (unlikely(len & 511)) {
> + put_page(page);
No change needed now, a thought for later: this fires only after the
local read is done and the earlier pages are decrypted in place.
The error then goes through map_notify_soft_error() and closes the
congestion window of the local CS (eff_cwnd = 1) until its next
success. The same check in csa_submit() for IREQ_F_CRYPT, as on the
write path, would fall back before any IO and without that.
Separate patches, not needed for this one. I created a task:
1. csa_submit() leaks the crc_page[] references taken by
quick_crc_fetch() on its synchronous error returns ("Not a bvec",
"AIO submit rejected"); the caller falls back to the network and
the union with iochunk.ir overwrites the pointers. Unaligned
O_DIRECT reads on block-backed CS storage with CRC take this path.
https://virtuozzo.atlassian.net/browse/VSTOR-158112
--
Konstantin Khorenko,
Virtuozzo Linux Kernel Team
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
next prev parent reply other threads:[~2026-11-30 16:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-30 14:57 Alexey Kuznetsov
2026-11-30 16:02 ` Konstantin Khorenko [this message]
2026-11-30 18:12 ` Alexey Kuznetsov
2026-11-30 16:04 ` Konstantin Khorenko
2026-12-01 1:06 ` no-reply
2026-12-01 12:13 ` Konstantin Khorenko
2026-12-01 12:30 ` 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=179605457779.1088513.3574270513428350209.b4-review@b4 \
--to=khorenko@virtuozzo.com \
--cc=azaitsev@virtuozzo.com \
--cc=devel@openvz.org \
--cc=kui.liu@virtuozzo.com \
--cc=kuznet@virtuozzo.com \
/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 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.