On 14-07-13 10:35 AM, Martin K. Petersen wrote:
"Christoph" == Christoph Hellwig <h...@lst.de> writes:

Christoph> Simplify handling of discard requests by setting up the
Christoph> command directly instead of initializing request fields and
Christoph> then calling scsi_setup_blk_pc_cmnd to propagate the
Christoph> information into the command.

Would be nice to add a comment similar to the WRITE SAME one. Something
like:

/*
  * Initially __data_len is set to the amount of data that needs to be
  * transferred to the target. This amount depends on whether WRITE SAME
  * or UNMAP is being used. After the scatterlist has been mapped by
  * scsi_init_io() we set __data_len to the size of the area to be
  * discarded on disk. This allows us to report completion on the full
  * amount of blocks described by the request.
  */

Reviewed-by: Martin K. Petersen <martin.peter...@oracle.com>

To make things clearer when referring to the WRITE SAME command
I would suggest "WRITE SAME(unmap)" for the case when its UNMAP
field is 1 (as I assume it is in this case).

Doug Gilbert


--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to