LWN: Comments on "fallocate()" https://lwn.net/Articles/226710/ This is a special feed containing comments posted to the individual LWN article titled "fallocate()". en-us Thu, 04 Sep 2025 16:34:40 +0000 Thu, 04 Sep 2025 16:34:40 +0000 https://www.rssboard.org/rss-specification lwn@lwn.net fallocate() - ignoring POSIX https://lwn.net/Articles/228291/ https://lwn.net/Articles/228291/ pjdc Surely the C library can easily implement posix_fallocate() in terms of fallocate().<br> Thu, 29 Mar 2007 06:55:08 +0000 Incomplete patch? https://lwn.net/Articles/227936/ https://lwn.net/Articles/227936/ giraffedata <blockquote> I guess this might be a case where we assume that if a filesystem does not explicitly initialise the field, it is NULL, as the system call code does check for this field to be non-NULL. If it is NULL, it returns ->ENOSYS. So, I guess, you are right in saying that there are certain per-filesystem patches that need to be installed. </blockquote> So you're saying that the assumption that if a filesystem driver does not explicitly initialize the field, it is NULL, is wrong? What makes you think that? Tue, 27 Mar 2007 15:50:29 +0000 Incomplete patch? https://lwn.net/Articles/227796/ https://lwn.net/Articles/227796/ shishir i guess this might be a case where we assume that if a filesystem does not explicitly initialise the field, it is NULL, as the system call code does check for this field to be non-NULL. If it is NULL, it returns -ENOSYS. So, I guess, you are right in saying that there are certain per-filesystem patches that need to be installed.<br> Mon, 26 Mar 2007 17:44:15 +0000 fallocate() - ignoring POSIX https://lwn.net/Articles/227753/ https://lwn.net/Articles/227753/ rwmj I don't know if I'm reading this right, but are they proposing to ignore the POSIX standard?<br> <p> Rich.<br> Mon, 26 Mar 2007 14:28:31 +0000 Incomplete patch? https://lwn.net/Articles/227576/ https://lwn.net/Articles/227576/ giraffedata <blockquote> Have you looked at GCC sources ? That's where this code is, after all... </blockquote> <p> No, it's not. It's in the filesystem drivers, in the statement that declares the inode_operations variables. Looking to GCC source code for the setting of this member to NULL is like looking at at GCC source code to see the setting of 'a' to 7 in a program that contains the line "int a = 7;" <blockquote> Hint: what does C standard says about initialization of static and globar structures ? </blockquote> <p> An even better hint is that all the filesystem drivers (I hope) initialize the inode operations field by assigning from a static constant inode_operations variable. Because that's not obvious, and is essential to this patch working. Fri, 23 Mar 2007 20:46:58 +0000 fallocate() https://lwn.net/Articles/227525/ https://lwn.net/Articles/227525/ k8to Just when almost all of the use cases had dried up ;-)<br> Fri, 23 Mar 2007 14:50:21 +0000 fallocate() https://lwn.net/Articles/227518/ https://lwn.net/Articles/227518/ nix Quite so! punch should really have been in POSIX from the start, except <br> that sparse files were never really in POSIX per se: they were just an <br> efficiency hack atop seeking, so nobody seems to have thought `hey, what <br> if we want to make an existing file sparser than it is?'<br> <p> Fri, 23 Mar 2007 14:37:25 +0000 Incomplete patch? https://lwn.net/Articles/227487/ https://lwn.net/Articles/227487/ khim <p><i>I can't see any code for initializing this field to any value</i></p> <p>Have you looked at GCC sources ? That's where this code is, after all...</p> <p>P.S. Hint: what does C standard says about initialization of static and globar structures ?</p> Fri, 23 Mar 2007 09:56:21 +0000 Incomplete patch? https://lwn.net/Articles/227474/ https://lwn.net/Articles/227474/ ldo <P>It seems to me Amit Arora's patch is incomplete. It adds a new field to the <TT>inode_operations</TT> structure, but I can't see any code for initializing this field to any value. Presumably there are mandatory patches for all filesystems to at least set this field to <TT>NULL</TT> if they don't support this operation. Otherwise, an attempt to invoke this new system call could crash your system. Fri, 23 Mar 2007 05:21:34 +0000 fallocate() https://lwn.net/Articles/227439/ https://lwn.net/Articles/227439/ landley Punch! Finally!<br> <p> <a href="http://www.uwsg.iu.edu/hypermail/linux/kernel/0312.0/0889.html">http://www.uwsg.iu.edu/hypermail/linux/kernel/0312.0/0889...</a><br> Thu, 22 Mar 2007 21:48:42 +0000 fallocate() https://lwn.net/Articles/227254/ https://lwn.net/Articles/227254/ nix FA_DEALLOCATE is probably easier to implement, at least for filesystems supporting sparse files at all.<br> Thu, 22 Mar 2007 11:50:04 +0000