Instead of adding another discard hack to scsi_finish_command(), howabout converting discard to REQ_TYPE_FS request? discard is FS requestfrom the perspective of the block layer. It also fixes a problem thatdiscard isn't retried in the case of UNIT ATTENTION.

I think that we can get more cleaner code if we handle discard asnormal (fs) request in the block layer (and scsi-ml). We need morechanges but this patch is the first step.

This patch depends on the patchset to convert flush request toREQ_TYPE_FS:

This patch doesn't address on this (since it's a different problem). Ithink that scsi_setup_discard_cmnd() sees if it already allocates apage before allocating a page. That's similar to how other prepfunctions work, I think.