Nick Piggin wrote: > On Wed, Jan 21, 2009 at 03:15:00AM +0000, Jamie Lokier wrote: > > Nick Piggin wrote: > > An additional couple of flags to sync_file_range() would sort out the > > API: > > > > SYNC_FILE_RANGE_METADATA > > > > Commit the file metadata such as modification time and > > attributes. Think fsync() versus fdatasync(). > > Note that the problems with sync_file_range is not that it lacks a > metadata flag like fsync vs fdatasync. It is that it does not even > sync the metadata required to retrieve the data (which of course > fdatasync must do, otherwise it would be useless). Oh, I agree about that. (Different meaning of metadata, btw. That's the term used in O_SYNC vs. O_DSYNC documentation for other unixes that I've read, that's why I used it in that flag, for consistency with other unixes.) > This is just another reason why I prefer to just try to evolve the > traditional fsync interface slowly. But sync_file_range() has a bug, which you've pointed out - the missing _data-retrieval_ metadata isn't synced. In other words, it's completely useless. If that bug isn't going to be fixed, delete sync_file_range() altogether. There's no point keeping it if it's broken. And if it's fixed, it'll do what your fsync_range() does, so why have both? -- Jamie -- 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