[stgt] [PATCH 1/2] Fix buffer_offset set to 0 in the last Data-IN carrying status

Alexander Nezhinsky nezhinsky at gmail.com
Sat Jun 1 16:54:08 CEST 2013


On Sat, Jun 1, 2013 at 4:59 PM, FUJITA Tomonori
<fujita.tomonori at lab.ntt.co.jp> wrote:
>
> Thanks so much for working on this bug!
>
> On Fri, 31 May 2013 01:19:45 +0300
> nezhinsky at gmail.com wrote:
>
> > From: Alexander Nezhinsky <nezhinsky at gmail.com>
> >
> > @@ -1128,8 +1143,7 @@ static int iscsi_data_rsp_build(struct iscsi_task *task)
> >                       rsp->flags |= ISCSI_FLAG_DATA_STATUS;
> >                       rsp->cmd_status = result;
> >                       rsp->statsn = cpu_to_be32(conn->stat_sn++);
> > -                     iscsi_rsp_set_residual((struct iscsi_cmd_rsp *) rsp,
> > -                                            &task->scmd);
> > +                     iscsi_set_data_rsp_residual(rsp, &task->scmd);
>
> Hmm, currently, iscsi_rsp_set_residual() leads to:
>
> iscsi_rsp_set_resid(rsp, scsi_get_in_resid(scmd))
>

That's right, but the idea of this fix is that
iscsi_data_rsp_build() calls iscsi_set_data_rsp_residual()
which accepts "struct iscsi_data_rsp *data_in" and not
"struct iscsi_cmd_rsp *", so that data-in with status gets handles by
a specialized function,
so that buffer_offset is set correctly.
--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html



More information about the stgt mailing list