On Thu, Jul 4, 2013 at 3:17 PM, Roland Mainz <[email protected]> wrote:
> Hi!
>
> ----
>
> Attached (as "astksh20130628_sync_fsync_syncfs001.diff.txt") is a
> patch which adds support for |fsync()| and |syncfs()| to the sync(1)
> builtin.
>
> The main purpose of the patch is to help in three cases:
> 1. Networked/distributed filesystems where |fsync()| or |syncfs()| can
> used to force syncronisation with the server (for example usefull to
> weed-out NFSv4 delegation bugs or for syncronisation primitives)
> 2. Operating system install software (which may not use a graceful
> shutdown before reboot)
> 3. Logout scripts (e.g. call |syncfs()| for a user's home directory at
> logout time to flush his/her data to storage and make (memory) buffer
> space available for something else. This (much more fine-grained
> approach) may be preferred over a "raw" sync(2) call on multiuser
> systems with hundreds of users)
>
> Question (mainly for Glenn):
> Do you see any need that we have to call SFIO's flush facilities
> before calling |fsync()| or |syncfs()| ?

IMO you have to do that to ensure that nothing is left in sfio's
buffers. Remember the rule: First flush to get a safe state, and then
sync to disk.

>
> Comments/rants/etc. welcome...

Irek
_______________________________________________
ast-developers mailing list
[email protected]
http://lists.research.att.com/mailman/listinfo/ast-developers

Reply via email to