[stgt] [PATCH 03/15] Fix commit "iscsi: handle commands waiting for I/O completion properly"

FUJITA Tomonori fujita.tomonori at lab.ntt.co.jp
Fri Jun 12 04:44:48 CEST 2009


On Fri, 12 Jun 2009 11:35:49 +0900
FUJITA Tomonori <fujita.tomonori at lab.ntt.co.jp> wrote:

> On Tue, 09 Jun 2009 18:21:59 +0200
> Arne Redlich <arne.redlich at googlemail.com> wrote:
> 
> > If sending the iSCSI task to the TGT core fails, the task is leaked.
> > 
> > Signed-off-by: Arne Redlich <arne.redlich at googlemail.com>
> > ---
> >  usr/iscsi/iscsid.c |    7 ++++++-
> >  1 files changed, 6 insertions(+), 1 deletions(-)
> > 
> > diff --git a/usr/iscsi/iscsid.c b/usr/iscsi/iscsid.c
> > index 41e34de..bfc41eb 100644
> > --- a/usr/iscsi/iscsid.c
> > +++ b/usr/iscsi/iscsid.c
> > @@ -1162,6 +1162,7 @@ static int iscsi_target_cmd_queue(struct iscsi_task *task)
> >  	uint32_t data_len;
> >  	uint8_t *ahs;
> >  	int ahslen;
> > +	int err;
> >  	enum data_direction dir = scsi_get_data_dir(scmd);
> >  
> >  	scmd->cmd_itn_id = conn->session->tsih;
> > @@ -1238,7 +1239,11 @@ static int iscsi_target_cmd_queue(struct iscsi_task *task)
> >  	scmd->tag = req->itt;
> >  	set_task_in_scsi(task);
> >  
> > -	return target_cmd_queue(conn->session->target->tid, scmd);
> > +	err = target_cmd_queue(conn->session->target->tid, scmd);
> > +	if (err)
> > +		clear_task_in_scsi(task);
> > +
> > +	return err;
> >  }
> 
> Merged, thanks a lot!
> 
> We still need to send a proper response wrt this...

Tomasz, this might fix the problem that you hit (I already merged this
patch).
--
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