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

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

 



On Fri, 12 Jun 2009 11:35:49 +0900
FUJITA Tomonori <fujita.tomonori@xxxxxxxxxxxxx> wrote:

> On Tue, 09 Jun 2009 18:21:59 +0200
> Arne Redlich <arne.redlich@xxxxxxxxxxxxxx> wrote:
> 
> > If sending the iSCSI task to the TGT core fails, the task is leaked.
> > 
> > Signed-off-by: Arne Redlich <arne.redlich@xxxxxxxxxxxxxx>
> > ---
> >  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@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