Bug 1263653

Summary: dht: Avoid double unlock in dht_refresh_layout_cbk
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Susant Kumar Palai <spalai>
Component: distributeAssignee: Susant Kumar Palai <spalai>
Status: CLOSED ERRATA QA Contact: Amit Chaurasia <achauras>
Severity: high Docs Contact:
Priority: high    
Version: rhgs-3.1CC: byarlaga, mzywusko, nbalacha, vagarwal
Target Milestone: ---Keywords: ZStream
Target Release: RHGS 3.1.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.7.1-16 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-10-05 07:27:12 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:
Embargoed:
Bug Depends On:    
Bug Blocks: 1251815    

Description Susant Kumar Palai 2015-09-16 11:12:27 UTC
Document URL: 

Section Number and Name: 

Describe the issue: 
Currently in case of failure in dht_refresh_layout_cbk we unlock the object twice. 

Suggestions for improvement: 

Additional information:

Comment 2 Susant Kumar Palai 2015-09-16 11:47:46 UTC
Here is the code-snippet from dht_refresh_layout_cbk

<snip>
        return 0;

err:
        local->refresh_layout_unlock (frame, this, -1);

        dht_selfheal_dir_finish (frame, this, -1);<----- Here an extra lock and unwind. This needs to be removed.
        return 0;
</snip>

Comment 5 Amit Chaurasia 2015-09-23 12:07:47 UTC
Given that it is unlocking twice, chances were there if the folder ends up with 2 diffrent layout.

To verify this, followed following steps:

1.  Create a dist-rep vol with quota and min-free ON and 90% resp.
2. Filled the volume mounted on NFS and fuse both such that min free limit is crossed for atleast one brick.
3. Performed mkdir operation using GNU parallel.
4. Once folders were created, ran the same GNU parallel command again.
5. Counted the files to check if there are unexpected or double entry of a file.

No issues found. Marking the bug verified.

Comment 7 errata-xmlrpc 2015-10-05 07:27:12 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2015-1845.html