Re: Shutdown - 25 Years Later

Liste des GroupesRevenir à col misc 
Sujet : Re: Shutdown - 25 Years Later
De : invalid (at) *nospam* invalid.invalid (Richard Kettlewell)
Groupes : comp.os.linux.misc
Date : 20. Apr 2025, 20:44:27
Autres entêtes
Organisation : terraraq NNTP server
Message-ID : <wwvh62i7h44.fsf@LkoBDZeT.terraraq.uk>
References : 1 2 3 4 5 6 7 8
User-Agent : Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
Pancho <Pancho.Jones@protonmail.com> writes:
Richard Kettlewell wrote:
In short there’s no number of syncs that will guarantee your data is
all actually on disk.
>
Out of idle curiosity, what will guarantee all pending writes are
flushed to disk, apart from shutdown/reboot?

On Linux, see previous post. Portably (i.e. POSIX/SUS), however, there’s
no way to flush _all_ pending writes and let you know when they’re
complete.

But this rarely matters in practice. If your application needs to block
until data is written to underlying storage, there’s multiple options:
open files with O_SYNC, or add explicit flushes with fsync(2) or
fdatasync(2).

I seem to remember (from decades back) the actual advice was:
>
$ sync; sleep 10;
>
Or some suitable sleep period, rather than multiple sync;

Obviously that only works if you know how long it’ll take to flush all
pending writes, and that there won’t be any subsequent writes that you
care about before you do whatever it is you’re going to do that makes
you care about the question in the first place.

--
https://www.greenend.org.uk/rjk/

Date Sujet#  Auteur
18 Apr 25 * Re: Shutdown - 25 Years Later49Eli the Bearded
18 Apr 25 +* Re: Shutdown - 25 Years Later3Lawrence D'Oliveiro
18 Apr 25 i`* Re: Shutdown - 25 Years Later2Eli the Bearded
18 Apr 25 i `- Re: Shutdown - 25 Years Later1Lawrence D'Oliveiro
18 Apr 25 `* Re: Shutdown - 25 Years Later45Andy Burns
18 Apr 25  +* Re: Shutdown - 25 Years Later42Lawrence D'Oliveiro
19 Apr 25  i`* Re: Shutdown - 25 Years Later41Jim Jackson
19 Apr 25  i +- Re: Shutdown - 25 Years Later1Lawrence D'Oliveiro
20 Apr 25  i `* Re: Shutdown - 25 Years Later39Richard Kettlewell
20 Apr 25  i  +- Re: Shutdown - 25 Years Later1The Natural Philosopher
20 Apr 25  i  `* Re: Shutdown - 25 Years Later37Pancho
20 Apr 25  i   +- Re: Shutdown - 25 Years Later1Richard Kettlewell
20 Apr 25  i   `* Re: Shutdown - 25 Years Later35Computer Nerd Kev
20 Apr 25  i    +- Re: Shutdown - 25 Years Later1Computer Nerd Kev
21 Apr 25  i    `* Re: Shutdown - 25 Years Later33Lawrence D'Oliveiro
22 Apr 25  i     `* Re: Shutdown - 25 Years Later32Carlos E.R.
22 Apr 25  i      +* Re: Shutdown - 25 Years Later22The Natural Philosopher
22 Apr 25  i      i+* Re: Shutdown - 25 Years Later17Carlos E.R.
22 Apr 25  i      ii+- Re: Shutdown - 25 Years Later1Pancho
22 Apr 25  i      ii`* Re: Shutdown - 25 Years Later15The Natural Philosopher
22 Apr 25  i      ii +* Re: Shutdown - 25 Years Later4Pancho
22 Apr 25  i      ii i+* Re: Shutdown - 25 Years Later2The Natural Philosopher
23 Apr 25  i      ii ii`- Re: Shutdown - 25 Years Later1Pancho
22 Apr 25  i      ii i`- Re: Shutdown - 25 Years Later1Lawrence D'Oliveiro
23 Apr 25  i      ii `* Re: Shutdown - 25 Years Later10candycanearter07
24 Apr 25  i      ii  `* Re: Shutdown - 25 Years Later9Lawrence D'Oliveiro
25 Apr 25  i      ii   `* Re: Shutdown - 25 Years Later8candycanearter07
26 Apr 25  i      ii    `* Re: Shutdown - 25 Years Later7Lawrence D'Oliveiro
28 Apr 25  i      ii     `* Re: Shutdown - 25 Years Later6John Ames
28 Apr 25  i      ii      +* Re: Shutdown - 25 Years Later4Richard Kettlewell
29 Apr 25  i      ii      i`* Re: Shutdown - 25 Years Later3The Natural Philosopher
29 Apr 25  i      ii      i `* Re: Shutdown - 25 Years Later2Richard Kettlewell
29 Apr 25  i      ii      i  `- Re: Shutdown - 25 Years Later1The Natural Philosopher
29 Apr 25  i      ii      `- Re: Shutdown - 25 Years Later1Lawrence D'Oliveiro
22 Apr 25  i      i+* Re: Shutdown - 25 Years Later3Richard Kettlewell
22 Apr 25  i      ii+- Re: Shutdown - 25 Years Later1Lawrence D'Oliveiro
23 Apr 25  i      ii`- Re: Shutdown - 25 Years Later1The Natural Philosopher
22 Apr 25  i      i`- Re: Shutdown - 25 Years Later1Lawrence D'Oliveiro
22 Apr 25  i      `* Re: Shutdown - 25 Years Later9Lawrence D'Oliveiro
23 Apr 25  i       `* Re: Shutdown - 25 Years Later8Carlos E.R.
24 Apr 25  i        `* Re: Shutdown - 25 Years Later7Lawrence D'Oliveiro
25 Apr 25  i         `* Re: Shutdown - 25 Years Later6Carlos E.R.
26 Apr 25  i          +- Re: Shutdown - 25 Years Later1Lawrence D'Oliveiro
26 Apr 25  i          `* Re: Shutdown - 25 Years Later4The Natural Philosopher
26 Apr 25  i           +* Re: Shutdown - 25 Years Later2Richard Kettlewell
26 Apr 25  i           i`- Re: Shutdown - 25 Years Later1Lawrence D'Oliveiro
26 Apr 25  i           `- Re: Shutdown - 25 Years Later1Lawrence D'Oliveiro
18 Apr 25  `* Re: Shutdown - 25 Years Later2The Natural Philosopher
19 Apr 25   `- Re: Shutdown - 25 Years Later1Lawrence D'Oliveiro

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal