tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: fsync, rdiff-backup, wapbl, and WD Elements 1T drive



christos%astron.com@localhost (Christos Zoulas) writes:

> In article <201111010318.pA13IhOd001828%ginseng.pulsar-zone.net@localhost>,
> Matthew Mondor  <mm_lists%pulsar-zone.net@localhost> wrote:
>>On Mon, 31 Oct 2011 19:58:27 -0400
>>Greg Troxel <gdt%ir.bbn.com@localhost> wrote:
>>
>>> Obligatory actual netbsd tech-kern content: It seems like we really need
>>> a sync_synchronous(2) system call that guarantees that all file system
>>> operations that have completed (syscall returned) before the issuance of
>>> the sync_synchronous call are on disk before sync_synchronous returns.
>>> It seems odd that for sync, there is no waiting, fsync seems to wait,
>>> and fsync_range can flush or not flush caches, more or less.
>>
>>Hmm since in sync(2), the non-synchronous issue is noted as a bug:
>>
>>BUGS
>>     sync() may return before the buffers are completely flushed.
>>
>>Does this mean that sync(2) should normally be synchronous and fixed to
>>be, such that sync_synchronous(2) not be necessary?
>
> Which sync man page are you reading? Ours has:
>
>      Historically, sync() would schedule buffers for writing but not actually
>      wait for the writes to finish.  It was necessary to issue a second or
>      sometimes a third call to ensure that all buffers had in fact been writ-
>      ten out.  In NetBSD, sync() does not return until all buffers have been
>      written.

My man page on 5.1 matches Mathew's.

But, does sync do cache flushes on all disks as well?

Does SUS require this?

Attachment: pgpZvREjOgCSe.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index