> Now, what happens if you do a posix_fallocate("foo", 0, 4GiB)? The file sys$
Given the intent of posix_fallocate as I understand it, that's the only reasonable option for FFS. If a filesystem has a way to record a block that should read as zeros but is allocated in the sense that a block is guaranteed to be available to back writes, then, maybe. But are there any such? (See below.) > Technically, a file system is allowed to make that optimization for the "all$ Speaking from an FFS perspective.... All you need is a second magic block number. Block number zero is already reserved for holes. Making, say, block number 1, or -1, or some such, reserved to represent "block-of-zeros semantics for which all backing data has been accounted as allocated", so that writing such a block is guaranteed to have space available? That sounds like a way to implement that that's relatively simple and involves relatively small changes. (Indirect blocks would complicate it slightly, but not all that much.) Of course, it would be incompatible with pre-change implementations, but I think that has to be true of any such optimization, since it has to involve an on-disk change. /~\ The ASCII Mouse \ / Ribbon Campaign X Against HTML mo...@rodents-montreal.org / \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B