[PATCH] bs_sheepdog.c: fix error handling issue in bs_sheepdog_request()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



bs_sheepdog_request function, the request handler of sheepdog driver,
doesn't set scsi status code if the driver failed to create writable
VDI from snapshot.

In that case, CHECK_CONDITION result code should be set to cmd->result
through scsi_set_result() macro.  This fix corrects the error
handling issue.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@xxxxxxxxxxxxx>
---
 usr/bs_sheepdog.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/usr/bs_sheepdog.c b/usr/bs_sheepdog.c
index 7341708..1dda915 100644
--- a/usr/bs_sheepdog.c
+++ b/usr/bs_sheepdog.c
@@ -1184,7 +1184,7 @@ static void bs_sheepdog_request(struct scsi_cmd *cmd)
 					" snapshot failed\n");
 				set_medium_error(&result, &key, &asc);
 
-				return;
+				break;
 			}
 			ai->is_snapshot = 0;
 		}
-- 
1.7.9.3

--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux