Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mimic: mds: change how mds revoke stale caps #28585

Merged
merged 15 commits into from
Oct 23, 2019
Merged

Commits on Oct 21, 2019

  1. client: skip updating 'wanted' caps if caps are already issued

    When reading cached inode that already has Fscr caps, this can avoid
    two cap messages (one updats 'wanted' caps, one clears 'wanted' caps).
    
    Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
    (cherry picked from commit d20b260)
    ukernel committed Oct 21, 2019
    Configuration menu
    Copy the full SHA
    2207c2a View commit details
    Browse the repository at this point in the history
  2. client: sync 'retain caps' logical from kernel client

    The main change is keeping CEPH_CAP_ANY_RD for unused file inodes
    
    Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
    (cherry picked from commit 2903439)
    ukernel committed Oct 21, 2019
    Configuration menu
    Copy the full SHA
    caf9c97 View commit details
    Browse the repository at this point in the history
  3. mds: add session pointer to Capability

    Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
    (cherry picked from commit 7c62847)
    
     Conflicts:
    	src/mds/CInode.cc
    	src/mds/Capability.h
    	src/mds/Locker.cc
    ukernel committed Oct 21, 2019
    Configuration menu
    Copy the full SHA
    32fc848 View commit details
    Browse the repository at this point in the history
  4. mds: track if client has writeable range in Capability

    Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
    (cherry picked from commit 370ae1c)
    
     Conflicts:
    	src/mds/Locker.cc
    	src/mds/MDCache.h
    	src/mds/Server.cc
    ukernel committed Oct 21, 2019
    Configuration menu
    Copy the full SHA
    9d4c676 View commit details
    Browse the repository at this point in the history
  5. mds: put notable caps at the front of session's caps list

    Notable Capabilities are ones that are being revoked, ones that
    have writeable ranges and ones that want exclusive caps or want
    file read/write.
    
    Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
    (cherry picked from commit cb6e718)
    ukernel committed Oct 21, 2019
    Configuration menu
    Copy the full SHA
    b92d5a7 View commit details
    Browse the repository at this point in the history
  6. mds: optimize revoking stale caps

    For caps that are not being revoked and don't have writeable range
    and don't want exclusive caps or file read/write. there is no need
    to call Locker::revoke_stale_caps(Capability*). Because these caps
    don't need recover and don't affect eval_gather()/try_eval().
    
    Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
    (cherry picked from commit cb62030)
    
     Conflicts:
    	src/mds/CInode.cc
    	src/mds/Capability.h
    	src/mds/Locker.cc
    	src/mds/Migrator.cc
    ukernel committed Oct 21, 2019
    Configuration menu
    Copy the full SHA
    8c3eb9b View commit details
    Browse the repository at this point in the history
  7. client: set cap->wanted when adding new cap

    This avoids unnecessary cap message if cap is added by open/create
    request reply.
    
    Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
    (cherry picked from commit 314660a)
    
     Conflicts:
    	src/client/Client.h
    ukernel committed Oct 21, 2019
    Configuration menu
    Copy the full SHA
    1e0755d View commit details
    Browse the repository at this point in the history
  8. client: don't wakeup cap waiters twice when mds recovered

    Both kick_maxsize_requests() and wake_inode_waiters() wake up cap
    waiters
    
    Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
    (cherry picked from commit 5993a93)
    
     Conflicts:
    	src/client/Client.cc
    	src/client/Client.h
    ukernel committed Oct 21, 2019
    Configuration menu
    Copy the full SHA
    5e7cc27 View commit details
    Browse the repository at this point in the history
  9. client: avoid unnecessary wakeup when handling RENEWCAPS

    Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
    (cherry picked from commit c744bc1)
    ukernel committed Oct 21, 2019
    Configuration menu
    Copy the full SHA
    af08c79 View commit details
    Browse the repository at this point in the history
  10. mds: optimize resuming stale caps

    If client doesn't want any cap, there is no need to re-issue stale
    caps.
    
    A special case is that client wants some caps, but skipped updating
    'wanted'. For this case, client needs to update 'wanted' when stale
    session get renewed.
    
    Fixes: http://tracker.ceph.com/issues/38043
    Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
    (cherry picked from commit e824b3d)
    
     Conflicts:
    	src/client/Client.cc
    	src/mds/cephfs_features.h
    ukernel committed Oct 21, 2019
    Configuration menu
    Copy the full SHA
    4ebc248 View commit details
    Browse the repository at this point in the history
  11. mds: don't mark unresponsive sessions holding no caps stale

    When an unresponsive MDS session holds no caps, do not mark it stale
    even after session_timeout; at session_autoclose, evict it directly.
    
    Fixes: http://tracker.ceph.com/issues/17854
    Signed-off-by: Rishabh Dave <ridave@redhat.com>
    (cherry picked from commit 98af31d)
    
     Conflicts:
    	src/mds/Server.cc
    ukernel committed Oct 21, 2019
    Configuration menu
    Copy the full SHA
    ec3840b View commit details
    Browse the repository at this point in the history
  12. mds: change how mds revoke stale caps

    - Only revokes conflicting caps from stale client.
    - If stale client holds conflicting CEPH_CAP_ANY_WR,
      blacklist and kill it.
    
    Fixes: https://tracker.ceph.com/issues/38326
    Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
    (cherry picked from commit dcae1ea)
    
     Conflicts:
    	src/mds/CInode.cc
    	src/mds/Capability.cc
    	src/mds/Locker.cc
    	src/mds/MDSRank.h
    	src/mds/Server.cc
    ukernel committed Oct 21, 2019
    Configuration menu
    Copy the full SHA
    481895e View commit details
    Browse the repository at this point in the history
  13. qa/cephfs: update tests for stale session handling

    Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
    (cherry picked from commit 1c8be58)
    
     Conflicts:
    	qa/tasks/cephfs/test_client_recovery.py
    ukernel committed Oct 21, 2019
    Configuration menu
    Copy the full SHA
    bf7eab6 View commit details
    Browse the repository at this point in the history
  14. mds: remove the code that skip evicting the only client

    There is already logic that defer marking unresponsive client stale.
    No reason to defer evicting the only stale client.
    
    Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
    (cherry picked from commit cd29206)
    
     Conflicts:
    	qa/tasks/cephfs/test_misc.py
    ukernel committed Oct 21, 2019
    Configuration menu
    Copy the full SHA
    28c9e7c View commit details
    Browse the repository at this point in the history
  15. mds: check last laggy before marking unresponsive client stale

    Current mds may evict unresponsive client without going through session
    stale. So we need to adjust the last laggy check.
    
    Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
    (cherry picked from commit e5cc6f5)
    
     Conflicts:
    	src/mds/Server.cc
    ukernel committed Oct 21, 2019
    Configuration menu
    Copy the full SHA
    336881f View commit details
    Browse the repository at this point in the history