Re: [PATCH] scsi-misc-2.5 user per-device spare command

Luben Tuikov
2003-04-25T17:33:53Z

Patrick Mansfield wrote:
> On Fri, Apr 25, 2003 at 10:12:51AM -0400, Luben Tuikov wrote:
>
>
>>1. Use the cache *first*, and if it's depleted, *then*
>>use the spare command struct.
>
>
> Then we would allocate and almost never use the spare. This is a bit
> different as compared to the per-host spare, when we shoulid use the
> spare only as a last resort.

No, it is NOT different, because I can see your patch deleting
the good code which currently impements just that.

All we want is for IO to keep going. It does, so leave it alone.

>
>>2. Why spare_cmd is a pointer? Why? Why?
>>Wouldn't it be much more *flexible* to be a list_head,
>>so that maybe we can hook up more commands in the future?
>>I.e. keep your options open...
>
>
> When or if we use more than one spare we can change the code to a
> list_head. I don't plan to add such code, so I see no reason to use a
> list_head.

Yeah, and then you're going to change a WHOLE bunch of code
everywhere.

It's good not to overengineer, but it's even BETTER to know
when to do so and when to NOT do so.

Ideally, commands come out of cache/free_list, travel through
lists as they go about SCSI Core, and go back to the cache/free_list.

So the following axiom: scsi command always belongs to a list.

...

--
Luben