On Tue, Sep 19, 2017 at 10:55:20AM -0400, Theodore Ts'o wrote: > On Mon, Sep 18, 2017 at 03:55:40PM -0600, Andreas Dilger wrote: > > > And like hch said, why not {f,}pathconf? > > > > The problem with pathconf() is that this is just made up by GlibC, and > > doesn't actually communicate with the kernel or the filesystem at all. > > For example, _PC_LINK_MAX does not return different values for ext2/ext4 > > filesystems based on feature flags, only what is hard-coded into GlibC > > based on the filesystem magic. This is not going to work as a per-file > > source of information. > > > > For example, even though EXT4_LINK_MAX has been 65000 for many years, > > GlibC reports 32000 for an ext4 filesystem since it only uses the magic: > > Maybe the right answer is we should define a new pathconfat(2) system > call which can be used as part of a C library's implementation of > pathconf() and fpathconf()? glibc probably won't use it for years, of > course. But we can at least provide the information via an interface > which we can control, and which is capable of returning correct > results? > > - Ted Right, *I think* this is what Christoph suggested in his recent reply. It sounds fair enough to me and this is much more usefull beyond just fallocate, so I can look into it. -Lukas -- To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html