Re: Issues with stat() call on CentOS5 vs CentOS4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Hi David,

I am using NFSv3. Sorry, should have said that!

-Dougal

On Fri, Dec 10, 2010 at 2:06 PM, David Sommerseth
<dazo@xxxxxxxxxxxxxxxxxxxxx> wrote:
> On 10/12/10 18:23, Dougal Ballantyne wrote:
>> Dear CentOS,
>>
>> I have recently upgraded several servers from CentOS4 to CentOS5 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.
>>
>> [dougalb@centos4 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;
>> }
>>
>> [dougalb@centos4 tmp]$
>> [dougalb@centos4 tmp]$ gcc -o my_stat.exe my_stat.c
>> [dougalb@centos4 tmp]$
>> [dougalb@centos4 tmp]$ ./my_stat.exe /mnt/nas/testfile
>> Block size:             32768
>> [dougalb@centos4 tmp]$
>> [dougalb@centos4 tmp]$ cat /etc/redhat-release
>> CentOS release 4.7 (Final)
>> [dougalb@centos4 tmp]$
>>
>> [dougalb@centos5 tmp]$ ./my_stat.exe /mnt/nas/testfile
>> Block size:             4096
>> [dougalb@centos5 tmp]$
>> [dougalb@centos5 tmp]$ cat /etc/redhat-release
>> CentOS release 5.5 (Final)
>> [dougalb@centos5 tmp]$
>>
>> On CentOS5 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?
>
> What kind of network file system is used to mount your NAS?
>
>
> kind regards,
>
> David Sommerseth
>
> _______________________________________________
> CentOS mailing list
> CentOS@xxxxxxxxxx
> http://lists.centos.org/mailman/listinfo/centos
>
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos



[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux