{"action":"created","comment":{"url":"https://api.github.com/repos/minio/minio/pulls/comments/72415541","id":72415541,"diff_hunk":"@@ -28,11 +28,11 @@ import (\n // erasureCreateFile - writes an entire stream by erasure coding to\n // all the disks, writes also calculate individual block's checksum\n // for future bit-rot protection.\n-func erasureCreateFile(disks []StorageAPI, volume, path string, reader io.Reader, blockSize int64, dataBlocks int, parityBlocks int, writeQuorum int) (bytesWritten int64, checkSums []string, err error) {\n+func erasureCreateFile(disks []StorageAPI, volume, path string, reader io.Reader, blockSize int64, dataBlocks int, parityBlocks int, algo string, writeQuorum int) (bytesWritten int64, checkSums []checkSumInfo, err error) {\n \t// Allocated blockSized buffer for reading.","path":"erasure-createfile.go","position":6,"original_position":6,"commit_id":"17d039a5ca81815022943a7b5586d53e844a6539","original_commit_id":"17d039a5ca81815022943a7b5586d53e844a6539","user":{"login":"krishnasrinivas","id":634494,"avatar_url":"https://avatars.githubusercontent.com/u/634494?v=3","gravatar_id":"","url":"https://api.github.com/users/krishnasrinivas","html_url":"https://github.com/krishnasrinivas","followers_url":"https://api.github.com/users/krishnasrinivas/followers","following_url":"https://api.github.com/users/krishnasrinivas/following{/other_user}","gists_url":"https://api.github.com/users/krishnasrinivas/gists{/gist_id}","starred_url":"https://api.github.com/users/krishnasrinivas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krishnasrinivas/subscriptions","organizations_url":"https://api.github.com/users/krishnasrinivas/orgs","repos_url":"https://api.github.com/users/krishnasrinivas/repos","events_url":"https://api.github.com/users/krishnasrinivas/events{/privacy}","received_events_url":"https://api.github.com/users/krishnasrinivas/received_events","type":"User","site_admin":false},"body":"it's correct to pass algo as a string instead of hard coding.\r\n\r\nbut code is more readable if erasureCreateFile returns `checkSums []string` and constructing checkSumInfo happens at one place (xl.PutObject) than filling some fields in erasureCreateFile and some fields in xl.PutObject\r\n\r\n","created_at":"2016-07-27T10:23:21Z","updated_at":"2016-07-27T10:23:21Z","html_url":"https://github.com/minio/minio/pull/2299#discussion_r72415541","pull_request_url":"https://api.github.com/repos/minio/minio/pulls/2299","_links":{"self":{"href":"https://api.github.com/repos/minio/minio/pulls/comments/72415541"},"html":{"href":"https://github.com/minio/minio/pull/2299#discussion_r72415541"},"pull_request":{"href":"https://api.github.com/repos/minio/minio/pulls/2299"}}},"pull_request":{"url":"https://api.github.com/repos/minio/minio/pulls/2299","id":78988400,"html_url":"https://github.com/minio/minio/pull/2299","diff_url":"https://github.com/minio/minio/pull/2299.diff","patch_url":"https://github.com/minio/minio/pull/2299.patch","issue_url":"https://api.github.com/repos/minio/minio/issues/2299","number":2299,"state":"open","locked":false,"title":"XL/Erasure: Make bit-rot verification based on xl.json algo.","user":{"login":"harshavardhana","id":622699,"avatar_url":"https://avatars.githubusercontent.com/u/622699?v=3","gravatar_id":"","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":"Currently `xl.json` saves algorithm information for bit-rot\r\nverification. Since the bit-rot algo's can change in the\r\nfuture make sure the erasureReadFile doesn't default to\r\na particular algo. Instead use the checkSumInfo.","created_at":"2016-07-27T09:01:34Z","updated_at":"2016-07-27T10:23:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"49acedf3f7b9d63e1758861e4a26a4477d8fcdfb","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/minio/minio/pulls/2299/commits","review_comments_url":"https://api.github.com/repos/minio/minio/pulls/2299/comments","review_comment_url":"https://api.github.com/repos/minio/minio/pulls/comments{/number}","comments_url":"https://api.github.com/repos/minio/minio/issues/2299/comments","statuses_url":"https://api.github.com/repos/minio/minio/statuses/17d039a5ca81815022943a7b5586d53e844a6539","head":{"label":"harshavardhana:cleanup","ref":"cleanup","sha":"17d039a5ca81815022943a7b5586d53e844a6539","user":{"login":"harshavardhana","id":622699,"avatar_url":"https://avatars.githubusercontent.com/u/622699?v=3","gravatar_id":"","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":29261868,"name":"minio","full_name":"harshavardhana/minio","owner":{"login":"harshavardhana","id":622699,"avatar_url":"https://avatars.githubusercontent.com/u/622699?v=3","gravatar_id":"","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/minio","description":"Minio is open source Object Storage inspired from Amazon S3 API and Haystack Object Format","fork":true,"url":"https://api.github.com/repos/harshavardhana/minio","forks_url":"https://api.github.com/repos/harshavardhana/minio/forks","keys_url":"https://api.github.com/repos/harshavardhana/minio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/harshavardhana/minio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/harshavardhana/minio/teams","hooks_url":"https://api.github.com/repos/harshavardhana/minio/hooks","issue_events_url":"https://api.github.com/repos/harshavardhana/minio/issues/events{/number}","events_url":"https://api.github.com/repos/harshavardhana/minio/events","assignees_url":"https://api.github.com/repos/harshavardhana/minio/assignees{/user}","branches_url":"https://api.github.com/repos/harshavardhana/minio/branches{/branch}","tags_url":"https://api.github.com/repos/harshavardhana/minio/tags","blobs_url":"https://api.github.com/repos/harshavardhana/minio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/harshavardhana/minio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/harshavardhana/minio/git/refs{/sha}","trees_url":"https://api.github.com/repos/harshavardhana/minio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/harshavardhana/minio/statuses/{sha}","languages_url":"https://api.github.com/repos/harshavardhana/minio/languages","stargazers_url":"https://api.github.com/repos/harshavardhana/minio/stargazers","contributors_url":"https://api.github.com/repos/harshavardhana/minio/contributors","subscribers_url":"https://api.github.com/repos/harshavardhana/minio/subscribers","subscription_url":"https://api.github.com/repos/harshavardhana/minio/subscription","commits_url":"https://api.github.com/repos/harshavardhana/minio/commits{/sha}","git_commits_url":"https://api.github.com/repos/harshavardhana/minio/git/commits{/sha}","comments_url":"https://api.github.com/repos/harshavardhana/minio/comments{/number}","issue_comment_url":"https://api.github.com/repos/harshavardhana/minio/issues/comments{/number}","contents_url":"https://api.github.com/repos/harshavardhana/minio/contents/{+path}","compare_url":"https://api.github.com/repos/harshavardhana/minio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/harshavardhana/minio/merges","archive_url":"https://api.github.com/repos/harshavardhana/minio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/harshavardhana/minio/downloads","issues_url":"https://api.github.com/repos/harshavardhana/minio/issues{/number}","pulls_url":"https://api.github.com/repos/harshavardhana/minio/pulls{/number}","milestones_url":"https://api.github.com/repos/harshavardhana/minio/milestones{/number}","notifications_url":"https://api.github.com/repos/harshavardhana/minio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/harshavardhana/minio/labels{/name}","releases_url":"https://api.github.com/repos/harshavardhana/minio/releases{/id}","deployments_url":"https://api.github.com/repos/harshavardhana/minio/deployments","created_at":"2015-01-14T19:32:24Z","updated_at":"2015-11-03T05:50:43Z","pushed_at":"2016-07-27T10:11:15Z","git_url":"git://github.com/harshavardhana/minio.git","ssh_url":"git@github.com:harshavardhana/minio.git","clone_url":"https://github.com/harshavardhana/minio.git","svn_url":"https://github.com/harshavardhana/minio","homepage":"http://minio.io","size":15001,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"pr_out_minio_dl_minio_io_changes_do_not_merge_until_webcli"}},"base":{"label":"minio:master","ref":"master","sha":"77248bd6e8a50d8f0d88f95d5ed9624e2aad6585","user":{"login":"minio","id":695951,"avatar_url":"https://avatars.githubusercontent.com/u/695951?v=3","gravatar_id":"","url":"https://api.github.com/users/minio","html_url":"https://github.com/minio","followers_url":"https://api.github.com/users/minio/followers","following_url":"https://api.github.com/users/minio/following{/other_user}","gists_url":"https://api.github.com/users/minio/gists{/gist_id}","starred_url":"https://api.github.com/users/minio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minio/subscriptions","organizations_url":"https://api.github.com/users/minio/orgs","repos_url":"https://api.github.com/users/minio/repos","events_url":"https://api.github.com/users/minio/events{/privacy}","received_events_url":"https://api.github.com/users/minio/received_events","type":"Organization","site_admin":false},"repo":{"id":29261473,"name":"minio","full_name":"minio/minio","owner":{"login":"minio","id":695951,"avatar_url":"https://avatars.githubusercontent.com/u/695951?v=3","gravatar_id":"","url":"https://api.github.com/users/minio","html_url":"https://github.com/minio","followers_url":"https://api.github.com/users/minio/followers","following_url":"https://api.github.com/users/minio/following{/other_user}","gists_url":"https://api.github.com/users/minio/gists{/gist_id}","starred_url":"https://api.github.com/users/minio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minio/subscriptions","organizations_url":"https://api.github.com/users/minio/orgs","repos_url":"https://api.github.com/users/minio/repos","events_url":"https://api.github.com/users/minio/events{/privacy}","received_events_url":"https://api.github.com/users/minio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/minio/minio","description":"Minio is an object storage server compatible with Amazon S3 and licensed under Apache 2.0 License","fork":false,"url":"https://api.github.com/repos/minio/minio","forks_url":"https://api.github.com/repos/minio/minio/forks","keys_url":"https://api.github.com/repos/minio/minio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/minio/minio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/minio/minio/teams","hooks_url":"https://api.github.com/repos/minio/minio/hooks","issue_events_url":"https://api.github.com/repos/minio/minio/issues/events{/number}","events_url":"https://api.github.com/repos/minio/minio/events","assignees_url":"https://api.github.com/repos/minio/minio/assignees{/user}","branches_url":"https://api.github.com/repos/minio/minio/branches{/branch}","tags_url":"https://api.github.com/repos/minio/minio/tags","blobs_url":"https://api.github.com/repos/minio/minio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/minio/minio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/minio/minio/git/refs{/sha}","trees_url":"https://api.github.com/repos/minio/minio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/minio/minio/statuses/{sha}","languages_url":"https://api.github.com/repos/minio/minio/languages","stargazers_url":"https://api.github.com/repos/minio/minio/stargazers","contributors_url":"https://api.github.com/repos/minio/minio/contributors","subscribers_url":"https://api.github.com/repos/minio/minio/subscribers","subscription_url":"https://api.github.com/repos/minio/minio/subscription","commits_url":"https://api.github.com/repos/minio/minio/commits{/sha}","git_commits_url":"https://api.github.com/repos/minio/minio/git/commits{/sha}","comments_url":"https://api.github.com/repos/minio/minio/comments{/number}","issue_comment_url":"https://api.github.com/repos/minio/minio/issues/comments{/number}","contents_url":"https://api.github.com/repos/minio/minio/contents/{+path}","compare_url":"https://api.github.com/repos/minio/minio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/minio/minio/merges","archive_url":"https://api.github.com/repos/minio/minio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/minio/minio/downloads","issues_url":"https://api.github.com/repos/minio/minio/issues{/number}","pulls_url":"https://api.github.com/repos/minio/minio/pulls{/number}","milestones_url":"https://api.github.com/repos/minio/minio/milestones{/number}","notifications_url":"https://api.github.com/repos/minio/minio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/minio/minio/labels{/name}","releases_url":"https://api.github.com/repos/minio/minio/releases{/id}","deployments_url":"https://api.github.com/repos/minio/minio/deployments","created_at":"2015-01-14T19:23:58Z","updated_at":"2016-07-27T10:13:03Z","pushed_at":"2016-07-27T10:11:16Z","git_url":"git://github.com/minio/minio.git","ssh_url":"git@github.com:minio/minio.git","clone_url":"https://github.com/minio/minio.git","svn_url":"https://github.com/minio/minio","homepage":"https://minio.io/downloads/","size":16392,"stargazers_count":1840,"watchers_count":1840,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":158,"mirror_url":null,"open_issues_count":45,"forks":158,"open_issues":45,"watchers":1840,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/minio/minio/pulls/2299"},"html":{"href":"https://github.com/minio/minio/pull/2299"},"issue":{"href":"https://api.github.com/repos/minio/minio/issues/2299"},"comments":{"href":"https://api.github.com/repos/minio/minio/issues/2299/comments"},"review_comments":{"href":"https://api.github.com/repos/minio/minio/pulls/2299/comments"},"review_comment":{"href":"https://api.github.com/repos/minio/minio/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/minio/minio/pulls/2299/commits"},"statuses":{"href":"https://api.github.com/repos/minio/minio/statuses/17d039a5ca81815022943a7b5586d53e844a6539"}}}}
{"actor":{"display_login":"krishnasrinivas"}}