[stgt] can't force-remove targets
FUJITA Tomonori
fujita.tomonori at lab.ntt.co.jp
Tue May 19 01:58:57 CEST 2009
On Mon, 18 May 2009 17:15:25 +0200
Tomasz Chmielewski <mangoo at wpkg.org> wrote:
> FUJITA Tomonori schrieb:
> > On Wed, 06 May 2009 17:09:40 +0200
> > Tomasz Chmielewski <mangoo at wpkg.org> wrote:
> >
> >> Tomasz Chmielewski schrieb:
> >>> Tomasz Chmielewski schrieb:
> >>>> Sometimes (90% of cases), I can't force-remove targets (needed i.e.
> >>>> when I want to update tgtd).
>
> The issue was introduced in 68c250701f6b73352d895a7a1d431dd19e402261
> (iscsi: handle commands waiting for I/O completion properly).
>
> I can force-remove targets with revisions up to
> 8115bab4e2977748eec9548a22a8a71a27bf9f19 (iscsi: fix the memory
> overwrite bug in text_key_add).
>
> Anything later, I'm not able to force-remove the targets.
Thanks for bisecting,
This patch works (sorry, I can't reproduce this problem as I said
before)?
diff --git a/usr/iscsi/iscsid.c b/usr/iscsi/iscsid.c
index 9252f4a..f3184fa 100644
--- a/usr/iscsi/iscsid.c
+++ b/usr/iscsi/iscsid.c
@@ -1110,7 +1110,7 @@ static int iscsi_scsi_cmd_done(uint64_t nid, int result, struct scsi_cmd *scmd)
* the response with a little extra code or we can check if this
* task got reassinged to another connection.
*/
- if (task->conn->state == STATE_CLOSE) {
+ if (task->conn->state == STATE_CLOSE || task->conn->closed) {
iscsi_free_cmd_task(task);
return 0;
}
--
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