.\" -*- coding: UTF-8 -*- .\" Copyright (c) 1992 Drew Eckhardt (drew@cs.colorado.edu), March 28, 1992 .\" and Copyright (c) 2011 Michael Kerrisk .\" .\" %%%LICENSE_START(VERBATIM) .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" %%%LICENSE_END .\" .\" Modified by Michael Haardt .\" Modified Sat Jul 24 12:02:47 1993 by Rik Faith .\" Modified 15 Apr 1995 by Michael Chastain : .\" Added reference to `bdflush(2)'. .\" Modified 960414 by Andries Brouwer : .\" Added the fact that since 1.3.20 sync actually waits. .\" Modified Tue Oct 22 22:27:07 1996 by Eric S. Raymond .\" Modified 2001-10-10 by aeb, following Michael Kerrisk. .\" 2011-09-07, mtk, Added syncfs() documentation, .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH SYNC 2 "13 agosto 2020" Linux "Manuale del programmatore di Linux" .SH NOME sync, syncfs \- svuota la cache del filesystem sul disco .SH SINTASSI \fB#include \fP .PP \fBvoid sync(void);\fP .PP \fBint syncfs(int \fP\fIfd\fP\fB);\fP .PP .RS -4 Macro per test di funzionalità per glibc (vedere \fBfeature_test_macros\fP(7)): .RE .PP \fBsync\fP(): .ad l .RS 4 .\" || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED _XOPEN_SOURCE\ >=\ 500 || /* Sin da glibc 2.19: */ _DEFAULT_SOURCE || /* Glibc versioni <= 2.19: */ _BSD_SOURCE .RE .ad .PP \fBsyncfs\fP(): .ad l .RS 4 _GNU_SOURCE .RE .ad .SH DESCRIZIONE \fBsync\fP() provoca la scrittura nei filesystem sottostanti di tutte le modifiche in sospeso ai metadati del file system e ai dati dei file memorizzati nella cache. .PP \fBsyncfs\fP() è come \fBsync\fP(), ma sincronizza solo il filesystem contenente il file a cui si riferisce il descrittore di file aperto \fIfd\fP. .SH "VALORE RESTITUITO" \fBsyncfs\fP() ritorna 0 in caso di successo; in caso di errore, ritorna \-1 e imposta \fIerrno\fP in modo che indichi l'errore. .SH ERRORI \fBsync\fP() termina sempre con successo. .PP \fBsyncfs\fP() può fallire per almeno il motivo seguente: .TP \fBEBADF\fP \fIfd\fP non è un descrittore di file valido. .TP \fBEIO\fP Si è verificato un errore durante la sincronizzazione. Quest'errore può riguardare i dati scritti su qualsiasi file sul filesystem, o su metadati relativi al filesystem stesso. .TP \fBENOSPC\fP Lo spazio su disco è stato esaurito nel corso della sincronizzazione. .TP \fBENOSPC\fP, \fBEDQUOT\fP I dati sono stati scritti in un file su NFS o su un altro filesystem che non alloca spazio al momento di una chiamata di sistema a \fBwrite\fP(2), e alcune scritture precedenti non sono andate a buon fine per mancanza di spazio di archiviazione. .SH VERSIONI \fBsyncfs\fP() è apparso per la prima volta in Linux 2.6.39; il supporto alla libreria è stato aggiunto a glibc nella versione version 2.14. .SH "CONFORME A" \fBsync\fP(): POSIX.1\-2001, POSIX.1\-2008, SVr4, 4.3BSD. .PP \fBsyncfs\fP() è specifico di Linux. .SH NOTE A partire da glibc 2.2.2 il prototipo Linux per \fBsync\fP() è come elencato sopra, seguendo i vari standard. In libc4, libc5, e glibc 2.2.1 e precedenti era "int sync(void)", e \fBsync\fP() restituiva sempre 0. .PP Secondo le specifiche degli standard (per esempio, POSIX.1\-2001), \fBsync\fP() pianifica le scritture, ma potrebbe ritornare prima che la scrittura sia stata realmente effettuata. Comunque Linux attende il completamento degli I/O, e quindi \fBsync\fP() o \fBsyncfs\fP() offrono la stessa garanzia di \fBfsync\fP() chiamato su ogni file rispettivamente del sistema o del file system. .PP .\" commit 735e4ae5ba28c886d249ad04d3c8cc097dad6336 Nelle versioni del kernel precedenti alla 5.8, \fBsyncfs\fP() fallisce solo quando alla funzione viene fornito come parametro un descrittore di file non valido (\fBEBADF\fP). A partire da Linux 5.8, \fBsyncfs\fP() riporta un errore anche se non è stato possibile riscrivere uno o più inode dall'ultima chiamata a \fBsyncfs\fP(). .SH BUG Prima della versione 1.3.20 Linux non aspettava il completamento degli I/O, prima di ritornare. .SH "VEDERE ANCHE" \fBsync\fP(1), \fBfdatasync\fP(2), \fBfsync\fP(2) .SH COLOPHON Questa pagina fa parte del rilascio 5.10 del progetto Linux \fIman\-pages\fP. Una descrizione del progetto, le istruzioni per la segnalazione degli errori, e l'ultima versione di questa pagina si trovano su \%https://www.kernel.org/doc/man\-pages/. .SH TRADUZIONE La traduzione italiana di questa pagina di manuale è stata creata da Goffredo Baroncelli , Giulio Daprelà , Elisabetta Galli e Marco Curreli . Questa traduzione è documentazione libera; leggere la .UR https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Versione 3 .UE o successiva per le condizioni di copyright. Non ci assumiamo alcuna responsabilità. Per segnalare errori nella traduzione di questa pagina di manuale inviare un messaggio a .MT pluto-ildp@lists.pluto.it .ME .