On Sep 29, 2009 14:55 -0500, Eric Sandeen wrote: > Jiaying Zhang wrote: > > As Andreas suggested, I think the main purpose is to allow users > > to scan for any files with EOF flag with the getflag ioctl. We may > > not allow users to clear it with the setflag ioctl but just rely on > > the truncate interface, but supporting the setflag ioctl interface > > doesn't seem to do any harm. > > I like the idea of being able to find them, but adding the clearing > interface seems redundant to me. All filesystems would need to > implement this, and I don't see that we gain anything. I hadn't originally thought about being able to clear the flag, but now that it is implemented, I don't have a big objection to it. The one useful feature is that this could be done without changing the timestamps on the files, and it can be done easily from a script. We don't even have an fallocate() or other truncate() interface that can do this without changing the timestamps today. Even if we did use truncate(), that is racy with an application writing to the file, so it is not as safe as a call which is guaranteed to only discard the unused preallocated blocks. I don't think all other filesystems need to support it, that is up to them. As to whether applications use this or not remains to be seen. I doubt most applications will be written to be ext4-specific, but I like the ability to scan/clear preallocated space without writing a binary to do that, if I need it in the future. Cheers, Andreas -- Andreas Dilger Sr. Staff Engineer, Lustre Group Sun Microsystems of Canada, Inc. -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html