{"action":"created","comment":{"url":"https://api.github.com/repos/ceph/ceph/pulls/comments/74484585","id":74484585,"diff_hunk":"@@ -1425,16 +1425,24 @@ TEST(LibCephFS, SlashDotDot) {\n   /* At root, \".\" and \"..\" should be the same inode */\n   ASSERT_EQ(ino, st.st_ino);\n \n-\n-  /* Make sure it works same way when mounting subtree */\n+  /* Test accessing the parent of an unlinked directory */\n   char dir1[32], dir2[32];\n   sprintf(dir1, \"/sldotdot%x\", getpid());\n   sprintf(dir2, \"%s/sub%x\", dir1, getpid());\n \n   ASSERT_EQ(ceph_mkdir(cmount, dir1, 0755), 0);\n   ASSERT_EQ(ceph_mkdir(cmount, dir2, 0755), 0);\n+\n+  ASSERT_EQ(ceph_chdir(cmount, dir2), 0);\n+  ASSERT_EQ(ceph_rmdir(cmount, dir2), 0);\n+  ASSERT_EQ(ceph_stat(cmount, dir1, &st), 0);\n+  ino = st.st_ino;\n+  ASSERT_EQ(ceph_stat(cmount, \"..\", &st), -ENOENT);","path":"src/test/libcephfs/test.cc","position":33,"original_position":18,"commit_id":"7c67397295dc935e407627aee2de8cd6110b3ee4","original_commit_id":"7c67397295dc935e407627aee2de8cd6110b3ee4","user":{"login":"jtlayton","id":10671515,"avatar_url":"https://avatars.githubusercontent.com/u/10671515?v=3","gravatar_id":"","url":"https://api.github.com/users/jtlayton","html_url":"https://github.com/jtlayton","followers_url":"https://api.github.com/users/jtlayton/followers","following_url":"https://api.github.com/users/jtlayton/following{/other_user}","gists_url":"https://api.github.com/users/jtlayton/gists{/gist_id}","starred_url":"https://api.github.com/users/jtlayton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jtlayton/subscriptions","organizations_url":"https://api.github.com/users/jtlayton/orgs","repos_url":"https://api.github.com/users/jtlayton/repos","events_url":"https://api.github.com/users/jtlayton/events{/privacy}","received_events_url":"https://api.github.com/users/jtlayton/received_events","type":"User","site_admin":false},"body":"Because dir2 is now unlinked. We chdir into \"dir2\", then rmdir \"dir2\" and then see whether the parent of that dir is now accessible. It's not, so you get -ENOENT back (no parent).\r\n\r\nHmm...come to think of it -- maybe we do need to handle the readdir case here as well? No reason you couldn't issue a readdir from in that now-unlinked directory.","created_at":"2016-08-11T19:11:26Z","updated_at":"2016-08-11T19:11:26Z","html_url":"https://github.com/ceph/ceph/pull/10691#discussion_r74484585","pull_request_url":"https://api.github.com/repos/ceph/ceph/pulls/10691","_links":{"self":{"href":"https://api.github.com/repos/ceph/ceph/pulls/comments/74484585"},"html":{"href":"https://github.com/ceph/ceph/pull/10691#discussion_r74484585"},"pull_request":{"href":"https://api.github.com/repos/ceph/ceph/pulls/10691"}}},"pull_request":{"url":"https://api.github.com/repos/ceph/ceph/pulls/10691","id":81002722,"html_url":"https://github.com/ceph/ceph/pull/10691","diff_url":"https://github.com/ceph/ceph/pull/10691.diff","patch_url":"https://github.com/ceph/ceph/pull/10691.patch","issue_url":"https://api.github.com/repos/ceph/ceph/issues/10691","number":10691,"state":"open","locked":false,"title":"Clean up handling of \"/..\" in ceph client","user":{"login":"jtlayton","id":10671515,"avatar_url":"https://avatars.githubusercontent.com/u/10671515?v=3","gravatar_id":"","url":"https://api.github.com/users/jtlayton","html_url":"https://github.com/jtlayton","followers_url":"https://api.github.com/users/jtlayton/followers","following_url":"https://api.github.com/users/jtlayton/following{/other_user}","gists_url":"https://api.github.com/users/jtlayton/gists{/gist_id}","starred_url":"https://api.github.com/users/jtlayton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jtlayton/subscriptions","organizations_url":"https://api.github.com/users/jtlayton/orgs","repos_url":"https://api.github.com/users/jtlayton/repos","events_url":"https://api.github.com/users/jtlayton/events{/privacy}","received_events_url":"https://api.github.com/users/jtlayton/received_events","type":"User","site_admin":false},"body":"This PR is a follow up to a RFC patch posting I made on the ceph-devel list. The libcephfs code has some special handling for \"..\" at the root that seems to be entirely unnecessary. The typical way this is handled is to make the root its own parent. This patchset makes that change and adds some testcases that verify that it will continue to work properly in the future.\r\n\r\nNote that ceph-fuse isn't affected by this, since the Linux VFS layer will detect that there is a mountpoint traversal and handle it appropriately. So, this should only have an effect on applications that are working with libcephfs directly.\r\n\r\nThe main impetus for this is to simplify the code to prepare for some coming changes (the statx series, in particular).","created_at":"2016-08-11T18:04:29Z","updated_at":"2016-08-11T19:11:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"589a3fba6129afddb6d9338b81923e4b95b76208","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ceph/ceph/pulls/10691/commits","review_comments_url":"https://api.github.com/repos/ceph/ceph/pulls/10691/comments","review_comment_url":"https://api.github.com/repos/ceph/ceph/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ceph/ceph/issues/10691/comments","statuses_url":"https://api.github.com/repos/ceph/ceph/statuses/7c67397295dc935e407627aee2de8cd6110b3ee4","head":{"label":"ceph:wip-jlayton-dotdot","ref":"wip-jlayton-dotdot","sha":"7c67397295dc935e407627aee2de8cd6110b3ee4","user":{"login":"ceph","id":1015767,"avatar_url":"https://avatars.githubusercontent.com/u/1015767?v=3","gravatar_id":"","url":"https://api.github.com/users/ceph","html_url":"https://github.com/ceph","followers_url":"https://api.github.com/users/ceph/followers","following_url":"https://api.github.com/users/ceph/following{/other_user}","gists_url":"https://api.github.com/users/ceph/gists{/gist_id}","starred_url":"https://api.github.com/users/ceph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ceph/subscriptions","organizations_url":"https://api.github.com/users/ceph/orgs","repos_url":"https://api.github.com/users/ceph/repos","events_url":"https://api.github.com/users/ceph/events{/privacy}","received_events_url":"https://api.github.com/users/ceph/received_events","type":"Organization","site_admin":false},"repo":{"id":2310495,"name":"ceph","full_name":"ceph/ceph","owner":{"login":"ceph","id":1015767,"avatar_url":"https://avatars.githubusercontent.com/u/1015767?v=3","gravatar_id":"","url":"https://api.github.com/users/ceph","html_url":"https://github.com/ceph","followers_url":"https://api.github.com/users/ceph/followers","following_url":"https://api.github.com/users/ceph/following{/other_user}","gists_url":"https://api.github.com/users/ceph/gists{/gist_id}","starred_url":"https://api.github.com/users/ceph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ceph/subscriptions","organizations_url":"https://api.github.com/users/ceph/orgs","repos_url":"https://api.github.com/users/ceph/repos","events_url":"https://api.github.com/users/ceph/events{/privacy}","received_events_url":"https://api.github.com/users/ceph/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ceph/ceph","description":"Ceph is a distributed object, block, and file storage platform ","fork":false,"url":"https://api.github.com/repos/ceph/ceph","forks_url":"https://api.github.com/repos/ceph/ceph/forks","keys_url":"https://api.github.com/repos/ceph/ceph/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ceph/ceph/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ceph/ceph/teams","hooks_url":"https://api.github.com/repos/ceph/ceph/hooks","issue_events_url":"https://api.github.com/repos/ceph/ceph/issues/events{/number}","events_url":"https://api.github.com/repos/ceph/ceph/events","assignees_url":"https://api.github.com/repos/ceph/ceph/assignees{/user}","branches_url":"https://api.github.com/repos/ceph/ceph/branches{/branch}","tags_url":"https://api.github.com/repos/ceph/ceph/tags","blobs_url":"https://api.github.com/repos/ceph/ceph/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ceph/ceph/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ceph/ceph/git/refs{/sha}","trees_url":"https://api.github.com/repos/ceph/ceph/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ceph/ceph/statuses/{sha}","languages_url":"https://api.github.com/repos/ceph/ceph/languages","stargazers_url":"https://api.github.com/repos/ceph/ceph/stargazers","contributors_url":"https://api.github.com/repos/ceph/ceph/contributors","subscribers_url":"https://api.github.com/repos/ceph/ceph/subscribers","subscription_url":"https://api.github.com/repos/ceph/ceph/subscription","commits_url":"https://api.github.com/repos/ceph/ceph/commits{/sha}","git_commits_url":"https://api.github.com/repos/ceph/ceph/git/commits{/sha}","comments_url":"https://api.github.com/repos/ceph/ceph/comments{/number}","issue_comment_url":"https://api.github.com/repos/ceph/ceph/issues/comments{/number}","contents_url":"https://api.github.com/repos/ceph/ceph/contents/{+path}","compare_url":"https://api.github.com/repos/ceph/ceph/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ceph/ceph/merges","archive_url":"https://api.github.com/repos/ceph/ceph/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ceph/ceph/downloads","issues_url":"https://api.github.com/repos/ceph/ceph/issues{/number}","pulls_url":"https://api.github.com/repos/ceph/ceph/pulls{/number}","milestones_url":"https://api.github.com/repos/ceph/ceph/milestones{/number}","notifications_url":"https://api.github.com/repos/ceph/ceph/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ceph/ceph/labels{/name}","releases_url":"https://api.github.com/repos/ceph/ceph/releases{/id}","deployments_url":"https://api.github.com/repos/ceph/ceph/deployments","created_at":"2011-09-01T21:41:26Z","updated_at":"2016-08-11T09:24:56Z","pushed_at":"2016-08-11T19:06:30Z","git_url":"git://github.com/ceph/ceph.git","ssh_url":"git@github.com:ceph/ceph.git","clone_url":"https://github.com/ceph/ceph.git","svn_url":"https://github.com/ceph/ceph","homepage":"http://ceph.com","size":233293,"stargazers_count":2363,"watchers_count":2363,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1409,"mirror_url":null,"open_issues_count":460,"forks":1409,"open_issues":460,"watchers":2363,"default_branch":"master"}},"base":{"label":"ceph:master","ref":"master","sha":"ec24ff0ceeaa735423bb113a4e522bb543e1bbcc","user":{"login":"ceph","id":1015767,"avatar_url":"https://avatars.githubusercontent.com/u/1015767?v=3","gravatar_id":"","url":"https://api.github.com/users/ceph","html_url":"https://github.com/ceph","followers_url":"https://api.github.com/users/ceph/followers","following_url":"https://api.github.com/users/ceph/following{/other_user}","gists_url":"https://api.github.com/users/ceph/gists{/gist_id}","starred_url":"https://api.github.com/users/ceph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ceph/subscriptions","organizations_url":"https://api.github.com/users/ceph/orgs","repos_url":"https://api.github.com/users/ceph/repos","events_url":"https://api.github.com/users/ceph/events{/privacy}","received_events_url":"https://api.github.com/users/ceph/received_events","type":"Organization","site_admin":false},"repo":{"id":2310495,"name":"ceph","full_name":"ceph/ceph","owner":{"login":"ceph","id":1015767,"avatar_url":"https://avatars.githubusercontent.com/u/1015767?v=3","gravatar_id":"","url":"https://api.github.com/users/ceph","html_url":"https://github.com/ceph","followers_url":"https://api.github.com/users/ceph/followers","following_url":"https://api.github.com/users/ceph/following{/other_user}","gists_url":"https://api.github.com/users/ceph/gists{/gist_id}","starred_url":"https://api.github.com/users/ceph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ceph/subscriptions","organizations_url":"https://api.github.com/users/ceph/orgs","repos_url":"https://api.github.com/users/ceph/repos","events_url":"https://api.github.com/users/ceph/events{/privacy}","received_events_url":"https://api.github.com/users/ceph/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ceph/ceph","description":"Ceph is a distributed object, block, and file storage platform ","fork":false,"url":"https://api.github.com/repos/ceph/ceph","forks_url":"https://api.github.com/repos/ceph/ceph/forks","keys_url":"https://api.github.com/repos/ceph/ceph/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ceph/ceph/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ceph/ceph/teams","hooks_url":"https://api.github.com/repos/ceph/ceph/hooks","issue_events_url":"https://api.github.com/repos/ceph/ceph/issues/events{/number}","events_url":"https://api.github.com/repos/ceph/ceph/events","assignees_url":"https://api.github.com/repos/ceph/ceph/assignees{/user}","branches_url":"https://api.github.com/repos/ceph/ceph/branches{/branch}","tags_url":"https://api.github.com/repos/ceph/ceph/tags","blobs_url":"https://api.github.com/repos/ceph/ceph/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ceph/ceph/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ceph/ceph/git/refs{/sha}","trees_url":"https://api.github.com/repos/ceph/ceph/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ceph/ceph/statuses/{sha}","languages_url":"https://api.github.com/repos/ceph/ceph/languages","stargazers_url":"https://api.github.com/repos/ceph/ceph/stargazers","contributors_url":"https://api.github.com/repos/ceph/ceph/contributors","subscribers_url":"https://api.github.com/repos/ceph/ceph/subscribers","subscription_url":"https://api.github.com/repos/ceph/ceph/subscription","commits_url":"https://api.github.com/repos/ceph/ceph/commits{/sha}","git_commits_url":"https://api.github.com/repos/ceph/ceph/git/commits{/sha}","comments_url":"https://api.github.com/repos/ceph/ceph/comments{/number}","issue_comment_url":"https://api.github.com/repos/ceph/ceph/issues/comments{/number}","contents_url":"https://api.github.com/repos/ceph/ceph/contents/{+path}","compare_url":"https://api.github.com/repos/ceph/ceph/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ceph/ceph/merges","archive_url":"https://api.github.com/repos/ceph/ceph/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ceph/ceph/downloads","issues_url":"https://api.github.com/repos/ceph/ceph/issues{/number}","pulls_url":"https://api.github.com/repos/ceph/ceph/pulls{/number}","milestones_url":"https://api.github.com/repos/ceph/ceph/milestones{/number}","notifications_url":"https://api.github.com/repos/ceph/ceph/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ceph/ceph/labels{/name}","releases_url":"https://api.github.com/repos/ceph/ceph/releases{/id}","deployments_url":"https://api.github.com/repos/ceph/ceph/deployments","created_at":"2011-09-01T21:41:26Z","updated_at":"2016-08-11T09:24:56Z","pushed_at":"2016-08-11T19:06:30Z","git_url":"git://github.com/ceph/ceph.git","ssh_url":"git@github.com:ceph/ceph.git","clone_url":"https://github.com/ceph/ceph.git","svn_url":"https://github.com/ceph/ceph","homepage":"http://ceph.com","size":233293,"stargazers_count":2363,"watchers_count":2363,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1409,"mirror_url":null,"open_issues_count":460,"forks":1409,"open_issues":460,"watchers":2363,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ceph/ceph/pulls/10691"},"html":{"href":"https://github.com/ceph/ceph/pull/10691"},"issue":{"href":"https://api.github.com/repos/ceph/ceph/issues/10691"},"comments":{"href":"https://api.github.com/repos/ceph/ceph/issues/10691/comments"},"review_comments":{"href":"https://api.github.com/repos/ceph/ceph/pulls/10691/comments"},"review_comment":{"href":"https://api.github.com/repos/ceph/ceph/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ceph/ceph/pulls/10691/commits"},"statuses":{"href":"https://api.github.com/repos/ceph/ceph/statuses/7c67397295dc935e407627aee2de8cd6110b3ee4"}}}}
{"actor":{"display_login":"jtlayton"}}