]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
ensure zeros are written out when clearing volumes
authorPádraig Brady <pbrady@redhat.com>
Wed, 16 Jan 2013 16:23:48 +0000 (16:23 +0000)
committerPádraig Brady <pbrady@redhat.com>
Mon, 21 Jan 2013 12:16:23 +0000 (12:16 +0000)
commit0007d255d9b20da4e5bbcdbaf5813104fbc092da
tree6cf7660527dbef477c9cf22e3a5d043b23e23c57
parent6cfe5f2a6d99c9fff9386794149b273bd2442bd1
ensure zeros are written out when clearing volumes

Note O_DIRECT is _not_ used when copying from /dev/zero
and there are issues with enabling that (see 444cd542).
Therefore we arrange to have dd issue an fdatasync()
to ensure the data is persisted, lest it be discarded
from the write cache when the device is unprovisioned.

* cinder/volume/drivers/lvm.py (_copy_volume): Add 'conv=fdatasync'
to the dd option list if O_DIRECT isn't used when clearing
(which it won't as descrived above).

Fixes bug: 1100363
Change-Id: I76789557754ebaeb6d52bb34548a2ef17808fbf6
cinder/volume/drivers/lvm.py