On 08/28/2009 09:41 AM, Christoph Hellwig wrote:
Yeah. The implementation really is trivial in 2.6.32 - we basically just need to change one function to check the new O_REALLY_SYNC flag and pass down a 0 instead of a 1 to another routine in the generic fs code, plus doing the same in a few filesystems opencoding it instead of using the generic helpers.
I don't think you have to change anything. As I wrote before, the kernel ignores unknown O_* flags. It's usually a problem. Here it is a positive thing.
So the logistics of doing the flags really is the biggest work here. And I'm not entirely sure how to do it correctly. Can we just switch the current O_SYNC defintion in the kernel headers to O_DSYNC while adding the new O_SYNC and everything will continue to work?
No, that's not a good idea. This would mean a program compiled with newer headers is using O_SYNC which isn't known to old kernels and ignored. Such programs will then not even get the current O_DSYNC benefits.
That includes a write from another process? So O_RSYNC basically means doing an range-fdatasync before the actual read request?
Yes. You can easily see how this can be useful.
Again, we could implement this easily if we care enough.
I think it can be useful at times. -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖ -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html