Re: [PATCH 2/2]: PCI Error Recovery: Symbios SCSI First Failure

From: Linas Vepstas
Date: Mon Oct 01 2007 - 18:41:49 EST


On Mon, Oct 01, 2007 at 02:12:47PM -0600, Matthew Wilcox wrote:
>
> I think the fundamental problem is that completions aren't really
> supposed to be used like this. Here's one attempt at using completions
> perhaps a little more the way they're supposed to be used,

Yes, that looks very good to me. I see it solves a bug that
I hadn't been quite aware of. I don't understand why
struct host_data is preferable to struct sym_shcb (is it because
this is the structure that is "naturally protectected" by the
spinlock?)

My gut instinct is to say "ack", although prudence dictates that
I should test first. Which might take a few days...

> although now
> I've written it, I wonder if we shouldn't just use a waitqueue instead.

I thought that earlier versions of the driver used waitqueues (I vaguely
remember "eh_wait" in the code), which were later converted to
completions (I also vaguely recall thinking that the new code was
more elegant/simpler). I converted my patch to use the completions
likewise, and, as you've clearly shown, did a rather sloppy job in
the conversion.

I'm tempted to go with this patch; but if you prod, I could attempt
a wait-queue based patch.

--linas

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/