chmod() receives ESTALE against a file that is recreated from NFS server and referred from NFS client in a second
Issue
- chmod() receives ESTALE against a file that is recreated from NFS server and referred from NFS client in a second
-
chfile.c
#include <stdio.h> #include <sys/types.h> #include <sys/stat.h> #include <errno.h> int main() { if (chmod("/mnt/nfs/file", 0444) != 0) { printf("chmod fail with erro %d\n", errno); return 1; } return 0; }
-
reproducer
# df -T /nfsv3 | grep ext3 # gcc -o chfile chfile.c # mount 127.0.0.1:/nfsv3 /mnt/nfs # for i in `seq 1 3`; do touch /nfsv3/file; touch -mt 201003010000.00 /nfsv3; ./chfile; rm -f /nfsv3/file; done chmod fail with erro 116 chmod fail with erro 116
Environment
- Red Hat Enterprise Linux 6
- ext3 filesystem
NFS
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.