Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Jul 2011 07:50:50 -0700
From:      Michael Sierchio <kudzu@tenebras.com>
To:        Polytropon <freebsd@edvax.de>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: How to sync a file on FreeBSD? [SOLVED]
Message-ID:  <CAHu1Y73YPARDQotCpmCyJQSLPQx07YpUSUWNrK%2BRbyNftwGSSw@mail.gmail.com>
In-Reply-To: <20110722164254.4d4c1093.freebsd@edvax.de>
References:  <201107221337.15804.pieter@degoeje.nl> <1311340592.24555.YahooMailClassic@web160109.mail.bf1.yahoo.com> <CAHu1Y736ogt3Z-9v4xqaD4vLT7y1A%2BOsBicsaeb0mdi4M7XhVA@mail.gmail.com> <20110722164254.4d4c1093.freebsd@edvax.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Jul 22, 2011 at 7:42 AM, Polytropon <freebsd@edvax.de> wrote:

> But wouldn't sync() (see "man 2 sync") make sure that
> all buffers, even in regards to soft updates, get
> immediately flushed / written?

Apparently not. I think most of Matt Dillon's notes are still relevant.

http://leaf.dragonflybsd.org/mailarchive/kernel/2010-01/msg00005.html

>> In order to
>> implement a stable queue, it would be best to use a different
>> filesystem.
>
> What type of filesystem would match those requirements?

I would make a UFS filesystem without Softupdates enabled,  use
fflush() and wait for a proper ack before promising to the caller that
the bits will survive something like pulling the plug.  Softupdates
guarantees metadata consistency. I would probably make decisions about
block and fragment sizes based on knowledge of the physical device's
buffer mechanism, sector sizes, etc.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAHu1Y73YPARDQotCpmCyJQSLPQx07YpUSUWNrK%2BRbyNftwGSSw>