GitHub PullRequestReviewCommentEvent at 2014-06-12 20:30:23
Repository: docker
Actor: harshavardhana
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/dotcloud/docker/pulls/comments/13724476","id":13724476,"diff_hunk":"@@ -19,23 +44,25 @@ func Lgetxattr(path string, attr string) ([]byte, error) {\n \tdest := make([]byte, 128)\n \tdestBytes := unsafe.Pointer(&dest[0])\n \tsz, _, errno := syscall.Syscall6(syscall.SYS_LGETXATTR, uintptr(unsafe.Pointer(pathBytes)), uintptr(unsafe.Pointer(attrBytes)), uintptr(destBytes), uintptr(len(dest)), 0, 0)\n-\tif errno == syscall.ENODATA {\n-\t\treturn nil, nil\n-\t}\n-\tif errno == syscall.ERANGE {\n+\n+\tswitch {","path":"pkg/system/xattrs_linux.go","position":41,"original_position":41,"commit_id":"48710e5c8d0477e734715b837a0d275c2efaab8a","original_commit_id":"48710e5c8d0477e734715b837a0d275c2efaab8a","user":{"login":"harshavardhana","id":622699,"avatar_url":"https://avatars.githubusercontent.com/u/622699?","gravatar_id":"2cc38bf43c3c622875b11720b96692c8","url":"https://api.github.com/users/harshavardhana","html_url":"https://github.com/harshavardhana","followers_url":"https://api.github.com/users/harshavardhana/followers","following_url":"https://api.github.com/users/harshavardhana/following{/other_user}","gists_url":"https://api.github.com/users/harshavardhana/gists{/gist_id}","starred_url":"https://api.github.com/users/harshavardhana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/harshavardhana/subscriptions","organizations_url":"https://api.github.com/users/harshavardhana/orgs","repos_url":"https://api.github.com/users/harshavardhana/repos","events_url":"https://api.github.com/users/harshavardhana/events{/privacy}","received_events_url":"https://api.github.com/users/harshavardhana/received_events","type":"User","site_admin":false},"body":"I wanted to provide \"errno != 0\" condition not any easier way to do it, also this switch statement follows to be idiomatic with if-else-if-else chain which existed before","created_at":"2014-06-12T20:30:23Z","updated_at":"2014-06-12T20:30:23Z","html_url":"https://github.com/dotcloud/docker/pull/6190#discussion_r13724476","pull_request_url":"https://api.github.com/repos/dotcloud/docker/pulls/6190","_links":{"self":{"href":"https://api.github.com/repos/dotcloud/docker/pulls/comments/13724476"},"html":{"href":"https://github.com/dotcloud/docker/pull/6190#discussion_r13724476"},"pull_request":{"href":"https://api.github.com/repos/dotcloud/docker/pulls/6190"}}},"pull_request":{"url":"https://api.github.com/repos/dotcloud/docker/pulls/6190","id":16692714,"html_url":"https://github.com/dotcloud/docker/pull/6190","diff_url":"https://github.com/dotcloud/docker/pull/6190.diff","patch_url":"https://github.com/dotcloud/docker/pull/6190.patch","issue_url":"https://api.github.com/repos/dotcloud/docker/issues/6190","number":6190,"state":"open","title":"devmapper: use 'user_xattr' as mountoption for ext4 - fixes #6189","user":{"login":"harshavardhana","id":622699,"avatar_url":"https://avatars.githubusercontent.com/u/622699?","gravatar_id":"2cc38bf43c3c622875b11720b96692c8","url":"https://api.github.com/users/harshavardhana","html_url":"https://github.com/harshavardhana","followers_url":"https://api.github.com/users/harshavardhana/followers","following_url":"https://api.github.com/users/harshavardhana/following{/other_user}","gists_url":"https://api.github.com/users/harshavardhana/gists{/gist_id}","starred_url":"https://api.github.com/users/harshavardhana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/harshavardhana/subscriptions","organizations_url":"https://api.github.com/users/harshavardhana/orgs","repos_url":"https://api.github.com/users/harshavardhana/repos","events_url":"https://api.github.com/users/harshavardhana/events{/privacy}","received_events_url":"https://api.github.com/users/harshavardhana/received_events","type":"User","site_admin":false},"body":"~~~\r\n># docker pull centos\r\n># docker run -i -t centos /bin/bash\r\n\r\nbash-4.1# touch file\r\nbash-4.1# setfattr -n user.attr -v 1 file\r\nsetfattr: file: Operation not permitted\r\n~~~\r\n\r\nWith 'user_xattr' as mount option\r\n\r\n~~~\r\nbash-4.1# touch file\r\nbash-4.1# setfattr -n user.attr -v 1 file\r\nbash-4.1# getfattr -d -m. file\r\n>#file: file\r\nuser.xattr=\"1\"\r\n~~~","created_at":"2014-06-04T06:11:56Z","updated_at":"2014-06-12T20:30:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5e29f463199b21e2097b2b7652adad5d0cabc743","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dotcloud/docker/pulls/6190/commits","review_comments_url":"https://api.github.com/repos/dotcloud/docker/pulls/6190/comments","review_comment_url":"https://api.github.com/repos/dotcloud/docker/pulls/comments/{number}","comments_url":"https://api.github.com/repos/dotcloud/docker/issues/6190/comments","statuses_url":"https://api.github.com/repos/dotcloud/docker/statuses/48710e5c8d0477e734715b837a0d275c2efaab8a","head":{"label":"harshavardhana:user_xattr_ext4","ref":"user_xattr_ext4","sha":"48710e5c8d0477e734715b837a0d275c2efaab8a","user":{"login":"harshavardhana","id":622699,"avatar_url":"https://avatars.githubusercontent.com/u/622699?","gravatar_id":"2cc38bf43c3c622875b11720b96692c8","url":"https://api.github.com/users/harshavardhana","html_url":"https://github.com/harshavardhana","followers_url":"https://api.github.com/users/harshavardhana/followers","following_url":"https://api.github.com/users/harshavardhana/following{/other_user}","gists_url":"https://api.github.com/users/harshavardhana/gists{/gist_id}","starred_url":"https://api.github.com/users/harshavardhana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/harshavardhana/subscriptions","organizations_url":"https://api.github.com/users/harshavardhana/orgs","repos_url":"https://api.github.com/users/harshavardhana/repos","events_url":"https://api.github.com/users/harshavardhana/events{/privacy}","received_events_url":"https://api.github.com/users/harshavardhana/received_events","type":"User","site_admin":false},"repo":{"id":20465431,"name":"docker","full_name":"harshavardhana/docker","owner":{"login":"harshavardhana","id":622699,"avatar_url":"https://avatars.githubusercontent.com/u/622699?","gravatar_id":"2cc38bf43c3c622875b11720b96692c8","url":"https://api.github.com/users/harshavardhana","html_url":"https://github.com/harshavardhana","followers_url":"https://api.github.com/users/harshavardhana/followers","following_url":"https://api.github.com/users/harshavardhana/following{/other_user}","gists_url":"https://api.github.com/users/harshavardhana/gists{/gist_id}","starred_url":"https://api.github.com/users/harshavardhana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/harshavardhana/subscriptions","organizations_url":"https://api.github.com/users/harshavardhana/orgs","repos_url":"https://api.github.com/users/harshavardhana/repos","events_url":"https://api.github.com/users/harshavardhana/events{/privacy}","received_events_url":"https://api.github.com/users/harshavardhana/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/harshavardhana/docker","description":"Docker - the open-source application container engine","fork":true,"url":"https://api.github.com/repos/harshavardhana/docker","forks_url":"https://api.github.com/repos/harshavardhana/docker/forks","keys_url":"https://api.github.com/repos/harshavardhana/docker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/harshavardhana/docker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/harshavardhana/docker/teams","hooks_url":"https://api.github.com/repos/harshavardhana/docker/hooks","issue_events_url":"https://api.github.com/repos/harshavardhana/docker/issues/events{/number}","events_url":"https://api.github.com/repos/harshavardhana/docker/events","assignees_url":"https://api.github.com/repos/harshavardhana/docker/assignees{/user}","branches_url":"https://api.github.com/repos/harshavardhana/docker/branches{/branch}","tags_url":"https://api.github.com/repos/harshavardhana/docker/tags","blobs_url":"https://api.github.com/repos/harshavardhana/docker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/harshavardhana/docker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/harshavardhana/docker/git/refs{/sha}","trees_url":"https://api.github.com/repos/harshavardhana/docker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/harshavardhana/docker/statuses/{sha}","languages_url":"https://api.github.com/repos/harshavardhana/docker/languages","stargazers_url":"https://api.github.com/repos/harshavardhana/docker/stargazers","contributors_url":"https://api.github.com/repos/harshavardhana/docker/contributors","subscribers_url":"https://api.github.com/repos/harshavardhana/docker/subscribers","subscription_url":"https://api.github.com/repos/harshavardhana/docker/subscription","commits_url":"https://api.github.com/repos/harshavardhana/docker/commits{/sha}","git_commits_url":"https://api.github.com/repos/harshavardhana/docker/git/commits{/sha}","comments_url":"https://api.github.com/repos/harshavardhana/docker/comments{/number}","issue_comment_url":"https://api.github.com/repos/harshavardhana/docker/issues/comments/{number}","contents_url":"https://api.github.com/repos/harshavardhana/docker/contents/{+path}","compare_url":"https://api.github.com/repos/harshavardhana/docker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/harshavardhana/docker/merges","archive_url":"https://api.github.com/repos/harshavardhana/docker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/harshavardhana/docker/downloads","issues_url":"https://api.github.com/repos/harshavardhana/docker/issues{/number}","pulls_url":"https://api.github.com/repos/harshavardhana/docker/pulls{/number}","milestones_url":"https://api.github.com/repos/harshavardhana/docker/milestones{/number}","notifications_url":"https://api.github.com/repos/harshavardhana/docker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/harshavardhana/docker/labels{/name}","releases_url":"https://api.github.com/repos/harshavardhana/docker/releases{/id}","created_at":"2014-06-04T01:05:09Z","updated_at":"2014-06-11T08:56:49Z","pushed_at":"2014-06-11T08:56:48Z","git_url":"git://github.com/harshavardhana/docker.git","ssh_url":"git@github.com:harshavardhana/docker.git","clone_url":"https://github.com/harshavardhana/docker.git","svn_url":"https://github.com/harshavardhana/docker","homepage":"http://www.docker.io","size":27526,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dotcloud:master","ref":"master","sha":"4cf40c968f072d51272217b30ef2b8f5cba55ffe","user":{"login":"dotcloud","id":171922,"avatar_url":"https://avatars.githubusercontent.com/u/171922?","gravatar_id":"d2fbb59e6c8b80a26e48b06ea30d53fd","url":"https://api.github.com/users/dotcloud","html_url":"https://github.com/dotcloud","followers_url":"https://api.github.com/users/dotcloud/followers","following_url":"https://api.github.com/users/dotcloud/following{/other_user}","gists_url":"https://api.github.com/users/dotcloud/gists{/gist_id}","starred_url":"https://api.github.com/users/dotcloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotcloud/subscriptions","organizations_url":"https://api.github.com/users/dotcloud/orgs","repos_url":"https://api.github.com/users/dotcloud/repos","events_url":"https://api.github.com/users/dotcloud/events{/privacy}","received_events_url":"https://api.github.com/users/dotcloud/received_events","type":"Organization","site_admin":false},"repo":{"id":7691631,"name":"docker","full_name":"dotcloud/docker","owner":{"login":"dotcloud","id":171922,"avatar_url":"https://avatars.githubusercontent.com/u/171922?","gravatar_id":"d2fbb59e6c8b80a26e48b06ea30d53fd","url":"https://api.github.com/users/dotcloud","html_url":"https://github.com/dotcloud","followers_url":"https://api.github.com/users/dotcloud/followers","following_url":"https://api.github.com/users/dotcloud/following{/other_user}","gists_url":"https://api.github.com/users/dotcloud/gists{/gist_id}","starred_url":"https://api.github.com/users/dotcloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotcloud/subscriptions","organizations_url":"https://api.github.com/users/dotcloud/orgs","repos_url":"https://api.github.com/users/dotcloud/repos","events_url":"https://api.github.com/users/dotcloud/events{/privacy}","received_events_url":"https://api.github.com/users/dotcloud/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dotcloud/docker","description":"Docker - the open-source application container engine","fork":false,"url":"https://api.github.com/repos/dotcloud/docker","forks_url":"https://api.github.com/repos/dotcloud/docker/forks","keys_url":"https://api.github.com/repos/dotcloud/docker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotcloud/docker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotcloud/docker/teams","hooks_url":"https://api.github.com/repos/dotcloud/docker/hooks","issue_events_url":"https://api.github.com/repos/dotcloud/docker/issues/events{/number}","events_url":"https://api.github.com/repos/dotcloud/docker/events","assignees_url":"https://api.github.com/repos/dotcloud/docker/assignees{/user}","branches_url":"https://api.github.com/repos/dotcloud/docker/branches{/branch}","tags_url":"https://api.github.com/repos/dotcloud/docker/tags","blobs_url":"https://api.github.com/repos/dotcloud/docker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotcloud/docker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotcloud/docker/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotcloud/docker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotcloud/docker/statuses/{sha}","languages_url":"https://api.github.com/repos/dotcloud/docker/languages","stargazers_url":"https://api.github.com/repos/dotcloud/docker/stargazers","contributors_url":"https://api.github.com/repos/dotcloud/docker/contributors","subscribers_url":"https://api.github.com/repos/dotcloud/docker/subscribers","subscription_url":"https://api.github.com/repos/dotcloud/docker/subscription","commits_url":"https://api.github.com/repos/dotcloud/docker/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotcloud/docker/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotcloud/docker/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotcloud/docker/issues/comments/{number}","contents_url":"https://api.github.com/repos/dotcloud/docker/contents/{+path}","compare_url":"https://api.github.com/repos/dotcloud/docker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotcloud/docker/merges","archive_url":"https://api.github.com/repos/dotcloud/docker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotcloud/docker/downloads","issues_url":"https://api.github.com/repos/dotcloud/docker/issues{/number}","pulls_url":"https://api.github.com/repos/dotcloud/docker/pulls{/number}","milestones_url":"https://api.github.com/repos/dotcloud/docker/milestones{/number}","notifications_url":"https://api.github.com/repos/dotcloud/docker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotcloud/docker/labels{/name}","releases_url":"https://api.github.com/repos/dotcloud/docker/releases{/id}","created_at":"2013-01-18T18:10:57Z","updated_at":"2014-06-12T20:07:42Z","pushed_at":"2014-06-12T19:26:55Z","git_url":"git://github.com/dotcloud/docker.git","ssh_url":"git@github.com:dotcloud/docker.git","clone_url":"https://github.com/dotcloud/docker.git","svn_url":"https://github.com/dotcloud/docker","homepage":"http://www.docker.io","size":104106,"stargazers_count":12810,"watchers_count":12810,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":2172,"mirror_url":null,"open_issues_count":616,"forks":2172,"open_issues":616,"watchers":12810,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotcloud/docker/pulls/6190"},"html":{"href":"https://github.com/dotcloud/docker/pull/6190"},"issue":{"href":"https://api.github.com/repos/dotcloud/docker/issues/6190"},"comments":{"href":"https://api.github.com/repos/dotcloud/docker/issues/6190/comments"},"review_comments":{"href":"https://api.github.com/repos/dotcloud/docker/pulls/6190/comments"},"review_comment":{"href":"https://api.github.com/repos/dotcloud/docker/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/dotcloud/docker/pulls/6190/commits"},"statuses":{"href":"https://api.github.com/repos/dotcloud/docker/statuses/48710e5c8d0477e734715b837a0d275c2efaab8a"}}}}