.\" -*- 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 sierpnia 2020 r." Linux "Podręcznik programisty Linuksa" .SH NAZWA sync, syncfs \- zrzucenie buforów systemów plików na dysk .SH SKŁADNIA \fB#include \fP .PP \fBvoid sync(void);\fP .PP \fBint syncfs(int \fP\fIfd\fP\fB);\fP .PP .RS -4 Wymagane ustawienia makr biblioteki glibc (patrz \fBfeature_test_macros\fP(7)): .RE .PP \fBsync\fP(): .ad l .RS 4 .\" || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED _XOPEN_SOURCE\ >=\ 500 || /* Od glibc 2.19: */ _DEFAULT_SOURCE || /* Wersje glibc <= 2.19: */ _BSD_SOURCE .RE .ad .PP \fBsyncfs\fP(): .ad l .RS 4 _GNU_SOURCE .RE .ad .SH OPIS \fBsync\fP() wymusza fizyczne zapisanie w systemach plików wszystkich oczekujących modyfikacji metadanych systemów plików i zbuforowanych danych plików. .PP \fBsyncfs\fP() jest podobny do \fBsync\fP(), ale synchronizuje tylko system plików zawierający plik, do którego odnosi się otwarty deskryptor pliku \fIfd\fP. .SH "WARTOŚĆ ZWRACANA" Po pomyślnym zakończeniu \fBsyncfs\fP() zwraca zero, po błędzie zwraca \-1 i odpowiednio ustawia \fIerrno\fP, wskazując na rodzaj błędu. .SH BŁĘDY \fBsync\fP() zawsze kończy się pomyślnie. .PP \fBsyncfs\fP() can fail for at least the following reasons: .TP \fBEBADF\fP \fIfd\fP nie jest prawidłowym deskryptorem pliku. .TP \fBEIO\fP An error occurred during synchronization. This error may relate to data written to any file on the filesystem, or on metadata related to the filesystem itself. .TP \fBENOSPC\fP Disk space was exhausted while synchronizing. .TP \fBENOSPC\fP, \fBEDQUOT\fP Data was written to a files on NFS or another filesystem which does not allocate space at the time of a \fBwrite\fP(2) system call, and some previous write failed due to insufficient storage space. .SH WERSJE \fBsyncfs\fP() pojawił się w Linuksie 2.6.39; wsparcie biblioteczne zostało dodane w wersji 2.14 biblioteki glibc. .SH "ZGODNE Z" \fBsync\fP(): POSIX.1\-2001, POSIX.1\-2008, SVr4, 4.3BSD. .PP \fBsyncfs\fP() jest specyficzne dla Linuksa. .SH UWAGI Począwszy od glibc 2.2.2 prototyp wywołania \fBsync\fP() w Linuksie wygląda jak powyżej, zgodnie z różnymi standardami. W wersji 2.2.1 i wcześniejszych biblioteki glibc było to "int sync(void)", a \fBsync\fP() zawsze zwracało 0. .PP According to the standard specification (e.g., POSIX.1\-2001), \fBsync\fP() schedules the writes, but may return before the actual writing is done. However Linux waits for I/O completions, and thus \fBsync\fP() or \fBsyncfs\fP() provide the same guarantees as \fBfsync\fP() called on every file in the system or filesystem respectively. .PP .\" commit 735e4ae5ba28c886d249ad04d3c8cc097dad6336 In mainline kernel versions prior to 5.8, \fBsyncfs\fP() will fail only when passed a bad file descriptor (\fBEBADF\fP). Since Linux 5.8, \fBsyncfs\fP() will also report an error if one or more inodes failed to be written back since the last \fBsyncfs\fP() call. .SH BŁĘDY Przed wersją 1.3.20 Linux nie czekał na zakończenie operacji wejścia/wyjścia przed powróceniem z tego wywołania systemowego. .SH "ZOBACZ TAKŻE" \fBsync\fP(1), \fBfdatasync\fP(2), \fBfsync\fP(2) .SH "O STRONIE" Angielska wersja tej strony pochodzi z wydania 5.10 projektu Linux \fIman\-pages\fP. Opis projektu, informacje dotyczące zgłaszania błędów oraz najnowszą wersję oryginału można znaleźć pod adresem \%https://www.kernel.org/doc/man\-pages/. .SH TŁUMACZENIE Autorami polskiego tłumaczenia niniejszej strony podręcznika są: Przemek Borys , Andrzej Krzysztofowicz i Robert Luberda . Niniejsze tłumaczenie jest wolną dokumentacją. Bliższe informacje o warunkach licencji można uzyskać zapoznając się z .UR https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License w wersji 3 .UE lub nowszej. Nie przyjmuje się ŻADNEJ ODPOWIEDZIALNOŚCI. Błędy w tłumaczeniu strony podręcznika prosimy zgłaszać na adres .MT manpages-pl-list@lists.sourceforge.net .ME .