Re: bus error when disk is full, with mmap & sparse file
Tobias Oetiker <[email protected]> Thu, 2 Feb 2012 08:37:47 +0100 (CET)
| Newsgroups | gmane.comp.db.rrdtool.devel |
|---|---|
| Message-ID | <alpine.DEB.2.00.1202020837280.32228__49008.5079371513$1328168280$gmane$org@johan.oetiker.ch> |
Today Richard Laager wrote: > On Thu, 2012-02-02 at 07:22 +0100, Tobias Oetiker wrote: > > * with the patch, we get performance and a sort of thin provisioning (files > > with holes). > > fallocate() does not create holes. From fallocate(2), "After a > successful call, subsequent writes into this range are guaranteed not to > fail because of lack of disk space." > > fallocate() is Linux-specific. The portable equivalent is > posix_fallocate(). On Linux, that does much the same thing as with this > patch; it tries fallocate() first and then falls back to zero-filling. > I'm not sure if that zero filling code performs better or worse than > your mmap() code. oops my bad :-) ok ... posix_fallocate then ... cheers tobi > > -- Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland http://it.oetiker.ch [email protected] ++41 62 775 9902 / sb: -9900