]> git.ipfire.org Git - thirdparty/libvirt.git/commit
logical: Need to overwrite/clear more than just first 512 bytes
authorJohn Ferlan <jferlan@redhat.com>
Fri, 24 Mar 2017 16:25:27 +0000 (12:25 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Mon, 27 Mar 2017 16:48:05 +0000 (12:48 -0400)
commit6760cc4bfddb84a8ab33e8b008c0440013c17499
tree63b9704f43307c48fbf0f005a8540ace0ad4b21c
parent2902771fa0de27a8963f949db2240bce52b6999b
logical: Need to overwrite/clear more than just first 512 bytes

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.
src/storage/storage_backend_logical.c