Re: [PATCH 4/5] convert st to use scsi_execte_async

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 18 Sep 2005, Mike Christie wrote:

> Mike Christie wrote:
> > On Sun, 2005-09-18 at 20:40 +0300, Kai Makisara wrote:
> > 
> > > The command triggering these problems is a 6-byte read of 10240 bytes.
> > > It should not a this point return anything but finish with some sense
> > > data.
> > > 
> > > I am debugging the problem but it is going slowly because the system
> > > disk is a SCSI disk. I have to be careful with the debugging output
> > > and changes outside st.c require a reboot ;-) So far I have found out
> > > that scsi_check_sense() is called correctly and returns SUCCESS as it
> > > should. What happens after that is a mystery.
> > > 
> > 
> > 
> > I think something like this would give us something like the old
> > behavior back. This way we do not let scsi_io_completion further process
> > the error.
> > 
> > diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
> > --- a/drivers/scsi/scsi_lib.c
> > +++ b/drivers/scsi/scsi_lib.c
> > @@ -1126,7 +1126,7 @@ static int scsi_issue_flush_fn(request_q
> > static void scsi_generic_done(struct scsi_cmnd *cmd)
> > {
> > 	BUG_ON(!blk_pc_request(cmd->request));
> > -	scsi_io_completion(cmd, cmd->result == 0 ? cmd->bufflen : 0, 0);
> > +	scsi_io_completion(cmd, cmd->bufflen, 0);
> > }
> > 
> > static int scsi_prep_fn(struct request_queue *q, struct request *req)
> > 
> 
> this is over 1-6 of my other patches.
> 
This solves the problem. All works properly and if I try some mt command 
after filemark detection, the residual is correctly zero.

This change solving problems also explains what I have seen today. Before 
your message I had found out that all three commands (the one that should 
have been executed and the two retries) were fetched from the queue in the 
normal way. Eh did not have anything to do with them. The command was 
using dio and 10240 bytes needs three pages => two retries.

Fixing passing the retries did not actually have anything to do with this 
exact problem. However, I think that the retries parameter should be 
obeyed if it is in the interface.

-- 
Kai
-
: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux