[Stgt-devel] segfault in the ssc code ...

Richard Sharpe realrichardsharpe
Sat Jul 26 02:12:33 CEST 2008


On Fri, Jul 25, 2008 at 2:31 PM, Richard Sharpe
<realrichardsharpe at gmail.com> wrote:
> Hi,
>
> There is a segfault in the ssc code when using it with the smc code
> because it seems that bs_ssc_open is not called when you move a tape
> into the transfer unit.
>
> I am currently looking at what the best approach is here, but it seems
> the smc.c code calls target.c:dtd_load_unload which calls
> backed_file_open, but it seems that nothing calls bs_thread_open, so
> later when a bs_thread_cmd_submit is called, the pending_list is not
> initialized and we segfault.
>
> I am currently wading through the code to see if I can figure out
> where this should be set up. It would seem like it should be done when
> we move a unit into the transfer station in the smc.c code but I am
> not sure.

I was wondering if this change would do the trick:

In usr/smc.c, change set_slot_full to take a target structure as well
as the other args, and from that call tgt_set_device_path_update,
which will also call the correct things ...

and in set_slot_empty, also call tdt_set_device_path_update ...

That seems like the smallest number of changes to fix the problem I am
seeing ...

Does anyone have any comments on the damage this might do, though?



More information about the stgt mailing list