[Stgt-devel] PATCH 6 of 6 - Implement READ ELEMENT STATUS op code

Mark Harvey markh794
Sat May 12 04:36:52 CEST 2007


On 5/12/07, Ming Zhang <blackmagic02881 at gmail.com> wrote:
>
> On Fri, 2007-05-11 at 13:23 +1000, Mark Harvey wrote:
> > SMC module is now useful enough to return a list of 'barcode' media in
> > the changer.
>
> one potential issue for this command is the data can be larger than 1
> page if it is a large tl with thousands of elements. pls double check it
> is handled.

You are correct.

Initially, I attempted to estimate at the amount of memory required
(based on the number of slots * max record size), however I kept
getting a core dump and eventually tracked it down to the following
routine in iscsid.c
   ======================================
static void iscsi_free_cmd_task(struct iscsi_task *task)
{
        target_cmd_done(&task->scmd);

        list_del(&task->c_hlist);
        if (task->data) {
                if ((unsigned long) task->data != task->addr)
                        free((void *) (unsigned long) task->addr);
        }
        iscsi_free_task(task);
}
   ======================================

I keept getting a glibc double free error and was not quite sure where
to go from here.

This was to be the subject of another email I had not written as yet,
but since you brought it up :)

>
>
> >
> > Can't move them about yet. That will be next op code to be implemented.
> > _______________________________________________
> > Stgt-devel mailing list
> > Stgt-devel at lists.berlios.de
> > https://lists.berlios.de/mailman/listinfo/stgt-devel
>
>



More information about the stgt mailing list