On Fri, Jul 10, 2009 at 04:47:02PM -0400, Cole Robinson wrote:
The CreateRaw function has some 'file' only assumptions, so
break the agnostic
cloning bits to a separate function.
---
src/storage_backend.c | 160 ++++++++++++++++++++++++++++---------------------
1 files changed, 92 insertions(+), 68 deletions(-)
ACK. One thing occurs to me for the future. We should probably use
the fallocate() call to attempt to pre-allocate the target volume
and then copy the data across afterwards. fallocate() will only
succeeed on filesystems supporting extents (eg ext4), so it is
guareteened always fast (unlike posix_fallocate() which falls back
to writing zeros. Anyway, by attempting fallocate() before cloning
we get good extents allocation for filesystems where this matters.
Daniel
--
|: Red Hat, Engineering, London -o-
http://people.redhat.com/berrange/ :|
|:
http://libvirt.org -o-
http://virt-manager.org -o-
http://ovirt.org :|
|:
http://autobuild.org -o-
http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|