Re: [PATCH scsi-misc-2.6 04/04] scsi: remove unnecessaryscsi_wait_req_end_io()

From: James Bottomley
Date: Sat May 14 2005 - 11:20:56 EST


On Sun, 2005-05-15 at 00:47 +0900, Tejun Heo wrote:
> BLKPREP_KILL is only used to kill illegal (unpreparable, way-off)
> requests. Actually, for special requests, the only tests performed
> are req->flags and CDB_SIZE tests. I don't think anyone does/will
> submit that illegal requests via scsi_wait_req(). And if so, it will
> be a bug.

True, but without the code you're removing it will simply hang the
system, which isn't a correct response to a detected bug. And if I had
a shilling for every time someone's predicated a code change on "oh,
users will never do this" ... I'd be reasonably rich.

This also leads naturally into the next observation: Checking in the
request function should be done. However, it makes little sense wasting
resources preparing requests we know are going to be killed, so the
correct thing to do seems to be to abstract the checks and do them in
both prep_fn and request_fn.

James


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/