[Bugs] [Bug 1165041] Different client can not execute "for((i=0; i<1000; i++)); do ls -al; done" in a same directory at the sametime

bugzilla at redhat.com bugzilla at redhat.com
Wed May 27 10:25:51 UTC 2015


https://bugzilla.redhat.com/show_bug.cgi?id=1165041



--- Comment #21 from Anand Avati <aavati at redhat.com> ---
COMMIT: http://review.gluster.org/10852 committed in master by Pranith Kumar
Karampuri (pkarampu at redhat.com) 
------
commit 3b666b40efbed157e8c5991f29b345d93b28c659
Author: Xavier Hernandez <xhernandez at datalab.es>
Date:   Wed May 20 15:17:35 2015 +0200

    cluster/ec: Forced unlock when lock contention is detected

    EC uses an eager lock mechanism to optimize multiple read/write
    requests on the same entry or inode. This increases performance
    but can have adverse results when other clients try to access the
    same entry/inode.

    To solve this, this patch adds a functionality to detect when this
    happens and force an earlier release to not block other clients.

    The method consists on requesting GF_GLUSTERFS_INODELK_COUNT and
    GF_GLUSTERFS_ENTRYLK_COUNT for all fops that take a lock. When this
    count is greater than one, the lock is marked to be released. All
    fops already waiting for this lock will be executed normally before
    releasing the lock, but new requests that also require it will be
    blocked and restarted after the lock has been released and reacquired
    again.

    Another problem was that some operations did correctly lock the
    parent of an entry when needed, but got the size and version xattrs
    from the entry instead of the parent.

    This patch solves this problem by binding all queries of size and
    version to each lock and replacing all entrylk calls by inodelk ones
    to remove concurrent updates on directory metadata.  This also allows
    rename to correctly update source and destination directories.

    Change-Id: I2df0b22bc6f407d49f3cbf0733b0720015bacfbd
    BUG: 1165041
    Signed-off-by: Xavier Hernandez <xhernandez at datalab.es>
    Reviewed-on: http://review.gluster.org/10852
    Tested-by: NetBSD Build System
    Tested-by: Gluster Build System <jenkins at build.gluster.com>
    Reviewed-by: Pranith Kumar Karampuri <pkarampu at redhat.com>

-- 
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=W48vplhMs2&a=cc_unsubscribe


More information about the Bugs mailing list