[mdlug] aix, mode_t, struct stat, >2G
Aaron Kulkis
akulkis3 at hotpop.com
Fri Feb 2 12:33:55 EST 2007
Robert Meier wrote:
> big developers,
>
> I'm trying to write files larger than 2G on aix-5.3 with gcc-3.3.2.
>
> write(2) is called successively with more than 2G cumulative data.
>
> On linux, the result is a file that ls reports as longer than 2G.
> On aix, the result is a file that ls reports is one byte shorter than 2G.
>
> I have example gcc code on aix which writes files greater than 2G.
> As far as I have been able to determine, it uses only open(2), and write(2).
> Files produced by the example code less than 2G have a normal mode
> (see <sys/stat.h> struct stat .st_mode) 0100644 (regular file u+rw,go+r).
> Files produced by the example code greater than 2G have no mode (0).
>
> I've found nothing so far in the aix manuals, gcc manuals,
> or elsewhere on line, that documents the change in mode with size.
>
> Has anyone seen change in mode before?
> On what OS?
> With what compiler?
> Where is it documented?
Sounds like a bug in the AIX filesystem.
What happens if you create the file on another machine, say on an
XFS filesystem that is NFS mounted to your machine?
>
> TIA,
More information about the mdlug
mailing list