Issue 27879: add os.syncfs() - Python tracker (original) (raw)

So syncfs is basically "sync, but only for a single file system corresponding to a given open file"? Given it's Linux only (doesn't look like it's part of any standard that UNIX or BSD OSes would provide), it seems rather special purpose to expose in Python. Is there some equivalent API for UNIX/BSD variants that syncfs could use to provide a single API that works on at least all UNIX-like systems? If not, it seems like this is an optimization that doesn't generalize; is it worth providing it instead of just having users call os.sync and accepting the cost of syncing other file systems?