Re: SCSI eats error from flush failure during hot plug

Christoph Hellwig
2014-06-11T13:37:38Z

On Mon, Jun 09, 2014 at 10:29:06AM -0700, James Bottomley wrote:
> I'll do it as a bug fix, but I do need Jens to make sure nothing else
> breaks first. Best I can tell, the state model for compound commands
> like flush doesn't expect us to change the request type ... nothing puts
> it back to REQ_TYPE_FS. In your case, the flush is the last command
> sent, so there's no problem ... I just worry we will get an obscure
> problem later on from something that does a BLOCK_PC prepared first
> command.

Yes, I don't think resetting cmd_type is a good idea. I'd much rather
see a special case for rq->cmd_flags & REQ_FLUSH in the completion
handler - we already treat it special during setup anyway.