Matej Cepl wrote: > Hi, > > I wanted to write this utility which exists on other Unices for > some time, but with introduction of posix_fallocate this actually > seems make sense now. > > Eagerly waiting for comments and critcism -- this is my first > serious program in C which I make public, so I expect a lot of > both ;-).
Thanks Matěj. Just to be clear, I think the raison d'être of fallocate is not really for _creating_ large files efficiently, but for _preallocating_ them efficiently, so that subsequent writes will not get ENOSPC. ftruncate is a more standard and efficient way of merely creating a file. Rather than creating a new utility, prehaps a --preallocate option to the existing truncate utility would be better? Especially considering you added a --sparse option to mkfile which does much the same thing (although not allowing shrinking?). BTW, I think the fallocate syscall is a relatively new addition to linux, and linux filesystems like ext3 don't support it yet. I would print an error rather than failing back to ftruncate in those cases. cheers, Pádraig. _______________________________________________ Bug-coreutils mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-coreutils
