Title: add os.syncfs()
Type: enhancement Stage:
Components: Library (Lib) Versions: Python 3.11
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: fdrake, josh.r, nirs, socketpair
Priority: normal Keywords:

Created on 2016-08-27 18:17 by socketpair, last changed 2021-10-10 13:06 by nirs.

Messages (4)
msg273790 - (view) Author: Марк Коренберг (socketpair) * Date: 2016-08-27 18:17
I mean
msg273888 - (view) Author: Josh Rosenberg (josh.r) * (Python triager) Date: 2016-08-29 21:50
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?
msg273900 - (view) Author: Марк Коренберг (socketpair) * Date: 2016-08-30 03:48
1. It is appropriate to call `sync()` when one calls `os.syncfs()` if `syncfs()` syscall is not supported in kernel.
3. ?
msg403584 - (view) Author: Nir Soffer (nirs) * Date: 2021-10-10 13:06
Updating python version, this is not relevant to 3.6 now.

On linux users can use "sync --file-system /path" but it would be nice if we have something that works on multiple platforms.
Date User Action Args
2021-10-10 13:06:05nirssetnosy: + nirs

messages: + msg403584
versions: + Python 3.11, - Python 3.6
2017-03-01 15:28:30fdrakesetnosy: + fdrake
2016-08-30 03:48:10socketpairsetmessages: + msg273900
2016-08-29 21:50:03josh.rsetnosy: + josh.r
messages: + msg273888
2016-08-27 18:17:12socketpaircreate