Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Jan 2025 06:46:50 +0200
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Jonathan Krebs <jonny@platon.olpp.net>
Cc:        freebsd-geom@freebsd.org
Subject:   Re: when does BIO_FLUSH happen on a disk?
Message-ID:  <Z5cPughvJnYBR3Hk@kib.kiev.ua>
In-Reply-To: <2e177cef-f703-4572-abc0-665d8702b55f@lists.freebsd.org.olpp.net>
References:  <d8f6fee8-f52e-4787-8055-bdba16a820c4@lists.freebsd.org.olpp.net> <Z5RzjsoswJlTDwSI@kib.kiev.ua> <2e177cef-f703-4572-abc0-665d8702b55f@lists.freebsd.org.olpp.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Jan 26, 2025 at 08:56:47PM +0100, Jonathan Krebs wrote:
> @Konstantin Belousov: Thank You for the fast and helpful explanation!
> 
> but does a finished write request from a disk / lower geli layer mean, that
> the data arrived on stable storage (in which case BIO_FLUSH seems
> unnecessary to exist) - or does fsync on UFS only guarantee ordering with
> respect to other operations on the same filesystem?

The callback called means that the disk hardware reported the completion
of the request (and it implies that the request was received by hw at all).
It is up to hw to interpret the meaning of completion.

For instance, if there is on-disk cache, it is possible that the dirty block
is only reached cache and not the actual storage.  Often disks try to ensure
that the cache is written out as the last sigh on the power failure event,
and explicit flush might not change the behavior.



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