O nás     Inzerce     KontaktSpolehlivé informace o IT již od roku 2011
Hledat
Nepřehlédněte: Usnadní vám práci: Pozoruhodné IT produkty pro rok 2024
Správa dokumentů
Digitální transformace
Informační systémy
Hlavní rubriky: Informační systémy, Mobilní technologie, Datová centra, Sítě, IT bezpečnost, Software, Hardware, Zkušenosti a názory, Speciály

Pozoruhodné IT produkty 2024
E-knihy o IT zdarma
Manuál Linux
[Linux manuál]

fdatasync: synchronizovat vnitřní data souboru s daty na disku

Originální popis anglicky: fdatasync - synchronize a file's in-core data with that on disk

Návod, kniha: Linux Programmer's Manual

STRUČNĚ

#include <unistd.h>
 
int fdatasync(int fd);

POPIS / INSTRUKCE

fdatasync flushes all data buffers of a file to disk (before the system call returns). It resembles fsync but is not required to update the metadata such as access time.
 
Applications that access databases or log files often write a tiny data fragment (e.g., one line in a log file) and then call fsync immediately in order to ensure that the written data is physically stored on the harddisk. Unfortunately, fsync will always initiate two write operations: one for the newly written data and another one in order to update the modification time stored in the inode. If the modification time is not a part of the transaction concept fdatasync can be used to avoid unnecessary inode disk write operations.

NÁVRATOVÁ HODNOTA

On success, zero is returned. On error, -1 is returned, and errno is set appropriately.

CHYBY / ERRORY

EBADF
fd is not a valid file descriptor open for writing.
EIO
An error occurred during synchronization.
EROFS, EINVAL
fd is bound to a special file which does not support synchronization.

BUGS

Currently (Linux 2.2) fdatasync is equivalent to fsync.

DOSTUPNOST

On POSIX systems on which fdatasync is available, _POSIX_SYNCHRONIZED_IO is defined in <unistd.h> to a value greater than 0. (See also sysconf(3).)

ODPOVÍDAJÍCÍ

POSIX1b (formerly POSIX.4)

SOUVISEJÍCÍ

fsync(2)
 
B.O. Gallmeister, POSIX.4, O'Reilly, pp. 220-223 and 343.
1996-04-13 Linux 1.3.86
©2011-2024 BusinessIT.cz, ISSN 1805-0522 | Názvy použité v textech mohou být ochrannými známkami příslušných vlastníků.
Provozovatel: Bispiral, s.r.o., kontakt: BusinessIT(at)Bispiral.com | Inzerce: Best Online Media, s.r.o., zuzana@online-media.cz
O vydavateli | Pravidla webu BusinessIT.cz a ochrana soukromí | Používáme účetní program Money S3 | pg(8856)