Re: [Cbe-oss-dev] [regression/bisected] corrupt CD data after media change and delay

James Bottomley
2008-06-10T16:17:26Z

On Tue, 2008-06-10 at 19:12 +0300, Boaz Harrosh wrote:
> James Bottomley wrote:
> > On Tue, 2008-06-10 at 18:49 +0300, Boaz Harrosh wrote:
> >> I think, I recall that, any issued command, not only unit_ready, might be appended
> >> with UNIT_ATTENTION sense. So maybe as a deeper fix (with lots of testing) we want
> >> to add this logic into the scsi_check_sense() processing. But I'm not sure either way.
> >
> > We do .. it's in scsi_io_completion(). The problem is that by design
> > internally issued commands bypass this, so the problem was that the
> > internally issued command wasn't doing the correct update.
> >
> > James
> >
> >
>
> Yes, I was just staring at that code. It looks like this hunk could be move up
> to before the completion, since with BLOCK_PC commands we always complete the
> all command length, hence the code will never get there.
>
> Should I attempt a fix, or could you do it?

Like I said, we deliberately let them see this, so moving the code would
be the wrong thing to do.

James