[Stgt-devel] iscsi target works, minor fixes
FUJITA Tomonori
fujita.tomonori
Fri Nov 3 17:04:55 CET 2006
From: Pete Wyckoff <pw at osc.edu>
Subject: [Stgt-devel] iscsi target works, minor fixes
Date: Thu, 2 Nov 2006 19:45:48 -0500
> I've been playing with the user-space iscsi target, looking at the
> latest stgt SVN and linux-2.6-target git today. One little fix I
> need in the userspace code is this:
>
> Index: trunk/usr/bd_aio.c
> ===================================================================
> --- trunk/usr/bd_aio.c (revision 609)
> +++ trunk/usr/bd_aio.c (working copy)
> @@ -74,8 +74,8 @@ static void aio_event_handler(int fd, in
>
> for (i = 0; i < nr; i++) {
> iocb = bai->events[i].obj;
> - dprintf("%p\n", iocb->data);
> - target_cmd_io_done(iocb->data, 0);
> + dprintf("%p\n", bai->events[i].data);
> + target_cmd_io_done(bai->events[i].data, 0);
> }
> }
>
> While I don't understand exactly what's going on, this data pointer
> from struct io_event is the correct struct cmd *, and without the
> patch, tgtd segfaults trying to access fields in the (bogus) cmd
> from iocb->data.
>
> It could be related to the aiopoll-2.6.18-rc4.patch; perhaps that
> was the wrong one to apply? There was one minor reject that was
> easy to fix up. My kernel is v2.6.19-rc4 + the 9 patches in tomo's
> linux-2.6-target.git + aiopoll + other minor patches.
The lastest git tree and the updated aiopoll patch
(patch/aiopoll-git.diff) work for me.
Is iocb->data bogus? It means that io_event->obj does not refer to
the appropriate iocb. I have no idea why.
More information about the stgt
mailing list