diff options
author | Alessio Balsini <balsini@google.com> | 2019-08-27 18:03:17 +0100 |
---|---|---|
committer | Alessio Balsini <balsini@google.com> | 2019-09-02 11:24:33 +0000 |
commit | 396a4f279eea91fc935823625e61670b81e823e7 (patch) | |
tree | af02a7271bdc054e7107e49d48dd86e65294896e /init/interface_utils.cpp | |
parent | 0c100685dcbb24790615b228330f1b44642e6bf0 (diff) |
CreateSnapshot: reduce zero-filling for CoW images
Instead of zero-filling the whole image, only clean the dm-snapshot
metadata header of the CoW file.
Zero-filling a large image may take a long time, and this is a safe, but
not necessary operation if the operation is intended to prepare an
initial CoW file that will be used with a dm-snapshot device.
According to the Linux kernel code, only the first 32 bits of the CoW
file is used to detect if the dm-snapshot device under creation will be
at an initial state or the continuation of a previous dm-snapshot.
CREATE_IMAGE_RESET_SNAP is a flag that reduces the zeroing of the image
file to the first file chunk.
Change-Id: Ibc9fb3b6d19666a92125c988687ff8dacfad47be
Depends-On: I242e57a9a622fbb738bf82f8a260af1b13810069
Bug: 139378014
Test: manual, snapshot_test
Signed-off-by: Alessio Balsini <balsini@google.com>
Diffstat (limited to 'init/interface_utils.cpp')
0 files changed, 0 insertions, 0 deletions