[Devel] [PATCH hci-8.1 0/3] dm-qcow2: keep images of a read-only table unmodified
Alexander Ivanov
alexander.ivanov at virtuozzo.com
Thu Oct 29 17:48:44 MSK 2026
On 10/29/26 12:42, Konstantin Khorenko wrote:
> Three things found while reviewing the series, none of them for it.
> Please fix them separately.
>
> - A v3 image with header_length < 104 is not rejected. The only check
> is header_length < sizeof(struct QCowHeader), and only when the
> compression bit is set. qemu fails such an image with "qcow2 header
> too short". For us the extension parser then starts inside the
> header.
>
> - For a v2 image hdr->header_length is never set, so it stays 0 from
> kzalloc() and the extensions are parsed from offset 0 of the header
> instead of 72. qemu sets header_length = 72 for v2.
>
> - The table mode is still tested against FMODE_WRITE in
> qcow2_check_convert_hdr(), qcow2_attach_file(),
> qcow2_truncate_preallocations(), qcow2_postsuspend() and
> qcow2_preresume(), while the series switched to BLK_OPEN_WRITE. Same
> value today, but dm_table_get_mode() returns blk_mode_t. The is_ro
> in qcow2_check_convert_hdr() has only a commented-out user and can go.
>
>
> Please file appropriate tasks and fix them separately.
Created tasks:
https://virtuozzo.atlassian.net/browse/VSTOR-152393
https://virtuozzo.atlassian.net/browse/VSTOR-152394
https://virtuozzo.atlassian.net/browse/VSTOR-152395
> --
> Best regards,
>
> Konstantin Khorenko,
> Virtuozzo Linux Kernel Team
More information about the Devel
mailing list