[Devel] [PATCH hci-8.1 0/3] dm-qcow2: keep images of a read-only table unmodified
Andrey Zhadchenko
andrey.zhadchenko at virtuozzo.com
Wed Oct 28 13:47:56 MSK 2026
We probably don't need an extra respin to delete the single comment.
@khorenko could you please remove it from patch 2/3 before applying?
Reviewed-by: Andrey Zhadchenko <andrey.zhadchenko at virtuozzo.com>
On 10/23/26 15:20, Alexander Ivanov wrote:
> A read-only dm-qcow2 table does not protect its images. Writes to the
> device pass through bio_check_ro() with a warning and allocate clusters
> in the top image, an O_RDWR top image is truncated on .ctr and
> .preresume, and merge_backward modifies the lower image. Since the
> header is not updated for a read-only table, persistent bitmaps stay
> marked consistent while the data under them changes.
>
> Patch 1 makes an image writable only if both its file and the table
> are writable. Patch 2 fails writes to a read-only table. Patch 3 keeps
> the bitmaps autoclear bit clear if it is already clear in the image,
> so that a later writable open does not revalidate stale bitmaps.
>
> https://virtuozzo.atlassian.net/browse/VSTOR-138887
>
> Alexander Ivanov (3):
> drivers/md/dm-qcow2: treat images of a read-only table as read-only
> drivers/md/dm-qcow2: fail writes to a read-only table
> drivers/md/dm-qcow2: do not revalidate inconsistent persistent bitmaps
>
> drivers/md/dm-qcow2-map.c | 9 ++++++---
> drivers/md/dm-qcow2-target.c | 11 +++++++----
> drivers/md/dm-qcow2.h | 3 ++-
> 3 files changed, 15 insertions(+), 8 deletions(-)
>
More information about the Devel
mailing list