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

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

merged 15 commits into from Oct 23, 2019

Conversation

@ukernel
Copy link
Member

ukernel commented Jun 17, 2019

@ukernel ukernel added the cephfs label Jun 17, 2019
@smithfarm smithfarm requested a review from batrick Jun 17, 2019
@smithfarm smithfarm added this to the mimic milestone Jun 17, 2019
@yuriw

This comment has been minimized.

Copy link
Contributor

yuriw commented Jul 9, 2019

@smithfarm

This comment has been minimized.

Copy link
Contributor

smithfarm commented Jul 23, 2019

@ukernel Ping - ETA? (13.2.7 release is approaching)

@ukernel ukernel force-pushed the ukernel:mimic-40327 branch from deceab7 to 8a2b91e Jul 24, 2019
@ukernel

This comment has been minimized.

Copy link
Member Author

ukernel commented Jul 24, 2019

updated

@smithfarm

This comment has been minimized.

Copy link
Contributor

smithfarm commented Jul 24, 2019

@batrick Can you have another look?

@batrick

This comment has been minimized.

Copy link
Member

batrick commented Jul 24, 2019

good to test

@yuriw

This comment has been minimized.

Copy link
Contributor

yuriw commented Aug 7, 2019

@ukernel pls rebase

--- pr 28585 --- pulling https://github.com/ukernel/ceph.git branch mimic-40327
remote: Enumerating objects: 101, done.
remote: Counting objects: 100% (101/101), done.
remote: Total 116 (delta 101), reused 101 (delta 101), pack-reused 15
Receiving objects: 100% (116/116), 68.90 KiB | 0 bytes/s, done.
Resolving deltas: 100% (101/101), completed with 28 local objects.
From https://github.com/ukernel/ceph

  • branch mimic-40327 -> FETCH_HEAD
    Auto-merging src/mds/SessionMap.h
    Auto-merging src/mds/Server.cc
    Auto-merging src/mds/Migrator.cc
    Auto-merging src/mds/MDCache.h
    Auto-merging src/mds/MDCache.cc
    Auto-merging src/mds/Locker.h
    Auto-merging src/mds/Locker.cc
    CONFLICT (content): Merge conflict in src/mds/Locker.cc
    Auto-merging src/common/options.cc
    Auto-merging src/client/Client.h
    Auto-merging src/client/Client.cc
    CONFLICT (content): Merge conflict in src/client/Client.cc
    Auto-merging qa/tasks/cephfs/test_misc.py
    CONFLICT (content): Merge conflict in qa/tasks/cephfs/test_misc.py
    Automatic merge failed; fix conflicts and then commit the result.
    Traceback (most recent call last):
    File "/home/yuriw/wip_master/src/script/build-integration-branch", line 62, in
    assert not r
    AssertionError
@smithfarm

This comment has been minimized.

Copy link
Contributor

smithfarm commented Oct 1, 2019

@ukernel Please rebase

@ukernel ukernel force-pushed the ukernel:mimic-40327 branch from 8a2b91e to 8113dab Oct 2, 2019
@smithfarm smithfarm dismissed batrick’s stale review Oct 8, 2019

Appears to be resolved - dismissing the change request

@smithfarm

This comment has been minimized.

Copy link
Contributor

smithfarm commented Oct 8, 2019

@batrick I dismissed your review and am re-flagging this for integration testing. Please check if that's the right thing to do.

@vshankar

This comment has been minimized.

Copy link
Contributor

vshankar commented Oct 18, 2019

ukernel added 15 commits Nov 22, 2018
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)
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
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)
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)
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
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
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
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
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
(cherry picked from commit c744bc1)
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
- 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
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
(cherry picked from commit 1c8be58)

 Conflicts:
	qa/tasks/cephfs/test_client_recovery.py
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
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
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 ukernel force-pushed the ukernel:mimic-40327 branch from 8113dab to 336881f Oct 21, 2019
@ukernel

This comment has been minimized.

Copy link
Member Author

ukernel commented Oct 21, 2019

rebased

@yuriw

This comment has been minimized.

Copy link
Contributor

yuriw commented Oct 21, 2019

@yuriw yuriw removed the needs-rebase label Oct 21, 2019
@yuriw yuriw merged commit aafdd9a into ceph:mimic Oct 23, 2019
4 checks passed
4 checks passed
Docs: build check OK - docs built
Details
Signed-off-by all commits in this PR are signed
Details
Unmodified Submodules submodules for project are unmodified
Details
make check make check succeeded
Details
@ukernel ukernel deleted the ukernel:mimic-40327 branch Oct 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.