{"action":"created","comment":{"url":"https://api.github.com/repos/spdk/spdk/pulls/comments/85433424","pull_request_review_id":6151499,"id":85433424,"diff_hunk":"@@ -451,6 +458,37 @@ inquiry_overflow_test(void)\n \t}\n }\n \n+/*\n+ * This test is to verify specific error translation from bdev to scsi.\n+ */\n+static void\n+task_complete_test(void)\n+{\n+\tstruct spdk_event event;\n+\tstruct spdk_scsi_task task = {};\n+\tstruct spdk_bdev_io bdev_io = {};\n+\tstruct spdk_scsi_lun lun;\n+\n+\tTAILQ_INIT(&lun.tasks);\n+\tTAILQ_INSERT_TAIL(&lun.tasks, &task, scsi_link);\n+\ttask.lun = &lun;\n+\n+\tevent.arg1 = &task;\n+\tevent.arg2 = &bdev_io;\n+\n+\ttask.type = SPDK_SCSI_TASK_TYPE_CMD;\n+\tbdev_io.status = SPDK_BDEV_IO_STATUS_SUCCESS;\n+\tspdk_bdev_scsi_task_complete(&event);\n+\tCU_ASSERT_EQUAL(task.status, SPDK_SCSI_STATUS_GOOD);\n+\n+\tbdev_io.status = SPDK_BDEV_IO_STATUS_FAILED;\n+\tspdk_bdev_scsi_task_complete(&event);\n+\tCU_ASSERT_EQUAL(task.status, SPDK_SCSI_STATUS_CHECK_CONDITION);\n+\tCU_ASSERT_EQUAL(task.sense_data[4], (SPDK_SCSI_SENSE_ABORTED_COMMAND & 0xf));\n+\tCU_ASSERT_EQUAL(task.sense_data[14], SPDK_SCSI_ASC_NO_ADDITIONAL_SENSE);\n+\tCU_ASSERT_EQUAL(task.sense_data[15], SPDK_SCSI_ASCQ_CAUSE_NOT_REPORTABLE);","path":"test/lib/scsi/scsi_bdev/scsi_bdev_ut.c","position":59,"original_position":59,"commit_id":"af244167943b5e819117bece47dba6bb63f0911f","original_commit_id":"af244167943b5e819117bece47dba6bb63f0911f","user":{"login":"dverkamp-intel","id":12633103,"avatar_url":"https://avatars.githubusercontent.com/u/12633103?v=3","gravatar_id":"","url":"https://api.github.com/users/dverkamp-intel","html_url":"https://github.com/dverkamp-intel","followers_url":"https://api.github.com/users/dverkamp-intel/followers","following_url":"https://api.github.com/users/dverkamp-intel/following{/other_user}","gists_url":"https://api.github.com/users/dverkamp-intel/gists{/gist_id}","starred_url":"https://api.github.com/users/dverkamp-intel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dverkamp-intel/subscriptions","organizations_url":"https://api.github.com/users/dverkamp-intel/orgs","repos_url":"https://api.github.com/users/dverkamp-intel/repos","events_url":"https://api.github.com/users/dverkamp-intel/events{/privacy}","received_events_url":"https://api.github.com/users/dverkamp-intel/received_events","type":"User","site_admin":false},"body":"After reviewing how we use the sense_data array, I suppose the offsets are actually correct - the iSCSI-specific SenseLength is stored in the first two bytes, so all of the offsets are adjusted + 2.\r\n\r\nThe & 0xf comment still applies, though.","created_at":"2016-10-27T21:40:13Z","updated_at":"2016-10-27T21:40:13Z","html_url":"https://github.com/spdk/spdk/pull/54#discussion_r85433424","pull_request_url":"https://api.github.com/repos/spdk/spdk/pulls/54","_links":{"self":{"href":"https://api.github.com/repos/spdk/spdk/pulls/comments/85433424"},"html":{"href":"https://github.com/spdk/spdk/pull/54#discussion_r85433424"},"pull_request":{"href":"https://api.github.com/repos/spdk/spdk/pulls/54"}}},"pull_request":{"url":"https://api.github.com/repos/spdk/spdk/pulls/54","id":90844820,"html_url":"https://github.com/spdk/spdk/pull/54","diff_url":"https://github.com/spdk/spdk/pull/54.diff","patch_url":"https://github.com/spdk/spdk/pull/54.patch","issue_url":"https://api.github.com/repos/spdk/spdk/issues/54","number":54,"state":"open","locked":false,"title":"scsi: translate nvme error to scsi error","user":{"login":"uchida2016","id":18077778,"avatar_url":"https://avatars.githubusercontent.com/u/18077778?v=3","gravatar_id":"","url":"https://api.github.com/users/uchida2016","html_url":"https://github.com/uchida2016","followers_url":"https://api.github.com/users/uchida2016/followers","following_url":"https://api.github.com/users/uchida2016/following{/other_user}","gists_url":"https://api.github.com/users/uchida2016/gists{/gist_id}","starred_url":"https://api.github.com/users/uchida2016/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uchida2016/subscriptions","organizations_url":"https://api.github.com/users/uchida2016/orgs","repos_url":"https://api.github.com/users/uchida2016/repos","events_url":"https://api.github.com/users/uchida2016/events{/privacy}","received_events_url":"https://api.github.com/users/uchida2016/received_events","type":"User","site_admin":false},"body":"This patch translates NVMe status code to SCSI sense according to NVM\r\nExpress: SCSI Translation Reference.\r\n\r\nhttp://nvmexpress.org/wp-content/uploads/NVM_Express_-_SCSI_Translation_Reference-1_5_20150624_Gold.pdf\r\n\r\nI rebased onto the latest and created a new pull request. (The original PR is #38.)","created_at":"2016-10-25T16:34:28Z","updated_at":"2016-10-27T21:40:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f4af7d4eb85560ab5bd07d42132e4ab96829ab41","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/spdk/spdk/pulls/54/commits","review_comments_url":"https://api.github.com/repos/spdk/spdk/pulls/54/comments","review_comment_url":"https://api.github.com/repos/spdk/spdk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/spdk/spdk/issues/54/comments","statuses_url":"https://api.github.com/repos/spdk/spdk/statuses/af244167943b5e819117bece47dba6bb63f0911f","head":{"label":"uchida2016:nvme_scsi_translation","ref":"nvme_scsi_translation","sha":"af244167943b5e819117bece47dba6bb63f0911f","user":{"login":"uchida2016","id":18077778,"avatar_url":"https://avatars.githubusercontent.com/u/18077778?v=3","gravatar_id":"","url":"https://api.github.com/users/uchida2016","html_url":"https://github.com/uchida2016","followers_url":"https://api.github.com/users/uchida2016/followers","following_url":"https://api.github.com/users/uchida2016/following{/other_user}","gists_url":"https://api.github.com/users/uchida2016/gists{/gist_id}","starred_url":"https://api.github.com/users/uchida2016/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uchida2016/subscriptions","organizations_url":"https://api.github.com/users/uchida2016/orgs","repos_url":"https://api.github.com/users/uchida2016/repos","events_url":"https://api.github.com/users/uchida2016/events{/privacy}","received_events_url":"https://api.github.com/users/uchida2016/received_events","type":"User","site_admin":false},"repo":{"id":58509060,"name":"spdk","full_name":"uchida2016/spdk","owner":{"login":"uchida2016","id":18077778,"avatar_url":"https://avatars.githubusercontent.com/u/18077778?v=3","gravatar_id":"","url":"https://api.github.com/users/uchida2016","html_url":"https://github.com/uchida2016","followers_url":"https://api.github.com/users/uchida2016/followers","following_url":"https://api.github.com/users/uchida2016/following{/other_user}","gists_url":"https://api.github.com/users/uchida2016/gists{/gist_id}","starred_url":"https://api.github.com/users/uchida2016/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uchida2016/subscriptions","organizations_url":"https://api.github.com/users/uchida2016/orgs","repos_url":"https://api.github.com/users/uchida2016/repos","events_url":"https://api.github.com/users/uchida2016/events{/privacy}","received_events_url":"https://api.github.com/users/uchida2016/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/uchida2016/spdk","description":"Storage Performance Development Kit - http://spdk.io","fork":true,"url":"https://api.github.com/repos/uchida2016/spdk","forks_url":"https://api.github.com/repos/uchida2016/spdk/forks","keys_url":"https://api.github.com/repos/uchida2016/spdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uchida2016/spdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uchida2016/spdk/teams","hooks_url":"https://api.github.com/repos/uchida2016/spdk/hooks","issue_events_url":"https://api.github.com/repos/uchida2016/spdk/issues/events{/number}","events_url":"https://api.github.com/repos/uchida2016/spdk/events","assignees_url":"https://api.github.com/repos/uchida2016/spdk/assignees{/user}","branches_url":"https://api.github.com/repos/uchida2016/spdk/branches{/branch}","tags_url":"https://api.github.com/repos/uchida2016/spdk/tags","blobs_url":"https://api.github.com/repos/uchida2016/spdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uchida2016/spdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uchida2016/spdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/uchida2016/spdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uchida2016/spdk/statuses/{sha}","languages_url":"https://api.github.com/repos/uchida2016/spdk/languages","stargazers_url":"https://api.github.com/repos/uchida2016/spdk/stargazers","contributors_url":"https://api.github.com/repos/uchida2016/spdk/contributors","subscribers_url":"https://api.github.com/repos/uchida2016/spdk/subscribers","subscription_url":"https://api.github.com/repos/uchida2016/spdk/subscription","commits_url":"https://api.github.com/repos/uchida2016/spdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/uchida2016/spdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/uchida2016/spdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/uchida2016/spdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/uchida2016/spdk/contents/{+path}","compare_url":"https://api.github.com/repos/uchida2016/spdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uchida2016/spdk/merges","archive_url":"https://api.github.com/repos/uchida2016/spdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uchida2016/spdk/downloads","issues_url":"https://api.github.com/repos/uchida2016/spdk/issues{/number}","pulls_url":"https://api.github.com/repos/uchida2016/spdk/pulls{/number}","milestones_url":"https://api.github.com/repos/uchida2016/spdk/milestones{/number}","notifications_url":"https://api.github.com/repos/uchida2016/spdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uchida2016/spdk/labels{/name}","releases_url":"https://api.github.com/repos/uchida2016/spdk/releases{/id}","deployments_url":"https://api.github.com/repos/uchida2016/spdk/deployments","created_at":"2016-05-11T02:47:16Z","updated_at":"2016-05-11T02:47:16Z","pushed_at":"2016-10-25T23:48:48Z","git_url":"git://github.com/uchida2016/spdk.git","ssh_url":"git@github.com:uchida2016/spdk.git","clone_url":"https://github.com/uchida2016/spdk.git","svn_url":"https://github.com/uchida2016/spdk","homepage":"","size":5065,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"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":"spdk:master","ref":"master","sha":"8bf37ee7696ca8ca26d230f9f9ff638df26005f5","user":{"login":"spdk","id":13323228,"avatar_url":"https://avatars.githubusercontent.com/u/13323228?v=3","gravatar_id":"","url":"https://api.github.com/users/spdk","html_url":"https://github.com/spdk","followers_url":"https://api.github.com/users/spdk/followers","following_url":"https://api.github.com/users/spdk/following{/other_user}","gists_url":"https://api.github.com/users/spdk/gists{/gist_id}","starred_url":"https://api.github.com/users/spdk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spdk/subscriptions","organizations_url":"https://api.github.com/users/spdk/orgs","repos_url":"https://api.github.com/users/spdk/repos","events_url":"https://api.github.com/users/spdk/events{/privacy}","received_events_url":"https://api.github.com/users/spdk/received_events","type":"Organization","site_admin":false},"repo":{"id":39042157,"name":"spdk","full_name":"spdk/spdk","owner":{"login":"spdk","id":13323228,"avatar_url":"https://avatars.githubusercontent.com/u/13323228?v=3","gravatar_id":"","url":"https://api.github.com/users/spdk","html_url":"https://github.com/spdk","followers_url":"https://api.github.com/users/spdk/followers","following_url":"https://api.github.com/users/spdk/following{/other_user}","gists_url":"https://api.github.com/users/spdk/gists{/gist_id}","starred_url":"https://api.github.com/users/spdk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spdk/subscriptions","organizations_url":"https://api.github.com/users/spdk/orgs","repos_url":"https://api.github.com/users/spdk/repos","events_url":"https://api.github.com/users/spdk/events{/privacy}","received_events_url":"https://api.github.com/users/spdk/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/spdk/spdk","description":"Storage Performance Development Kit - http://spdk.io","fork":false,"url":"https://api.github.com/repos/spdk/spdk","forks_url":"https://api.github.com/repos/spdk/spdk/forks","keys_url":"https://api.github.com/repos/spdk/spdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spdk/spdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spdk/spdk/teams","hooks_url":"https://api.github.com/repos/spdk/spdk/hooks","issue_events_url":"https://api.github.com/repos/spdk/spdk/issues/events{/number}","events_url":"https://api.github.com/repos/spdk/spdk/events","assignees_url":"https://api.github.com/repos/spdk/spdk/assignees{/user}","branches_url":"https://api.github.com/repos/spdk/spdk/branches{/branch}","tags_url":"https://api.github.com/repos/spdk/spdk/tags","blobs_url":"https://api.github.com/repos/spdk/spdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spdk/spdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spdk/spdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/spdk/spdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spdk/spdk/statuses/{sha}","languages_url":"https://api.github.com/repos/spdk/spdk/languages","stargazers_url":"https://api.github.com/repos/spdk/spdk/stargazers","contributors_url":"https://api.github.com/repos/spdk/spdk/contributors","subscribers_url":"https://api.github.com/repos/spdk/spdk/subscribers","subscription_url":"https://api.github.com/repos/spdk/spdk/subscription","commits_url":"https://api.github.com/repos/spdk/spdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/spdk/spdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/spdk/spdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/spdk/spdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/spdk/spdk/contents/{+path}","compare_url":"https://api.github.com/repos/spdk/spdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spdk/spdk/merges","archive_url":"https://api.github.com/repos/spdk/spdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spdk/spdk/downloads","issues_url":"https://api.github.com/repos/spdk/spdk/issues{/number}","pulls_url":"https://api.github.com/repos/spdk/spdk/pulls{/number}","milestones_url":"https://api.github.com/repos/spdk/spdk/milestones{/number}","notifications_url":"https://api.github.com/repos/spdk/spdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spdk/spdk/labels{/name}","releases_url":"https://api.github.com/repos/spdk/spdk/releases{/id}","deployments_url":"https://api.github.com/repos/spdk/spdk/deployments","created_at":"2015-07-13T23:15:15Z","updated_at":"2016-10-27T07:29:11Z","pushed_at":"2016-10-27T20:37:14Z","git_url":"git://github.com/spdk/spdk.git","ssh_url":"git@github.com:spdk/spdk.git","clone_url":"https://github.com/spdk/spdk.git","svn_url":"https://github.com/spdk/spdk","homepage":"","size":7069,"stargazers_count":350,"watchers_count":350,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":110,"mirror_url":null,"open_issues_count":11,"forks":110,"open_issues":11,"watchers":350,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/spdk/spdk/pulls/54"},"html":{"href":"https://github.com/spdk/spdk/pull/54"},"issue":{"href":"https://api.github.com/repos/spdk/spdk/issues/54"},"comments":{"href":"https://api.github.com/repos/spdk/spdk/issues/54/comments"},"review_comments":{"href":"https://api.github.com/repos/spdk/spdk/pulls/54/comments"},"review_comment":{"href":"https://api.github.com/repos/spdk/spdk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/spdk/spdk/pulls/54/commits"},"statuses":{"href":"https://api.github.com/repos/spdk/spdk/statuses/af244167943b5e819117bece47dba6bb63f0911f"}}}}
{"actor":{"display_login":"dverkamp-intel"}}