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

FUJITA Tomonori fujita.tomonori
Sun Jul 27 01:56:07 CEST 2008


From: "Richard Sharpe" <realrichardsharpe at gmail.com>
Subject: Re: [Stgt-devel] segfault in the ssc code ...
Date: Sat, 26 Jul 2008 16:40:59 -0700

> On Fri, Jul 25, 2008 at 7:19 PM, Mark Harvey <markh794 at gmail.com> wrote:
> > Richard Sharpe 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 ...
> >
> > When I put this bit into the code, I was thinking something like "exec
> > tgtadm .... <with options to update backing store>"

Agreed, I like that.


> > Where the backing store consists of a path prefix along with the 'barcode'
> > as the filename.
> >
> > I'm sure there is a neater method however.

What do you think about using extended attributes as Ronnie suggested?


> > The same thing is required for the MMC device as well (for a Virtual CD/DVD
> > Library).
> 
> Hmmm, while I have stuff mostly working, further examination showed
> that I should have passed --params bstype=ssc or something like that
> when I created the virtual tape drive, in which case I would get the
> correct backing store module, I think ...
> _______________________________________________
> 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