From mboxrd@z Thu Jan 1 00:00:00 1970 From: Boaz Harrosh Subject: Re: [Cbe-oss-dev] [regression/bisected] corrupt CD data after media change and delay Date: Tue, 10 Jun 2008 19:12:03 +0300 Message-ID: <484EA7D3.1060606@panasas.com> References: <1212765202.16182.5.camel@localhost.localdomain> <1213023916.3508.23.camel@localhost.localdomain> <1213111253.3440.5.camel@localhost.localdomain> <484EA274.2060308@panasas.com> <1213113379.3440.23.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Return-path: Received: from gw-colo-pa.panasas.com ([66.238.117.130]:9751 "EHLO cassoulet.panasas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751014AbYFJQMa (ORCPT ); Tue, 10 Jun 2008 12:12:30 -0400 In-Reply-To: <1213113379.3440.23.camel@localhost.localdomain> Sender: linux-scsi-owner@vger.kernel.org List-Id: linux-scsi@vger.kernel.org To: James Bottomley Cc: Geert Uytterhoeven , linux-scsi 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? Boaz