.\" -*- coding: UTF-8 -*- .\" Copyright (c) 2006, 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 .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH POSIX_FALLOCATE 3 "1 novembre 2020" GNU "Manuel du programmeur Linux" .SH NOM posix_fallocate \- Allouer de l'espace pour un fichier .SH SYNOPSIS .nf \fB#include \fP .PP \fBint posix_fallocate(int \fP\fIfd\fP\fB, off_t \fP\fIoffset\fP\fB, off_t \fP\fIlen\fP\fB);\fP .fi .PP .ad l .RS -4 Exigences de macros de test de fonctionnalités pour la glibc (consulter \fBfeature_test_macros\fP(7))\ : .RE .PP \fBposix_fallocate\fP()\ : .RS 4 _POSIX_C_SOURCE\ >=\ 200112L .RE .ad .SH DESCRIPTION The function \fBposix_fallocate\fP() ensures that disk space is allocated for the file referred to by the file descriptor \fIfd\fP for the bytes in the range starting at \fIoffset\fP and continuing for \fIlen\fP bytes. After a successful call to \fBposix_fallocate\fP(), subsequent writes to bytes in the specified range are guaranteed not to fail because of lack of disk space. .PP Si la taille du fichier est inférieure \fIoffset\fP+\fIlen\fP, le fichier est agrandi à cette taille\ ; autrement, la taille du fichier n'est pas modifiée. .SH "VALEUR RENVOYÉE" \fBposix_fallocate\fP() renvoie 0 si elle réussit et un numéro d'erreur si elle échoue. Notez que \fIerrno\fP n'est pas écrite. .SH ERREURS .TP \fBEBADF\fP \fIfd\fP n'est pas un descripteur de fichier valable ou n'est pas ouvert en écriture. .TP \fBEFBIG\fP \fIoffset+len\fP dépasse la taille maximale du fichier. .TP \fBEINTR\fP Un signal a été capturé pendant l'exécution. .TP \fBEINVAL\fP \fIoffset\fP was less than 0, or \fIlen\fP was less than or equal to 0, or the underlying filesystem does not support the operation. .TP \fBENODEV\fP \fIfd\fP ne fait pas référence à un fichier régulier. .TP \fBENOSPC\fP Il n'y a pas suffisamment d'espace disponible sur le périphérique où se trouve le fichier référencé par \fIfd\fP. .TP \fBEOPNOTSUPP\fP The filesystem containing the file referred to by \fIfd\fP does not support this operation. This error code can be returned by C libraries that don't perform the emulation shown in NOTES, such as musl libc. .TP \fBESPIPE\fP \fIfd\fP fait référence à un tube. .SH VERSIONS \fBposix_fallocate\fP() est disponible depuis la glibc 2.1.94. .SH ATTRIBUTS Pour une explication des termes utilisés dans cette section, consulter \fBattributes\fP(7). .TS allbox; lb lb lb l l l. Interface Attribut Valeur T{ \fBposix_fallocate\fP() T} Sécurité des threads MT\-Safe (but see NOTES) .TE .SH CONFORMITÉ POSIX.1\-2001. .PP POSIX.1\-2008 indique qu'une implémentation \fIdoit\fP renvoyer l'erreur \fBEINVAL\fP si \fIlen\fP valait 0 ou si \fIoffset\fP était inférieur à 0. POSIX.1\-2001 indique qu'une implémentation \fIdoit\fP renvoyer l'erreur \fBEINVAL\fP était inférieur à 0 ou si \fIoffset\fP était inférieur à 0 et \fIpeut\fP renvoyer cette erreur si \fIlen\fP est égal à 0. .SH NOTES In the glibc implementation, \fBposix_fallocate\fP() is implemented using the \fBfallocate\fP(2) system call, which is MT\-safe. If the underlying filesystem does not support \fBfallocate\fP(2), then the operation is emulated with the following caveats: .IP * 2 The emulation is inefficient. .IP * There is a race condition where concurrent writes from another thread or process could be overwritten with null bytes. .IP * There is a race condition where concurrent file size increases by another thread or process could result in a file whose size is smaller than expected. .IP * If \fIfd\fP has been opened with the \fBO_APPEND\fP or \fBO_WRONLY\fP flags, the function fails with the error \fBEBADF\fP. .PP In general, the emulation is not MT\-safe. On Linux, applications may use \fBfallocate\fP(2) if they cannot tolerate the emulation caveats. In general, this is only recommended if the application plans to terminate the operation if \fBEOPNOTSUPP\fP is returned, otherwise the application itself will need to implement a fallback with all the same problems as the emulation provided by glibc. .SH "VOIR AUSSI" \fBfallocate\fP(1), \fBfallocate\fP(2), \fBlseek\fP(2), \fBposix_fadvise\fP(2) .SH COLOPHON Cette page fait partie de la publication\ 5.10 du projet \fIman\-pages\fP Linux. Une description du projet et des instructions pour signaler des anomalies et la dernière version de cette page peuvent être trouvées à l'adresse \%https://www.kernel.org/doc/man\-pages/. .SH TRADUCTION La traduction française de cette page de manuel a été créée par Christophe Blaess , Stéphan Rafin , Thierry Vignaud , François Micaux, Alain Portal , Jean-Philippe Guérard , Jean-Luc Coulon (f5ibh) , Julien Cristau , Thomas Huriaux , Nicolas François , Florentin Duneau , Simon Paillard , Denis Barbier et David Prévot . Cette traduction est une documentation libre ; veuillez vous reporter à la .UR https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License version 3 .UE concernant les conditions de copie et de distribution. Il n'y a aucune RESPONSABILITÉ LÉGALE. Si vous découvrez un bogue dans la traduction de cette page de manuel, veuillez envoyer un message à .MT debian-l10n-french@lists.debian.org .ME .