{"action":"created","comment":{"url":"https://api.github.com/repos/ceph/ceph/pulls/comments/78308611","id":78308611,"diff_hunk":"@@ -460,6 +461,53 @@ static int do_put(IoCtx& io_ctx, RadosStriper& striper,\n   return ret;\n }\n \n+static int do_append(IoCtx& io_ctx, RadosStriper& striper,\n+                  const char *objname, const char *infile, int op_size,\n+                  bool use_striper)\n+{\n+  string oid(objname);\n+  bufferlist indata;\n+  bool stdio = false;\n+  if (strcmp(infile, \"-\") == 0)\n+    stdio = true;\n+\n+  int ret;\n+  int fd = STDIN_FILENO;\n+  if (!stdio)\n+    fd = open(infile, O_RDONLY);\n+  if (fd < 0) {\n+    cerr << \"error reading input file \" << infile << \": \" << cpp_strerror(errno) << std::endl;\n+    return 1;\n+  }\n+  char *buf = new char[op_size];\n+  int count = op_size;\n+  while (count != 0) {\n+    count = read(fd, buf, op_size);\n+    if (count < 0) {\n+      ret = -errno;","path":"src/tools/rados/rados.cc","position":35,"original_position":35,"commit_id":"a261353e68be53a701fa5d056fbd5446e776ebf1","original_commit_id":"a261353e68be53a701fa5d056fbd5446e776ebf1","user":{"login":"athanatos","id":544782,"avatar_url":"https://avatars.githubusercontent.com/u/544782?v=3","gravatar_id":"","url":"https://api.github.com/users/athanatos","html_url":"https://github.com/athanatos","followers_url":"https://api.github.com/users/athanatos/followers","following_url":"https://api.github.com/users/athanatos/following{/other_user}","gists_url":"https://api.github.com/users/athanatos/gists{/gist_id}","starred_url":"https://api.github.com/users/athanatos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/athanatos/subscriptions","organizations_url":"https://api.github.com/users/athanatos/orgs","repos_url":"https://api.github.com/users/athanatos/repos","events_url":"https://api.github.com/users/athanatos/events{/privacy}","received_events_url":"https://api.github.com/users/athanatos/received_events","type":"User","site_admin":false},"body":"If this is read(2), you need to check for EINTR...\r\n\r\nYes, do_put also appears to have this bug.  I suggest you use safe_read from common/safe_io.h.","created_at":"2016-09-12T01:58:18Z","updated_at":"2016-09-12T01:58:18Z","html_url":"https://github.com/ceph/ceph/pull/11036#discussion_r78308611","pull_request_url":"https://api.github.com/repos/ceph/ceph/pulls/11036","_links":{"self":{"href":"https://api.github.com/repos/ceph/ceph/pulls/comments/78308611"},"html":{"href":"https://github.com/ceph/ceph/pull/11036#discussion_r78308611"},"pull_request":{"href":"https://api.github.com/repos/ceph/ceph/pulls/11036"}}},"pull_request":{"url":"https://api.github.com/repos/ceph/ceph/pulls/11036","id":84665379,"html_url":"https://github.com/ceph/ceph/pull/11036","diff_url":"https://github.com/ceph/ceph/pull/11036.diff","patch_url":"https://github.com/ceph/ceph/pull/11036.patch","issue_url":"https://api.github.com/repos/ceph/ceph/issues/11036","number":11036,"state":"open","locked":false,"title":"Added append functionality to rados tool.","user":{"login":"tomy-ac","id":17539218,"avatar_url":"https://avatars.githubusercontent.com/u/17539218?v=3","gravatar_id":"","url":"https://api.github.com/users/tomy-ac","html_url":"https://github.com/tomy-ac","followers_url":"https://api.github.com/users/tomy-ac/followers","following_url":"https://api.github.com/users/tomy-ac/following{/other_user}","gists_url":"https://api.github.com/users/tomy-ac/gists{/gist_id}","starred_url":"https://api.github.com/users/tomy-ac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomy-ac/subscriptions","organizations_url":"https://api.github.com/users/tomy-ac/orgs","repos_url":"https://api.github.com/users/tomy-ac/repos","events_url":"https://api.github.com/users/tomy-ac/events{/privacy}","received_events_url":"https://api.github.com/users/tomy-ac/received_events","type":"User","site_admin":false},"body":"Signed-off-by: Tomy Cheru <tomy.cheru@sandisk.com>","created_at":"2016-09-09T14:58:33Z","updated_at":"2016-09-12T01:58:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"78fdf286dcb8f27e0c0e790381a9e3e6682ba67c","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ceph/ceph/pulls/11036/commits","review_comments_url":"https://api.github.com/repos/ceph/ceph/pulls/11036/comments","review_comment_url":"https://api.github.com/repos/ceph/ceph/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ceph/ceph/issues/11036/comments","statuses_url":"https://api.github.com/repos/ceph/ceph/statuses/a261353e68be53a701fa5d056fbd5446e776ebf1","head":{"label":"tomy-ac:wip-tc-rados_append","ref":"wip-tc-rados_append","sha":"a261353e68be53a701fa5d056fbd5446e776ebf1","user":{"login":"tomy-ac","id":17539218,"avatar_url":"https://avatars.githubusercontent.com/u/17539218?v=3","gravatar_id":"","url":"https://api.github.com/users/tomy-ac","html_url":"https://github.com/tomy-ac","followers_url":"https://api.github.com/users/tomy-ac/followers","following_url":"https://api.github.com/users/tomy-ac/following{/other_user}","gists_url":"https://api.github.com/users/tomy-ac/gists{/gist_id}","starred_url":"https://api.github.com/users/tomy-ac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomy-ac/subscriptions","organizations_url":"https://api.github.com/users/tomy-ac/orgs","repos_url":"https://api.github.com/users/tomy-ac/repos","events_url":"https://api.github.com/users/tomy-ac/events{/privacy}","received_events_url":"https://api.github.com/users/tomy-ac/received_events","type":"User","site_admin":false},"repo":{"id":62429942,"name":"ceph","full_name":"tomy-ac/ceph","owner":{"login":"tomy-ac","id":17539218,"avatar_url":"https://avatars.githubusercontent.com/u/17539218?v=3","gravatar_id":"","url":"https://api.github.com/users/tomy-ac","html_url":"https://github.com/tomy-ac","followers_url":"https://api.github.com/users/tomy-ac/followers","following_url":"https://api.github.com/users/tomy-ac/following{/other_user}","gists_url":"https://api.github.com/users/tomy-ac/gists{/gist_id}","starred_url":"https://api.github.com/users/tomy-ac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomy-ac/subscriptions","organizations_url":"https://api.github.com/users/tomy-ac/orgs","repos_url":"https://api.github.com/users/tomy-ac/repos","events_url":"https://api.github.com/users/tomy-ac/events{/privacy}","received_events_url":"https://api.github.com/users/tomy-ac/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tomy-ac/ceph","description":"Ceph is a distributed object, block, and file storage platform ","fork":true,"url":"https://api.github.com/repos/tomy-ac/ceph","forks_url":"https://api.github.com/repos/tomy-ac/ceph/forks","keys_url":"https://api.github.com/repos/tomy-ac/ceph/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tomy-ac/ceph/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tomy-ac/ceph/teams","hooks_url":"https://api.github.com/repos/tomy-ac/ceph/hooks","issue_events_url":"https://api.github.com/repos/tomy-ac/ceph/issues/events{/number}","events_url":"https://api.github.com/repos/tomy-ac/ceph/events","assignees_url":"https://api.github.com/repos/tomy-ac/ceph/assignees{/user}","branches_url":"https://api.github.com/repos/tomy-ac/ceph/branches{/branch}","tags_url":"https://api.github.com/repos/tomy-ac/ceph/tags","blobs_url":"https://api.github.com/repos/tomy-ac/ceph/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tomy-ac/ceph/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tomy-ac/ceph/git/refs{/sha}","trees_url":"https://api.github.com/repos/tomy-ac/ceph/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tomy-ac/ceph/statuses/{sha}","languages_url":"https://api.github.com/repos/tomy-ac/ceph/languages","stargazers_url":"https://api.github.com/repos/tomy-ac/ceph/stargazers","contributors_url":"https://api.github.com/repos/tomy-ac/ceph/contributors","subscribers_url":"https://api.github.com/repos/tomy-ac/ceph/subscribers","subscription_url":"https://api.github.com/repos/tomy-ac/ceph/subscription","commits_url":"https://api.github.com/repos/tomy-ac/ceph/commits{/sha}","git_commits_url":"https://api.github.com/repos/tomy-ac/ceph/git/commits{/sha}","comments_url":"https://api.github.com/repos/tomy-ac/ceph/comments{/number}","issue_comment_url":"https://api.github.com/repos/tomy-ac/ceph/issues/comments{/number}","contents_url":"https://api.github.com/repos/tomy-ac/ceph/contents/{+path}","compare_url":"https://api.github.com/repos/tomy-ac/ceph/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tomy-ac/ceph/merges","archive_url":"https://api.github.com/repos/tomy-ac/ceph/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tomy-ac/ceph/downloads","issues_url":"https://api.github.com/repos/tomy-ac/ceph/issues{/number}","pulls_url":"https://api.github.com/repos/tomy-ac/ceph/pulls{/number}","milestones_url":"https://api.github.com/repos/tomy-ac/ceph/milestones{/number}","notifications_url":"https://api.github.com/repos/tomy-ac/ceph/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tomy-ac/ceph/labels{/name}","releases_url":"https://api.github.com/repos/tomy-ac/ceph/releases{/id}","deployments_url":"https://api.github.com/repos/tomy-ac/ceph/deployments","created_at":"2016-07-02T02:22:53Z","updated_at":"2016-07-02T02:25:48Z","pushed_at":"2016-09-09T14:56:00Z","git_url":"git://github.com/tomy-ac/ceph.git","ssh_url":"git@github.com:tomy-ac/ceph.git","clone_url":"https://github.com/tomy-ac/ceph.git","svn_url":"https://github.com/tomy-ac/ceph","homepage":"http://ceph.com","size":180302,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"ceph:master","ref":"master","sha":"253cddaa1eaffbf10e20883a133d3de60a03ce90","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-09-11T22:31:02Z","pushed_at":"2016-09-12T01:47:22Z","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":239525,"stargazers_count":2465,"watchers_count":2465,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1452,"mirror_url":null,"open_issues_count":438,"forks":1452,"open_issues":438,"watchers":2465,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ceph/ceph/pulls/11036"},"html":{"href":"https://github.com/ceph/ceph/pull/11036"},"issue":{"href":"https://api.github.com/repos/ceph/ceph/issues/11036"},"comments":{"href":"https://api.github.com/repos/ceph/ceph/issues/11036/comments"},"review_comments":{"href":"https://api.github.com/repos/ceph/ceph/pulls/11036/comments"},"review_comment":{"href":"https://api.github.com/repos/ceph/ceph/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ceph/ceph/pulls/11036/commits"},"statuses":{"href":"https://api.github.com/repos/ceph/ceph/statuses/a261353e68be53a701fa5d056fbd5446e776ebf1"}}}}
{"actor":{"display_login":"athanatos"}}