{"action":"created","comment":{"url":"https://api.github.com/repos/open-iscsi/tcmu-runner/pulls/comments/128670285","pull_request_review_id":51372592,"id":128670285,"diff_hunk":"@@ -1670,13 +1670,68 @@ static int fbo_handle_cmd(struct tcmu_device *dev, struct tcmulib_cmd *cmd)\n \treturn 0;\n }\n \n+static int fbo_update_cfgstring(struct tcmu_device *dev,\n+\t\t\t\tstruct tcmulib_cfg_info *cfg)\n+{\n+\tchar *oldptr;\n+\tint ret;\n+\n+\tif (!tcmu_check_state(dev, TCMU_DEV_STATE_CAPACITY_CHANGE_FOR_CONFIG_CHANGE)) {\n+\t\ttcmu_dev_err(dev, \"You need to include size change to be able to change dev_config\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\ttcmu_remove_state(dev, TCMU_DEV_STATE_CAPACITY_CHANGE_FOR_CONFIG_CHANGE);\n+\n+\ttcmu_update_state(dev, TCMU_DEV_STATE_CONFIG_CHANGING);\n+\n+\tfbo_close(dev);\n+\n+\toldptr = cfg->data.dev_cfgstring;\n+\ttcmu_set_dev_cfgstring(dev, oldptr);\n+\n+\tret = fbo_open(dev);\n+\tif (ret != 0) {\n+\t\ttcmu_dev_err(dev, \"Failed opening of new media\\n\");\n+\t\tgoto fail_open;\n+\t}\n+\n+\ttcmu_remove_state(dev, TCMU_DEV_STATE_CONFIG_CHANGING);","path":"file_optical.c","position":29,"original_position":29,"commit_id":"bee657b07047031fba6ee86b4404cb245656ba88","original_commit_id":"bee657b07047031fba6ee86b4404cb245656ba88","user":{"login":"mikechristie","id":1063316,"avatar_url":"https://avatars2.githubusercontent.com/u/1063316?v=4","gravatar_id":"","url":"https://api.github.com/users/mikechristie","html_url":"https://github.com/mikechristie","followers_url":"https://api.github.com/users/mikechristie/followers","following_url":"https://api.github.com/users/mikechristie/following{/other_user}","gists_url":"https://api.github.com/users/mikechristie/gists{/gist_id}","starred_url":"https://api.github.com/users/mikechristie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikechristie/subscriptions","organizations_url":"https://api.github.com/users/mikechristie/orgs","repos_url":"https://api.github.com/users/mikechristie/repos","events_url":"https://api.github.com/users/mikechristie/events{/privacy}","received_events_url":"https://api.github.com/users/mikechristie/received_events","type":"User","site_admin":false},"body":"Between these 2 state changes is there a race? It seems like a command could be executed at the time and would not get the UA right?","created_at":"2017-07-21T02:05:44Z","updated_at":"2017-07-21T02:05:44Z","html_url":"https://github.com/open-iscsi/tcmu-runner/pull/189#discussion_r128670285","pull_request_url":"https://api.github.com/repos/open-iscsi/tcmu-runner/pulls/189","_links":{"self":{"href":"https://api.github.com/repos/open-iscsi/tcmu-runner/pulls/comments/128670285"},"html":{"href":"https://github.com/open-iscsi/tcmu-runner/pull/189#discussion_r128670285"},"pull_request":{"href":"https://api.github.com/repos/open-iscsi/tcmu-runner/pulls/189"}}},"pull_request":{"url":"https://api.github.com/repos/open-iscsi/tcmu-runner/pulls/189","id":129698186,"html_url":"https://github.com/open-iscsi/tcmu-runner/pull/189","diff_url":"https://github.com/open-iscsi/tcmu-runner/pull/189.diff","patch_url":"https://github.com/open-iscsi/tcmu-runner/pull/189.patch","issue_url":"https://api.github.com/repos/open-iscsi/tcmu-runner/issues/189","number":189,"state":"open","locked":false,"title":"Fbo media change","user":{"login":"bgly","id":16929604,"avatar_url":"https://avatars1.githubusercontent.com/u/16929604?v=4","gravatar_id":"","url":"https://api.github.com/users/bgly","html_url":"https://github.com/bgly","followers_url":"https://api.github.com/users/bgly/followers","following_url":"https://api.github.com/users/bgly/following{/other_user}","gists_url":"https://api.github.com/users/bgly/gists{/gist_id}","starred_url":"https://api.github.com/users/bgly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgly/subscriptions","organizations_url":"https://api.github.com/users/bgly/orgs","repos_url":"https://api.github.com/users/bgly/repos","events_url":"https://api.github.com/users/bgly/events{/privacy}","received_events_url":"https://api.github.com/users/bgly/received_events","type":"User","site_admin":false},"body":"To change dev_config run:\r\n\r\nset attribute dev_size=661370880 dev_config=fbo//home/neo/ubuntu-16.10-server-ppc64el1.iso","created_at":"2017-07-10T14:48:57Z","updated_at":"2017-07-21T02:05:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dfc9d6df5e7ceab7f523c339b3b6cf114d053dd2","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/open-iscsi/tcmu-runner/pulls/189/commits","review_comments_url":"https://api.github.com/repos/open-iscsi/tcmu-runner/pulls/189/comments","review_comment_url":"https://api.github.com/repos/open-iscsi/tcmu-runner/pulls/comments{/number}","comments_url":"https://api.github.com/repos/open-iscsi/tcmu-runner/issues/189/comments","statuses_url":"https://api.github.com/repos/open-iscsi/tcmu-runner/statuses/bee657b07047031fba6ee86b4404cb245656ba88","head":{"label":"bgly:fbo_media_change","ref":"fbo_media_change","sha":"bee657b07047031fba6ee86b4404cb245656ba88","user":{"login":"bgly","id":16929604,"avatar_url":"https://avatars1.githubusercontent.com/u/16929604?v=4","gravatar_id":"","url":"https://api.github.com/users/bgly","html_url":"https://github.com/bgly","followers_url":"https://api.github.com/users/bgly/followers","following_url":"https://api.github.com/users/bgly/following{/other_user}","gists_url":"https://api.github.com/users/bgly/gists{/gist_id}","starred_url":"https://api.github.com/users/bgly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgly/subscriptions","organizations_url":"https://api.github.com/users/bgly/orgs","repos_url":"https://api.github.com/users/bgly/repos","events_url":"https://api.github.com/users/bgly/events{/privacy}","received_events_url":"https://api.github.com/users/bgly/received_events","type":"User","site_admin":false},"repo":{"id":73303279,"name":"tcmu-runner-1","full_name":"bgly/tcmu-runner-1","owner":{"login":"bgly","id":16929604,"avatar_url":"https://avatars1.githubusercontent.com/u/16929604?v=4","gravatar_id":"","url":"https://api.github.com/users/bgly","html_url":"https://github.com/bgly","followers_url":"https://api.github.com/users/bgly/followers","following_url":"https://api.github.com/users/bgly/following{/other_user}","gists_url":"https://api.github.com/users/bgly/gists{/gist_id}","starred_url":"https://api.github.com/users/bgly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgly/subscriptions","organizations_url":"https://api.github.com/users/bgly/orgs","repos_url":"https://api.github.com/users/bgly/repos","events_url":"https://api.github.com/users/bgly/events{/privacy}","received_events_url":"https://api.github.com/users/bgly/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bgly/tcmu-runner-1","description":"A daemon that handles the userspace side of the LIO TCM-User backstore.","fork":true,"url":"https://api.github.com/repos/bgly/tcmu-runner-1","forks_url":"https://api.github.com/repos/bgly/tcmu-runner-1/forks","keys_url":"https://api.github.com/repos/bgly/tcmu-runner-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bgly/tcmu-runner-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bgly/tcmu-runner-1/teams","hooks_url":"https://api.github.com/repos/bgly/tcmu-runner-1/hooks","issue_events_url":"https://api.github.com/repos/bgly/tcmu-runner-1/issues/events{/number}","events_url":"https://api.github.com/repos/bgly/tcmu-runner-1/events","assignees_url":"https://api.github.com/repos/bgly/tcmu-runner-1/assignees{/user}","branches_url":"https://api.github.com/repos/bgly/tcmu-runner-1/branches{/branch}","tags_url":"https://api.github.com/repos/bgly/tcmu-runner-1/tags","blobs_url":"https://api.github.com/repos/bgly/tcmu-runner-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bgly/tcmu-runner-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bgly/tcmu-runner-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/bgly/tcmu-runner-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bgly/tcmu-runner-1/statuses/{sha}","languages_url":"https://api.github.com/repos/bgly/tcmu-runner-1/languages","stargazers_url":"https://api.github.com/repos/bgly/tcmu-runner-1/stargazers","contributors_url":"https://api.github.com/repos/bgly/tcmu-runner-1/contributors","subscribers_url":"https://api.github.com/repos/bgly/tcmu-runner-1/subscribers","subscription_url":"https://api.github.com/repos/bgly/tcmu-runner-1/subscription","commits_url":"https://api.github.com/repos/bgly/tcmu-runner-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/bgly/tcmu-runner-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/bgly/tcmu-runner-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/bgly/tcmu-runner-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/bgly/tcmu-runner-1/contents/{+path}","compare_url":"https://api.github.com/repos/bgly/tcmu-runner-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bgly/tcmu-runner-1/merges","archive_url":"https://api.github.com/repos/bgly/tcmu-runner-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bgly/tcmu-runner-1/downloads","issues_url":"https://api.github.com/repos/bgly/tcmu-runner-1/issues{/number}","pulls_url":"https://api.github.com/repos/bgly/tcmu-runner-1/pulls{/number}","milestones_url":"https://api.github.com/repos/bgly/tcmu-runner-1/milestones{/number}","notifications_url":"https://api.github.com/repos/bgly/tcmu-runner-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bgly/tcmu-runner-1/labels{/name}","releases_url":"https://api.github.com/repos/bgly/tcmu-runner-1/releases{/id}","deployments_url":"https://api.github.com/repos/bgly/tcmu-runner-1/deployments","created_at":"2016-11-09T16:53:53Z","updated_at":"2016-11-09T16:53:54Z","pushed_at":"2017-07-14T13:36:12Z","git_url":"git://github.com/bgly/tcmu-runner-1.git","ssh_url":"git@github.com:bgly/tcmu-runner-1.git","clone_url":"https://github.com/bgly/tcmu-runner-1.git","svn_url":"https://github.com/bgly/tcmu-runner-1","homepage":null,"size":685,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"open-iscsi:master","ref":"master","sha":"b7079af55016933eab5db363bfa26207002e43ed","user":{"login":"open-iscsi","id":18598980,"avatar_url":"https://avatars2.githubusercontent.com/u/18598980?v=4","gravatar_id":"","url":"https://api.github.com/users/open-iscsi","html_url":"https://github.com/open-iscsi","followers_url":"https://api.github.com/users/open-iscsi/followers","following_url":"https://api.github.com/users/open-iscsi/following{/other_user}","gists_url":"https://api.github.com/users/open-iscsi/gists{/gist_id}","starred_url":"https://api.github.com/users/open-iscsi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/open-iscsi/subscriptions","organizations_url":"https://api.github.com/users/open-iscsi/orgs","repos_url":"https://api.github.com/users/open-iscsi/repos","events_url":"https://api.github.com/users/open-iscsi/events{/privacy}","received_events_url":"https://api.github.com/users/open-iscsi/received_events","type":"Organization","site_admin":false},"repo":{"id":21918673,"name":"tcmu-runner","full_name":"open-iscsi/tcmu-runner","owner":{"login":"open-iscsi","id":18598980,"avatar_url":"https://avatars2.githubusercontent.com/u/18598980?v=4","gravatar_id":"","url":"https://api.github.com/users/open-iscsi","html_url":"https://github.com/open-iscsi","followers_url":"https://api.github.com/users/open-iscsi/followers","following_url":"https://api.github.com/users/open-iscsi/following{/other_user}","gists_url":"https://api.github.com/users/open-iscsi/gists{/gist_id}","starred_url":"https://api.github.com/users/open-iscsi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/open-iscsi/subscriptions","organizations_url":"https://api.github.com/users/open-iscsi/orgs","repos_url":"https://api.github.com/users/open-iscsi/repos","events_url":"https://api.github.com/users/open-iscsi/events{/privacy}","received_events_url":"https://api.github.com/users/open-iscsi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/open-iscsi/tcmu-runner","description":"A daemon that handles the userspace side of the LIO TCM-User backstore.","fork":false,"url":"https://api.github.com/repos/open-iscsi/tcmu-runner","forks_url":"https://api.github.com/repos/open-iscsi/tcmu-runner/forks","keys_url":"https://api.github.com/repos/open-iscsi/tcmu-runner/keys{/key_id}","collaborators_url":"https://api.github.com/repos/open-iscsi/tcmu-runner/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/open-iscsi/tcmu-runner/teams","hooks_url":"https://api.github.com/repos/open-iscsi/tcmu-runner/hooks","issue_events_url":"https://api.github.com/repos/open-iscsi/tcmu-runner/issues/events{/number}","events_url":"https://api.github.com/repos/open-iscsi/tcmu-runner/events","assignees_url":"https://api.github.com/repos/open-iscsi/tcmu-runner/assignees{/user}","branches_url":"https://api.github.com/repos/open-iscsi/tcmu-runner/branches{/branch}","tags_url":"https://api.github.com/repos/open-iscsi/tcmu-runner/tags","blobs_url":"https://api.github.com/repos/open-iscsi/tcmu-runner/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/open-iscsi/tcmu-runner/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/open-iscsi/tcmu-runner/git/refs{/sha}","trees_url":"https://api.github.com/repos/open-iscsi/tcmu-runner/git/trees{/sha}","statuses_url":"https://api.github.com/repos/open-iscsi/tcmu-runner/statuses/{sha}","languages_url":"https://api.github.com/repos/open-iscsi/tcmu-runner/languages","stargazers_url":"https://api.github.com/repos/open-iscsi/tcmu-runner/stargazers","contributors_url":"https://api.github.com/repos/open-iscsi/tcmu-runner/contributors","subscribers_url":"https://api.github.com/repos/open-iscsi/tcmu-runner/subscribers","subscription_url":"https://api.github.com/repos/open-iscsi/tcmu-runner/subscription","commits_url":"https://api.github.com/repos/open-iscsi/tcmu-runner/commits{/sha}","git_commits_url":"https://api.github.com/repos/open-iscsi/tcmu-runner/git/commits{/sha}","comments_url":"https://api.github.com/repos/open-iscsi/tcmu-runner/comments{/number}","issue_comment_url":"https://api.github.com/repos/open-iscsi/tcmu-runner/issues/comments{/number}","contents_url":"https://api.github.com/repos/open-iscsi/tcmu-runner/contents/{+path}","compare_url":"https://api.github.com/repos/open-iscsi/tcmu-runner/compare/{base}...{head}","merges_url":"https://api.github.com/repos/open-iscsi/tcmu-runner/merges","archive_url":"https://api.github.com/repos/open-iscsi/tcmu-runner/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/open-iscsi/tcmu-runner/downloads","issues_url":"https://api.github.com/repos/open-iscsi/tcmu-runner/issues{/number}","pulls_url":"https://api.github.com/repos/open-iscsi/tcmu-runner/pulls{/number}","milestones_url":"https://api.github.com/repos/open-iscsi/tcmu-runner/milestones{/number}","notifications_url":"https://api.github.com/repos/open-iscsi/tcmu-runner/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/open-iscsi/tcmu-runner/labels{/name}","releases_url":"https://api.github.com/repos/open-iscsi/tcmu-runner/releases{/id}","deployments_url":"https://api.github.com/repos/open-iscsi/tcmu-runner/deployments","created_at":"2014-07-16T21:20:00Z","updated_at":"2017-06-16T09:27:50Z","pushed_at":"2017-07-21T01:59:17Z","git_url":"git://github.com/open-iscsi/tcmu-runner.git","ssh_url":"git@github.com:open-iscsi/tcmu-runner.git","clone_url":"https://github.com/open-iscsi/tcmu-runner.git","svn_url":"https://github.com/open-iscsi/tcmu-runner","homepage":null,"size":676,"stargazers_count":38,"watchers_count":38,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":53,"mirror_url":null,"open_issues_count":26,"forks":53,"open_issues":26,"watchers":38,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/open-iscsi/tcmu-runner/pulls/189"},"html":{"href":"https://github.com/open-iscsi/tcmu-runner/pull/189"},"issue":{"href":"https://api.github.com/repos/open-iscsi/tcmu-runner/issues/189"},"comments":{"href":"https://api.github.com/repos/open-iscsi/tcmu-runner/issues/189/comments"},"review_comments":{"href":"https://api.github.com/repos/open-iscsi/tcmu-runner/pulls/189/comments"},"review_comment":{"href":"https://api.github.com/repos/open-iscsi/tcmu-runner/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/open-iscsi/tcmu-runner/pulls/189/commits"},"statuses":{"href":"https://api.github.com/repos/open-iscsi/tcmu-runner/statuses/bee657b07047031fba6ee86b4404cb245656ba88"}}}}
{"actor":{"display_login":"mikechristie"}}