On Thu, Mar 19, 2009 at 09:47:12PM +0530, Amit Shah wrote:
On (Thu) Mar 19 2009 [20:17:52], Amit Shah wrote:
> This patchset makes use of the posix_fallocate() call to allocate
> chunks of files whenever needed if it's available.
>
> We fallback to using safewrite() if it's not available.
>
> mmap() could be used instead of safewrite too; I have a patch in case
> someone is interested in seeing it.
Something like this:
>From d33b843b381ea6a25c6e8efb6b248965a40e5f84 Mon Sep 17 00:00:00 2001
From: Amit Shah <amit.shah(a)redhat.com>
Date: Thu, 19 Mar 2009 21:43:50 +0530
Subject: [PATCH] Use mmap() and memset() for safezero
If available, use mmap to allocate zeroed chunks for files. This
should be faster than allocating small chunks using safewrite.
Signed-off-by: Amit Shah <amit.shah(a)redhat.com>
ACK, looks like a good extension.
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 :|