Bug 1118780

Summary: DHT + SNAPSHOT : If snapshot is taken when parellal rename is partially done then restoring that snapshot ends in having same gfid for multiple Directories
Product: Red Hat Gluster Storage Reporter: Rachana Patel <racpatel>
Component: distributeAssignee: Raghavendra G <rgowdapp>
Status: CLOSED DUPLICATE QA Contact: storage-qa-internal <storage-qa-internal>
Severity: high Docs Contact:
Priority: medium    
Version: rhgs-3.0Keywords: ZStream
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: dht-gfid-dir,dht-file-access, triaged, dht-snapshot
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-23 09:52:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 1092510    
Bug Blocks: 1087818, 1105082, 1118779, 1252244, 1324381    

Description Rachana Patel 2014-07-11 14:04:52 UTC
Description of problem:
try to rename Directories from multiple client at same time. e.g. from one mount give mv <src> <dest> and from another mv <src> <dest1> (where dest and dest1 is not hashing to same) or simply from one mount point mv <src> <dest> and from another mount point mv <src> <dest> .

Take snapshot when those operations are not completed on all sub-volumes. On restoring that snapshot
- same gfid for different Directories (at same level and/or diffrent level)

Version-Release number :

How reproducible:

Steps to Reproduce:
1. create and mount distributed volume. (mount on multiple client)
2. create few files and Directories on mount point.
[root@OVM5 race]# mkdir src dest 
[root@OVM5 race]# touch src/f{1..5}

[to reproduce race, we are putting breakpoint at dht_rename_hashed_dir_cbk for both rename operation]

3. from one mount point execute 'mv src dest' and from other mount point execute 'mv dest src'
Now take snapshot

4. restore that snapshot and verify data from another mount and bricks also

[root@OVM5 race]# ls -lR 
total 0 
drwxr-xr-x 3 root root 51 Jul 10 16:51 src 

total 0 
drwxr-xr-x 2 root root 18 Jul 10 16:51 dest 
drwxr-xr-x 2 root root 18 Jul 10 16:51 dest 

total 0 

total 0 

Actual results:
- same gfid for different Directories 

Expected results:
- no two directories should have same gfid

Comment 5 Susant Kumar Palai 2015-12-28 06:34:04 UTC
*** Bug 1118779 has been marked as a duplicate of this bug. ***

Comment 6 Nithya Balachandran 2016-09-01 12:16:51 UTC
*** Bug 1092510 has been marked as a duplicate of this bug. ***