Re: can't force-remove targets

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

 



On Mon, 18 May 2009 17:15:25 +0200
Tomasz Chmielewski <mangoo@xxxxxxxx> wrote:

> FUJITA Tomonori schrieb:
> > On Wed, 06 May 2009 17:09:40 +0200
> > Tomasz Chmielewski <mangoo@xxxxxxxx> 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@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