fdatasync

FDATASYNC(2)               Linux Programmer's Manual              FDATASYNC(2)



åå
       fdatasync - ãã¡ã¤ã«ã®ã¡ã¢ãªä¸ã®ãã¼ã¿ããã£ã¹ã¯ä¸ã®ãã®ã¨åæããã

æ¸å¼
       #include <unistd.h>

       #ifdef _POSIX_SYNCHRONIZED_IO

       int fdatasync(int fd);

       #endif

説æ
       fdatasync ã¯(ã·ã¹ãã ã»ã³ã¼ã«ããæ»ãåã«)ãã¡ã¤ã«ã®å¨ã¦ã®ãã¼ã¿ã»ãããã¡ã¼ã
       ãã£ã¹ã¯ã«ãã©ãã·ã¥(flush)ããããã㯠fsync
       ã«ä¼¼ã¦ããããã¢ã¯ã»ã¹æå»ã®ãããªã¡ã¿ãã¼ã¿ãæ´æ°ããªãã

       ãã¼ã¿ãã¼ã¹ã«ã¢ã¯ã»ã¹ãããããã°ã»ãã¡ã¤ã«ã«æ¸ãè¾¼ããããª
       ã¢ããªã±ã¼ã·ã§ã³ã¯ãã°ãã°å°ããªãã¼ã¿ã®æç(ä¾ãã°ãã°ã»ãã¡ã¤ã«ã®ä¸è¡)
       ãæ¸ãè¾¼ã¿ãããããã¼ããã£ã¹ã¯ã«ç©ççã«æ ¼ç´ããããã¨ãä¿è¨¼ãã ããã«ãããã« fsync
       ãå¼ã³åºããä¸å¹¸ãªãã¨ã«ã fsync ã¯å¸¸ã«äºåã®æ¸ãè¾¼ã¿æä½ãè¡ãªã:
       ä¸ã¤ã¯æ°ããæ¸ãè¾¼ã¾ãããã¼ã¿ãã ããä¸ã¤ã¯ inode ã®ä¿®æ£æå»ãæ´æ°ããããã«ãä¿®æ‐
       £æå»ããã©ã¶ã³ã¯ã·ã§ã³ ã«é¢ä¿ãªããã°ã fdatasync
       ã使ç¨ãããã¨ã§ä¸å¿è¦ãªãã£ã¹ã¯ã¸ã® inode ã®æ¸ãè¾¼ã¿å¦çã é¿ãããã¨ãã§ããã

è¿ãå¤
       æåããå ´åã¯ã¼ããè¿ããããã¨ã©ã¼ã®å ´å㯠-1 ãè¿ãã errno ã«é©åãªå¤ãè¨å®ãããã

ã¨ã©ã¼
       EBADF   fd ãæå¹ãªæ¸ãè¾¼ã¿ã®ããã«ãªã¼ãã³ããããã¡ã¤ã«ã»ãã£ã¹ã¯ãªãã¿ã¼ã§ãªãã

       EROFS, EINVAL
               fd ãåææä½ããµãã¼ããã¦ããªãç¹æ®ãªãã¡ã¤ã«ãåç§ãã¦ããã

       EIO     åææä½ã®éã«ã¨ã©ã¼ãèµ·ãã£ãã

ãã°
       ç¾å¨(Linux 2.0.23)ã®ã¨ãã fdatasync 㯠fsync ã«çããã


æºæ
       POSIX1b (以åã® POSIX.4)

é¢é£é ç®
       fsync(2), B.O. Gallmeister, POSIX.4, O'Reilly, pp. 220-223 and 343.



Linux 1.3.86                     13 April 1996                    FDATASYNC(2)