Reply with LUN busy when there is a read/write error from backend

Signed-off-by: Utkarsh Mani Tripathi <utkarsh.tripathi@mayadata.io>
This commit is contained in:
Utkarsh Mani Tripathi
2019-11-18 16:30:46 +05:30
parent a8cc3e6db2
commit 3b8e996a6c
2 changed files with 5 additions and 3 deletions
+3 -1
View File
@@ -459,7 +459,9 @@ func SBCReadWrite(host int, cmd *api.SCSICommand) api.SAMStat {
err, key, asc = bsPerformCommand(dev.Storage, cmd)
if err != nil {
goto sense
log.Errorf("Error from backend: %v", err)
BuildSenseData(cmd, key, asc)
return api.SAMStatBusy
} else {
return api.SAMStatGood
}