[Bugs] [Bug 1465123] Fd based fops fail with EBADF on file migration

bugzilla at redhat.com bugzilla at redhat.com
Wed Jul 19 11:25:14 UTC 2017


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



--- Comment #7 from Worker Ant <bugzilla-bot at gluster.org> ---
COMMIT: https://review.gluster.org/17751 committed in release-3.11 by
Shyamsundar Ranganathan (srangana at redhat.com) 
------
commit 856aa0ff090fa08629493e7848e5c446a93a9f2d
Author: N Balachandran <nbalacha at redhat.com>
Date:   Mon Jul 10 09:38:54 2017 +0530

    cluster/dht: Fix fd check race

    There is a another race between the cached subvol
    being updated in the inode_ctx and the fd being opened on
    the target.

    1. fop1 -> fd1 -> subvol0
    2. file migrated from subvol0 to subvol1 and cached_subvol
       changed to subvol1 in inode_ctx
    3. fop2 -> fd1 -> subvol1 [takes new cached subvol]
    4. fop2 -> checks fd ctx (fd not open on subvol1) -> opens fd1 on subvol1
    5. fop1 -> checks fd ctx (fd not open on subvol0)
       -> tries to open fd1 on subvol0 -> fails with "No such file on
directory".

    Fix:
    If dht_fd_open_on_dst fails with ENOENT or ESTALE, wind to old subvol
    and let the phase1/phase2 checks handle it.

    > BUG: 1465075
    > Signed-off-by: N Balachandran <nbalacha at redhat.com>
    > Reviewed-on: https://review.gluster.org/17731
    > Smoke: Gluster Build System <jenkins at build.gluster.org>
    > CentOS-regression: Gluster Build System <jenkins at build.gluster.org>
    > Reviewed-by: Raghavendra G <rgowdapp at redhat.com>
    > Reviewed-by: Amar Tumballi <amarts at redhat.com>
    (cherry picked from commit f7a450c17fee7e43c544473366220887f0534ed7)
    Change-Id: I34f8011574a8b72e3bcfe03b0cc4f024b352f225
    BUG: 1465123
    Signed-off-by: N Balachandran <nbalacha at redhat.com>
    Reviewed-on: https://review.gluster.org/17751
    Smoke: Gluster Build System <jenkins at build.gluster.org>
    Reviewed-by: Raghavendra G <rgowdapp at redhat.com>
    CentOS-regression: Gluster Build System <jenkins at build.gluster.org>

-- 
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=oH7qRoRZMQ&a=cc_unsubscribe


More information about the Bugs mailing list