Hi, Alan Stern <st...@rowland.harvard.edu> writes: > On Thu, 31 Mar 2016, Ivaylo Dimitrov wrote: > >> > This isn't supposed to cause any problems. The two instances should >> > never run at the same time, because they belong to different configs. >> > >> >> The problem seems to be that fsg driver creates a thread for every >> fsg_bind() call, which overwrites common->thread_task without first >> checking if a thread is already created. I don't know the idea behind - >> should it have only one thread for all instances, or there should be a >> thread per instance, but anyway the current implementation looks wrong. > > You've put your finger on the problem. > > Michal, I'm not sure how you intended to handle this. We only need to > have one thread per interface (even if there's more than one LUN), but > if there are multiple mass-storage interfaces in one configuration then > you might want to have multiple threads. Of course, then you would > have to handle cases where one config has one mass-storage interface > and another config has two... > > It's your decision, but clearly the driver needs to be fixed.
I agree, this is now very clear what the problem is. -- balbi
signature.asc
Description: PGP signature