Dear rhelv5 listers,
I have recently upgraded several servers from RH4 to RH5 and I am
noticing a strange change to the stat() call. I have written a very
small program to test and show the behavior. I am calling stat()
against a file which is exported from my NAS and mounted with 32k
read/write sizes.
[doug...@rhel4 tmp]$ cat my_stat.c
#include <unistd.h>
#include <stdio.h>
#include <sys/stat.h>
#include <sys/types.h>
int main(int argc, char **argv)
{
if(argc != 2)
return 1;
struct stat fileStat;
if(stat(argv[1],&fileStat) < 0)
return 1;
printf("Block size: \t\t%d\n",fileStat.st_blksize);
return 0;
}
[doug...@rhel4 tmp]$
[doug...@rhel4 tmp]$ gcc -o my_stat.exe my_stat.c
[doug...@rhel4 tmp]$
[doug...@rhel4 tmp]$ ./my_stat.exe /mnt/nas/testfile
Block size: 32768
[doug...@rhel4 tmp]$
[doug...@rhel4 tmp]$ cat /etc/redhat-release
Red Hat Enterprise Linux AS release 4 (Nahant Update 7)
[doug...@rhel4 tmp]$
[doug...@rhel5 tmp]$ ./my_stat.exe /mnt/nas/testfile
Block size: 4096
[doug...@rhel5 tmp]$
[doug...@rhel5 tmp]$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.3 (Tikanga)
[doug...@rhel5 tmp]$
On RHEL5 it is reporting 4k block sizes when it should report 32k. Has
anyone seen this or aware of what is causing this change in behavior?
Kind regards,
Dougal
_______________________________________________
rhelv5-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/rhelv5-list