Re: fsync for only part of a file

Klaus Klein <kleink-/EVffDBBL2sGkGK02G/[email protected]> Sat, 13 Sep 2003 19:12:32 +0200
Newsgroups gmane.os.bsd.api.general
Message-ID <[email protected]>
wrstuden-DZEk9q7Sfju/3pe1ocb+swC/[email protected] writes:

> 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);

Some general API concern: you want to make the run argument an off_t
as well since we're dealing with _file_ offsets after all.  For a
precedent, check out fcntl(2)'s struct flock.


- Klaus

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