Re: [PATCH v2 1/2] libata-scsi: improve TRIM translation

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

 



Hello.

On 7/5/2016 9:45 AM, tom.ty89@xxxxxxxxx wrote:

From: Tom Yan <tom.ty89@xxxxxxxxx>

Define TRIM_RANGE_SIZE and TRIM_RANGE_NUM so that the corresponding
functions can be more generalized. Also, conform to SBC by rejecting
WRITE SAME (16) commands with number of blocks that exceeds the limit
that is defined in the SATL.

Signed-off-by: Tom Yan <tom.ty89@xxxxxxxxx>

[...]

diff --git a/include/linux/ata.h b/include/linux/ata.h
index 99346be..0971c3f 100644
--- a/include/linux/ata.h
+++ b/include/linux/ata.h
@@ -1071,7 +1071,7 @@ static inline unsigned ata_set_lba_range_entries(void *_buffer,
 	__le64 *buffer = _buffer;
 	unsigned i = 0, used_bytes;

-	while (i < buf_size / 8 ) { /* 6-byte LBA + 2-byte range per entry */
+	while (i < buf_size) {

   BTW, this change doesn't seem to be documented in the patch description?

[...]

MBR, Sergei

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



[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux