mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-23 02:05:07 +03:00
wipe_lv: always zero at least 4K
When zero_sectors passed value like 1 - we could zero only 1 sector. Reinstantiate we always zero at least 4K block.
This commit is contained in:
parent
8ee2479dd0
commit
9c746f153e
@ -7248,7 +7248,9 @@ int wipe_lv(struct logical_volume *lv, struct wipe_params wp)
|
||||
if (wp.is_metadata) /* Verbosely notify metadata will not be fully zeroed */
|
||||
log_verbose("Metadata logical volume %s not fully zeroed and may contain stale data.",
|
||||
display_lvname(lv));
|
||||
zero_sectors = wp.zero_sectors ? : UINT64_C(4096) >> SECTOR_SHIFT;
|
||||
zero_sectors = UINT64_C(4096) >> SECTOR_SHIFT;
|
||||
if (wp.zero_sectors > zero_sectors)
|
||||
zero_sectors = wp.zero_sectors;
|
||||
|
||||
if (zero_sectors > lv->size)
|
||||
zero_sectors = lv->size;
|
||||
|
Loading…
x
Reference in New Issue
Block a user