From: Konstantin Khorenko <khorenko@virtuozzo.com>
To: "Denis V. Lunev" <den@openvz.org>
Cc: devel@openvz.org
Subject: Re: [Devel] [PATCH hci-8.1 3/3] dm-ploop: fail writes to a read-only device
Date: Tue, 10 Nov 2026 18:11:13 +0100 [thread overview]
Message-ID: <179433067372.3552165.9282702902538488389.b4-review@b4> (raw)
In-Reply-To: <20261109190604.1850504-4-den@openvz.org>
Applying with these fixes on my side:
- "punches or zeroes it with vfs_fallocate(), which does, and fails
with EBADF" -> "punches or zeroes it with vfs_fallocate() inside the
file and preallocates space past its end. Both check FMODE_WRITE and
fail";
- "Kill write requests" -> "Kill write and discard requests";
- added a paragraph on what users see now: a read-write mount of a
partition over a read-only ploop device, and a read-only ext4 mount
that has to replay its journal through it, fail with an I/O error
instead of changing the image.
On Mon, 9 Nov 2026 20:06:04 +0100, Denis V. Lunev wrote:
> does not check FMODE_WRITE, so it reaches the image. Allocating a cluster
> punches or zeroes it with vfs_fallocate(), which does, and fails with
> EBADF, so part of such a write fails with an I/O error and the rest
A cluster past the end of the file goes to the preallocation, where
do_ftruncate() on the read-only file fails with EINVAL and the write
gets EIO after the retries, not EBADF.
> Kill write requests of a read-only table in ploop_clone_and_map(), as
op_is_write() matches discards too, and both mounts above used to work
by writing into the image. Whoever hits such a failed mount now should
find the reason in this message.
--
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-10 17:12 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-09 19:06 [Devel] [PATCH hci-8.1 0/3] dm-ploop: fix writes to a read-only device hanging the host Denis V. Lunev
2026-11-09 19:06 ` [Devel] [PATCH hci-8.1 1/3] dm-ploop: factor out ploop_dispatch_md_waiters() Denis V. Lunev
2026-11-09 19:15 ` no-reply
2026-11-10 17:11 ` Konstantin Khorenko
2026-11-09 19:06 ` [Devel] [PATCH hci-8.1 2/3] dm-ploop: fix pios stuck in md->wait_llist after a failed BAT update Denis V. Lunev
2026-11-09 19:18 ` no-reply
2026-11-10 17:11 ` Konstantin Khorenko
2026-11-09 19:06 ` [Devel] [PATCH hci-8.1 3/3] dm-ploop: fail writes to a read-only device Denis V. Lunev
2026-11-09 19:19 ` no-reply
2026-11-10 17:11 ` Konstantin Khorenko [this message]
2026-11-10 17:11 ` [Devel] [PATCH hci-8.1 0/3] dm-ploop: fix writes to a read-only device hanging the host Konstantin Khorenko
2026-11-10 17:11 ` 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=179433067372.3552165.9282702902538488389.b4-review@b4 \
--to=khorenko@virtuozzo.com \
--cc=den@openvz.org \
--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 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.