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

ronnie sahlberg ronniesahlberg
Sat Jul 26 08:01:16 CEST 2008

MMC also uses the media changer.

Please verify that the example of "DVD jukebox" that is described in
README.mmc still works
after your changes to the mediachanger.

On Sat, Jul 26, 2008 at 11:23 AM, Richard Sharpe
<realrichardsharpe at gmail.com> wrote:
> On Fri, Jul 25, 2008 at 5:12 PM, Richard Sharpe
> <realrichardsharpe at gmail.com> wrote:
>> 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?
> OK, so I made those changes, and added a mode page that bs_rdwr.c
> needed, and then tar was able to write to the virtual tape I moved
> into the data transfer device ...
> Just like magic ...
> Got to clean up the changes and then send around a patch.
> _______________________________________________
> 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