[stgt] [PATCH 1/1] tgtimg: use posic_fallocate when creating the big files

ronnie sahlberg ronniesahlberg at gmail.com
Tue Oct 12 07:30:57 CEST 2010


List, Tomo,

Please find attached a trivial patch for tgtimg.
It changes to use posix_fallocate() when creating raw disk images
instead of using a loop with pwrite().

This makes it less intrusive to the system when creating many large
disk images at the same time.
I did try using posix_fadvise() as an alternative but that did not
work well. (it did not have much effect on the vm trashing)



regards
ronnie sahlberg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Use-posix_fallocate-to-create-the-disk-image-file-in.patch
Type: text/x-diff
Size: 1392 bytes
Desc: not available
URL: <http://lists.wpkg.org/pipermail/stgt/attachments/20101012/cfe9e0ee/attachment-0001.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Use-posix_fallocate-to-create-the-disk-image-file-in.patch.gz
Type: application/x-gzip
Size: 771 bytes
Desc: not available
URL: <http://lists.wpkg.org/pipermail/stgt/attachments/20101012/cfe9e0ee/attachment-0001.bin>


More information about the stgt mailing list