[libvirt] [PATCH] logical: Need to overwrite/clear more than just first 512 bytes

Michal Privoznik mprivozn at redhat.com
Mon Mar 27 15:27:52 UTC 2017


On 24.03.2017 18:48, John Ferlan wrote:
> https://bugzilla.redhat.com/show_bug.cgi?id=1430679
>
> As it turns out some file headers (e.g. ext4) may be larger/longer than
> the 512 bytes of zeros being written prior to a pvcreate, so let's write
> out 2048 bytes similar to how the pvcreate sources would peek at the first
> 4 sectors of the device.
>
> Make sure there is at enough bytes on the device to clear before doing
> doing the clear - just to be sure.
>
> Signed-off-by: John Ferlan <jferlan at redhat.com>
> ---
>  src/storage/storage_backend_logical.c | 22 +++++++++++++++++++++-
>  1 file changed, 21 insertions(+), 1 deletion(-)
>

ACK

Michal




More information about the libvir-list mailing list