gluster-devel
[Top][All Lists]
Advanced

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

[Gluster-devel] A problem with fstat64 system call on nfs.


From: Александр Берсенев
Subject: [Gluster-devel] A problem with fstat64 system call on nfs.
Date: Thu, 17 Mar 2011 16:35:57 +0500

I am experimenting with glusterfs on cluster.
I have a ~20 glusterfs servers. They communicating between each other
via Infiniband.
One of client machine have no Infiniband board, so I mounted the
glusterfs volume on this client machine via nfs.

I used this command:
  mount -t nfs server:/share /mount

When I try to do fstat64 on any file from the nfs mount, the stat call
fails because of stack corruption.

Here is a small source of a fstat test:

#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <sys/file.h>
#include <sys/stat.h>

int main(int argc, char **argv){
 if(argc!=2) {
  printf("Usage: ./progname <file>");
  exit(1);
 }

 int h=open(argv[1], O_RDONLY);
 if(h<0) {
  printf("Open failed\n");
  exit(1);
 }

 struct stat s;
 int f=fstat(h,&s);
 if(f<0) {
  printf("Stat failed\n");
  exit(1);
 }

 printf("Size: %d\n",s.st_size);
 return 0;
}

When I compiling this source with this command: gcc -m32 1.c , all
fstat64 calls from nfs mount is fails:
address@hidden bay]$ ./a.out aaaaaa
Stat failed

But with non-gluster nfs mount and local files the program is working correctly:
address@hidden bay]$ ./a.out /etc/passwd
Size: 1743

When I compiling this source with another command: gcc -m64 1.c , all
is working. Strace shows fstat calls instead of fstat64.
address@hidden bay]$ ./a.out aaaaaa
Size: 2
address@hidden bay]$ ./a.out /etc/passwd
Size: 1743

Steps for reproduce:
1) Mount glusterfs via nfs.
2) Compile a source with -m32
3) Execute ./a.out <file on nfs>

Is it glusterfs bug?

---
Alexander Bersenev(Russia)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]