fsync for only part of a file

wrstuden-DZEk9q7Sfju/3pe1ocb+swC/[email protected] Fri, 12 Sep 2003 21:32:51 -0700 (PDT)
Newsgroups gmane.os.bsd.api.general
Message-ID <[email protected]>
I'd like to add a version of fsync(2) which only synchronizes part of the
on disk and in-core data of a file. I am soliciting input on the name of
this call, and the general format of the functionality.

The best name so far for the functionality is fsync2(2). Suggestions on a
better name are appreciated.

The proposed signature I have in mind is:

int fsync2(int fd, off_t start, size_t run);

The call causes all of the modified attributes and the modified data
starting at offset start and extending for run bytes to be moved to a
permananent storage device. The call is not required to move modified data
outside of the given range before returning.

An implementation may, if it chooses to, wait for data outside the given
range to be flushed as well. i.e. while sub-optimal, it is acceptable for
an implementation to turn a call to fsync2(2) into a call to fsync(2).

Thoughts?

Take care,

Bill

---------------------------------------------------------------------
The BSD APIs Discussion Mailing List
To unsubscribe:
send "unsubscribe bsd-api-discuss" to majordomo-of7zbby7T3pWk0Htik3J/[email protected]