[stgt] tgtd segfault with software RAID, hard resetting link
FUJITA Tomonori
fujita.tomonori at lab.ntt.co.jp
Tue Apr 21 01:05:58 CEST 2009
On Mon, 20 Apr 2009 12:04:41 +0100
Chris Webb <chris at arachsys.com> wrote:
> FUJITA Tomonori <fujita.tomonori at lab.ntt.co.jp> writes:
>
> > I've not tried to reproduce this problem yet, but can you please try
> > this patch?
>
> Hi. Thanks for that: I'll give it a whirl on a test machine as soon as
> possible and let you know how it behaves. (My previous test machine is now
> in production, so I can't use that---need to put together a new one!)
I see.
Tomasz, any chance to test the patch?
> I'm betraying my lack of familiarity with the tgt code-base here, but there
> are two things I don't quite follow about your patch:
>
> - If you skip a task because it is 'in scsi', when does it get finally get
> cleared up?
Yeah, it should.
- If iscsi_task are waiting for the I/O completion and the conn is
closed, iscsi_scsi_cmd_done() frees iscsi_task when the I/Os complete
(you and Tomasz hit this case, I think).
- iscsi_alloc_task calls conn_get(). It means that we don't free the
conn until all iscsi_task belonging to the conn are freed.
(
> (Does the list_for_each_entry_safe keep retrying until the
> list is empty?)
It doesn't.
> - You set the TASK_in_scsi flags bit, but I don't see it getting cleared
> anywhere. (Does the whole flags word get reset at the end of the SCSI
> command or something like that?)
It doesn't get cleared. When the I/Os complete, we call
iscsi_scsi_cmd_done(), which links tasks to conn->tx_clist. So
conn_close() can handle such tasks properly.
task->flags is confusing. We don't need to use the bitmap for it. What
we should do here is using something like:
enum iscsi_task {
TASK_INIT,
TASK_PENDING,
TASK_IN_SCSI,
--
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