[root@nwg onix_stub]# df -T Filesystem Type 1K-blocks Used Available Use% Mounted on /dev/mapper/VolGroup00-LogVol00 ext3 47517488 35855436 9209368 80% /
limit没有文件大小限制; 磁盘未满; 磁盘格式为ext3,网上查的单文件大小至少为16G;
网上有人说是fwrite的问题, 于是写小程序测试了下:
//测试程序1: //test_stdio.c #include #include #include int main(int argc , char * argv[] ) { FILE *fp ; char buff[1024] ; int i ;
证明: 1:off_t man 3 fseeko: On many architectures both off_t and long are 32-bit types, but compilation with #define _FILE_OFFSET_BITS 64 will turn off_t into a 64-bit type man 2 open: O_LARGEFILE (LFS) Allow files whose sizes cannot be represented in an off_t (but can be represented in an off64_t) to be opened.
__off_t为long int型:
./bits/types.h:144:__STD_TYPE __OFF_T_TYPE __off_t;
./bits/typesizes.h:37:#define __OFF_T_TYPE __SLONGWORD_TYPE
./bits/types.h:106:#define __SLONGWORD_TYPE long int
__off64_t始终为64位:
./bits/types.h:145:__STD_TYPE __OFF64_T_TYPE __off64_t;
./bits/typesizes.h:38:#define __OFF64_T_TYPE __SQUAD_TYPE
./bits/types.h:
108 #if __WORDSIZE == 32
109 # define __SQUAD_TYPE __quad_t
120 #elif __WORDSIZE == 64
121 # define __SQUAD_TYPE long int
133 #endif
54 /* quad_t is also 64 bits. */