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
client: Fix lookup of "/.." in jewel #12766
Conversation
The CEPH_INO_DOTDOT thing is quite strange. Under most OS (Linux included), the parent of the root is itself. IOW, at the root, '.' and '..' refer to the same inode. Change the ceph client to do the same, as this allows users to get valid stat info for '..', as well as elimnating some special-casing. Also in several places, we're checking dn_set.empty as an indicator of being the root. While that is true for the root, it's also true for unlinked directories. This patch has treats them the same. An unlinked directory will be reparented to itself, effectively acting as a root of its own. Fixes: http://tracker.ceph.com/issues/18408 Signed-off-by: Jeff Layton <jlayton@redhat.com> (cherry picked from commit 30d4ca0)
Test run here mostly passed with a few failures that look unrelated to this: http://pulpito.ceph.com/jlayton-2017-01-03_20:28:20-fs-wip-18408-jewel---basic-smithi/ |
89a7809
to
95edad2
Compare
Not sure why the build failed there. Looks like something fell over in jenkins? The patch itself doesn't break anything in my testing. |
Jenkins test this please |
Assigning @gregsfortytwo and @jcsp to review. This should be harmless in jewel, but let me know if you have any objections. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay. This looks fine to me; I don't think we had any other changes this depends on.
@ukernel This passed a cephfs run here [1] with a few failures that appear unrelated to the PR. OK to merge? [1] #12766 (comment) |
oh, I see @ukernel already approved |
This should fix a problem for nfs-ganesha when built against libcephfs. Currently with the jewel client, doing a lookup of ".." at the root directory ends up returning -ENOENT. This converts it to consider the parent of the root to be the root itself (similarly to how /.. works in Linux).
Only lightly tested so far but it is building now and I'll run the whole fs suite over it once it's done.