On Mon, 29 Apr 2002 19:56:59 +0200, Matthias Andree <[EMAIL PROTECTED]>  
said:

> Barring write cache effects, fsync() only returns after all blocks are
> on disk. While I'm not sure if and if yes, which, Linux file systems are
> affected, but for portable applications, be aware that sync() may return
> prematurely (and is allowed to!).

And in fact is the reason for the old "recipe":
  # sync
  # sync
  # sync
  # reboot

On the older Vax 750-class machines, sync could return LONG before the blocks
were all flushed - the second 2 sync's were so you were busy typing for
several seconds while the disks whirred.  Failure to understand the typing
speed issue has lead at least one otherwise-clued author to recommend:
  # sync;sync;sync
  # reboot

(the distinction being obvious if you think about when the shell reads the
commands, and when it does the fork/exec for each case....)

-- 
                                Valdis Kletnieks
                                Computer Systems Senior Engineer
                                Virginia Tech


Attachment: msg05263/pgp00000.pgp
Description: PGP signature

Reply via email to