Dave Chinner wrote:
The point of this SYNC flag is to ensure that you get nothing other than blocks mapped to disk - no delalloc regions, etc. The only sane way to do that is an atomic 'sync+map' operation. This is not a filesystem specific feature - it's what the SYNC flag should be defined as providing.
If the real need is to force allocation then the flag should be something like FIEMAP_FLAG_ALLOC and not need to do fsync or any data flush, just ensure there is assigned storage.
Linux already defines it this way and it is in use by existing userspace utilities that *expect this semantic* is much, much more important.
From you and Anton, I understand the only critical semantic is to never get back a delalloc from xfs. But, I still don't see the critical need when in a later email you say:
The only application that uses the XFS ioctls are xfs utilities, and they tend to work around the assumption that the mapping operation returns a consistent map at the time the call was made.
So... the situation is you are saying you must keep it the same for the utilities that are XFS-specific and that you must change anyway to use fiemap. As Jamie said, just put in the code to skip any unknown extents. Before replying, wait for the next email that says why I think those utilities have semantic problems too. jim -- 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