James Bottomley wrote: >>The mechanism is in place, but the SCSI stack still needs a few changes >>to pass down the correct errors. The easiest would be to pass down >>pseudo-sense keys (I'd rather just call them something else as not to >>confuse things, io error hints or something) to >>end_that_request_first(), changing uptodate from a bool to a hint. > > > Yes, I'm ready to do this in SCSI. I think the uptodate field should > include at least two (and possibly three) failure type indications: > > - fatal: error cannot be retried > - retryable: error may be retried > > and possibly > > - informational: This is dangerous, since it's giving information about > a transaction that actually succeeded (i.e. we'd need to fix drivers to > recognise it as being uptodate but with info, like sector remapped) > > Then, we also have a error origin indication: > > - device: The device is actually reporting the problem > - transport: the error is a transport error > - driver: the error comes from the device driver. > > So dm would know that fatal transport or driver errors could be > repathed, but fatal device errors probably couldn't. > I apologize for not starting a new thread, but I just wanted some feedback as to whether or not the attached patch is headed in the right direction or even acceptable. block-err.patch adds new errornos to include/linux/errno.h (it does not touch the asm values), so useful IO error info can passed from callers of end_that_request_first to bio_endio and eventually to the DM/MD endio functions. I have an alternative patch that defines BLK_ERR_xxx values instead of touching errno.h, but becuase the error values get passed through the request code, bio code and DM/MD code the callers of bio_endio that are already using -Exxx values could present a problem. It would be nice to change them to the BLK_ERR_xxx, so the bio layer could have a single error value namespace. It's a more invasive change as there are several callers passing at least -EIO, -EWOULDBLOCK and -EPERM, so I am not sure if that is going to be OK since we are already in 2.6.3? Thanks, Mike Christie mikenc@us.ibm.com