Re: [PATCH 06/10] sd: don't use scsi_setup_blk_pc_cmnd for discard requests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 14-07-13 10:35 AM, Martin K. Petersen wrote:
"Christoph" == Christoph Hellwig <hch@xxxxxx> 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.petersen@xxxxxxxxxx>

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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux