Hello, The following program shows:
create: Success open: Stale NFS file handle but the expected result is create: Success open: Success Code: #include <stdio.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> int main() { int fd1, fd2; const char *filename = "opentest.tmp"; char buf[256]; fd1 = open(filename, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR); perror("create"); remove(filename); sprintf(buf, "/proc/%d/fd/%d", (int)getpid(), fd1); fd2 = open(buf, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR); perror("open"); close(fd2); close(fd1); return 0; } This only happens on aufs (tested version is 3.12-20131111), config CONFIG_AUFS_FS=m CONFIG_AUFS_BRANCH_MAX_127=y # CONFIG_AUFS_BRANCH_MAX_511 is not set # CONFIG_AUFS_BRANCH_MAX_1023 is not set # CONFIG_AUFS_BRANCH_MAX_32767 is not set CONFIG_AUFS_SBILIST=y # CONFIG_AUFS_HNOTIFY is not set CONFIG_AUFS_EXPORT=y CONFIG_AUFS_RDU=y # CONFIG_AUFS_SP_IATTR is not set # CONFIG_AUFS_SHWH is not set # CONFIG_AUFS_BR_RAMFS is not set CONFIG_AUFS_BR_FUSE=y CONFIG_AUFS_POLL=y CONFIG_AUFS_BR_HFSPLUS=y CONFIG_AUFS_BDEV_LOOP=y # CONFIG_AUFS_DEBUG is not set Will provide more details if necessary. Best regards, GUAN, Xin ------------------------------------------------------------------------------ Sponsored by Intel(R) XDK Develop, test and display web and hybrid apps with a single code base. Download it for free now! http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk