Problem with stat() on CIFS.
Bart Oldeman <[email protected]>
| Newsgroups | gmane.linux.file-systems.cifs |
|---|---|
| Message-ID | <[email protected]> |
Hi, on 32-bit systems using plain stat() (not stat64()) is problematic on CIFS mount points (kernel 2.6.32): $ stat /home/bart/cifs File: `/home/bart/cifs' Size: 0 Blocks: 0 IO Block: 16384 directory Device: 11h/17d Inode: 8839049314305 Links: 1 Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2009-12-16 22:14:55.000000000 -0500 Modify: 2009-12-16 22:14:00.000000000 -0500 Change: 2009-12-16 22:14:00.000000000 -0500 As you can see the inode number is very high: 0x80a00650001 Glibc's stat() calls the kernel's stat64(), tries to convert the struct stat64 structure to a "struct stat" and fail. Note that I've only seen this with a Samba server when Unix extensions were NOT enabled -- if they are enabled I get 0x650001 as the inode number which is OK. See also PHP bug 50150 (http://bugs.php.net/50150) Regards, Bart Oldeman