summaryrefslogtreecommitdiffstats
path: root/geo-replication
diff options
context:
space:
mode:
authorRaghavendra G <rgowdapp@redhat.com>2018-03-17 13:16:59 +0530
committerRaghavendra G <rgowdapp@redhat.com>2018-04-30 10:28:08 +0530
commit7c6d15af7da4cea510fc2844115730656900e117 (patch)
tree09e666049fec576c7c2a4f3f5db3210b2bdb1fd7 /geo-replication
parentaa981531458a6d6e279f9a9a26f7c61b24cc14ab (diff)
downloadglusterfs-7c6d15af7da4cea510fc2844115730656900e117.tar.gz
glusterfs-7c6d15af7da4cea510fc2844115730656900e117.tar.xz
glusterfs-7c6d15af7da4cea510fc2844115730656900e117.zip
server/resolver: don't trust inode-table for RESOLVE_NOT
There have been known races between fops which add a dentry (like lookup, create, mknod etc) and fops that remove a dentry (like rename, unlink, rmdir etc) due to which stale dentries are left out in inode table even though the dentry doesn't exist on backend. For eg., consider a lookup (parent/bname) and unlink (parent/bname) racing in the following order: * lookup hits storage/posix and finds that dentry exists * unlink removes the dentry on storage/posix * unlink reaches protocol/server where the dentry (parent/bname) is unlinked from the inode * lookup reaches protocol/server and creates a dentry (parent/bname) on the inode Now we've a stale dentry (parent/bname) associated with the inode in itable. This situation is bad for fops like link, create etc which invoke resolver with type RESOLVE_NOT. These fops fail with EEXIST even though there is no such dentry on backend fs. This issue can be solved in two ways: * Enable "dentry fop serializer" xlator [1]. # gluster volume set features.sdfs on * Make sure resolver does a lookup on backend when it finds a dentry in itable and validates the state of itable. - If a dentry is not found, unlink those stale dentries from itable and continue with fop - If dentry is found, fail the fop with EEXIST This patch implements second solution as sdfs is not enabled by default in brick xlator stack. Once sdfs is enabled by default, this patch can be reverted. [1] https://github.com/gluster/glusterfs/issues/397 Change-Id: Ia8bb0cf97f97cb0e72639bce8aadb0f6d3f4a34a updates: bz#1543279 BUG: 1543279 Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
Diffstat (limited to 'geo-replication')
0 files changed, 0 insertions, 0 deletions