提交 7c66e9a5 编写于 作者: J Joseph Gruher 提交者: James Bottomley

[SCSI] scsi_dh_alua: fix submit_stpg return

submit_stpg() will always return failure so alua_activate() will report
failure via dm-multipath callback function.  Even though the stpg fired
successfuly dm-multipath does not know and always fails to change the
valid path.

By returning SCSI_DH_OK we're now skipping alua_activate()'s call to
activate_complete 'fn'.  But this is fine because stpg_endio() will call
it via h->callback_fn().
Signed-off-by: NJoseph Gruher <joseph.r.gruher@intel.com>
Signed-off-by: NIlgu Hong <ilgu.hong@promise.com>
Signed-off-by: NMike Snitzer <snitzer@redhat.com>
Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
上级 aa023b8b
......@@ -303,7 +303,6 @@ static void stpg_endio(struct request *req, int error)
static unsigned submit_stpg(struct alua_dh_data *h)
{
struct request *rq;
int err = SCSI_DH_RES_TEMP_UNAVAIL;
int stpg_len = 8;
struct scsi_device *sdev = h->sdev;
......@@ -332,7 +331,7 @@ static unsigned submit_stpg(struct alua_dh_data *h)
rq->end_io_data = h;
blk_execute_rq_nowait(rq->q, NULL, rq, 1, stpg_endio);
return err;
return SCSI_DH_OK;
}
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册