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: cephfs: client: fix bad error handling in _lookup_parent #29609

Merged
merged 2 commits into from Oct 9, 2019

Conversation

@jtlayton
Copy link
Contributor

jtlayton commented Aug 12, 2019

Backport of a couple of patches that fix some bogus error handling in the userland client. A few minor merge conflicts that mostly arose from the change to std::lock_guard that isn't in mimic.

https://tracker.ceph.com/issues/40162

jtlayton added 2 commits May 30, 2019
Nothing calls this method.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
(cherry picked from commit 5c419b6)

Conflicts:
	src/client/Client.cc
	    - Mutex::Locker -> std::lock_guard
	src/client/Client.h
	    - contextual merge conflict
ll_lookup_inode can end up getting back 0 from _lookup_parent,
without zeroing out the parent pointer, which ends up remaining
uninitialized.

Fix this by moving most of the sanity checks in _lookup_parent
into ll_lookup_inode, and only have it issue the call to the MDS.

This also allows us to do the checks in a more sane order.

Fixes: http://tracker.ceph.com/issues/40085
Signed-off-by: Jeff Layton <jlayton@redhat.com>
(cherry picked from commit 3ade7c0)

Conflicts:
	src/client/Client.cc
	    - Mutex::Locker -> std::lock_guard
	    - changed some asserts to ceph_asserts
@jtlayton jtlayton added the cephfs label Aug 12, 2019
@jtlayton jtlayton added this to the mimic milestone Aug 12, 2019
@jtlayton jtlayton requested review from batrick, ukernel and smithfarm Aug 12, 2019
@smithfarm smithfarm changed the title mimic: client: fix bad error handling in _lookup_parent mimic: cephfs: client: fix bad error handling in _lookup_parent Sep 8, 2019
@yuriw

This comment has been minimized.

Copy link
Contributor

yuriw commented Oct 7, 2019

@yuriw yuriw merged commit e12e8ee into ceph:mimic Oct 9, 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
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.