On Sat, Jun 21, 2003 at 05:21:53PM -0700, Linus Torvalds wrote:
> On Sat, 21 Jun 2003, Matthew Dharm wrote:
> > I mean, this works, it's not difficult to follow, and meets all the
> > operational goals.
> 
> As far as I can tell, your patch is not actually all that stable.
> 
> Imagine a flaky SCSI connection (think iscsi or whatever), where your
> commands are getting lost or corrupted. The first mode-sense command goes 
> out, it takes a while to come back, another one goes out for some other 
> reason (like scsi-generic), that other one failes due to something else, 
> and look what happens: two bugs in one schenario:
> 
>  - your code will clear "use_10_for_ms" even though the failure code 
>    wasn't due to an unrecognized command, but due to something else 
>    (timeout, out-of-memory, whatever)

True.  With this scenario and the old code, the code just makes an
assumption and goes on -- I did not aim to improve robustness, only
maintain it.  You can make the same argument about the existing code
falling back to the dumb-assumption condition under a transient error
condition.

So if this is a problem, then this entire section of code needed a rewrite
before I ever looked at it.  Until that rewrite occurs, I think my patch
adds value.

>  - when the other sense command comes back, it was sent with 
>    "use_10_for_ms" active, but by the time the result comes back it has
>    been cleared, and now we'll use that flag to test what the sense data 
>    means. So now we'll get the size wrong.

I don't see how a sense command sent from the scsi-generic interface will
affect (or be affected by) use_10_for_ms -- if scsi-generic issues the
command, this code path won't try to interpret the data at all.  Perhaps
I'm confused?

Matt

-- 
Matthew Dharm                              Home: [EMAIL PROTECTED] 
Maintainer, Linux USB Mass Storage Driver

C:  Like the Furby?
DP: He gives me the creeps.  Think the SPCA will take him?
                                        -- Cobb and Dust Puppy
User Friendly, 1/2/1999

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to