Hide Forgot
In libglusterfsclient, while having replicate as a subvolume, it is possible that the stat buf that replicate returns on a read/write, is from a subvolume of replicate which is different from the subvolume from which the libglusterfsclient must've cached the attrs, on a previous write. This will result in the iattr cache getting the stat with a different inode. This is a problem for unfs3booster since an lstat can be returned from the cache resulting in different inode number from the one unfs3 had cached. THis forces unfs3 to return a ESTALE. This is a regression that has creeped in since 2.0.3 where we started updating the iattr cache on a read and write callback. A temporary workaround is to disable caching by setting the attr_timeout option in booster fstab to 0.
Another temporary workaround can be to fix the read-subvolume in replicate. The problem with simply returning a fixed inode number in readv is that the timestamps will be accurate only for that subvolume. This means that any NFS client side caching will be unpredictable because the timestamps it caches could be from a different sub-volume.
PATCH: http://patches.gluster.com/patch/821 in master (cluster/afr: Set inode number in unwind_buf in the inode-write calls.)
PATCH: http://patches.gluster.com/patch/825 in master (cluster/afr: Return same inode number in stat buf for readv_cbk)
PATCH: http://patches.gluster.com/patch/821 in release-2.0 (cluster/afr: Set inode number in unwind_buf in the inode-write calls.)
PATCH: http://patches.gluster.com/patch/826 in release-2.0 (cluster/afr: Return same inode number in stat buf for readv_cbk)
Fixed by the following multiple patches: In mainline: http://git.gluster.com/?p=glusterfs.git;a=commit;h=ccd93eb64c0f2f73f83e025d3efae794803aaa4c http://git.gluster.com/?p=glusterfs.git;a=commit;h=ffa5118b2eec9cd12e43ca10d86e91d02a9090a8 In release-2.0: http://git.gluster.com/?p=glusterfs.git;a=commit;h=53438fa2826ea6a5ea9fd9751d797c2875c2dca5 http://git.gluster.com/?p=glusterfs.git;a=commit;h=5a41851e86177e82a8d4ae1457972d5011466eef http://git.gluster.com/?p=glusterfs.git;a=commit;h=87071f027c47ac04b482527a2be58480b4fd5973 http://git.gluster.com/?p=glusterfs.git;a=commit;h=c045d4264bb83fb5e5384379aa3a824fe3038dc8