Re: Fwd: [PATCH 1/1] sd: do not let LBPME bit stop the VPDs speak

2016-03-10 Thread Martin K. Petersen
> "Tom" == Tom Yan writes: Tom> Hmm, is it originated from: (2^32-1) - (2^32-1)%512 = 4294966784 Tom> bytes = 8388607 (512-byte) blocks = 0x7f Yes. Tom> What about SD_MAX_XFER_BLOCKS then? It is merely there to provide a theoretical upper max for the 16 and 32-byte READ/WRITE commands.

Re: Fwd: [PATCH 1/1] sd: do not let LBPME bit stop the VPDs speak

2016-03-10 Thread Martin K. Petersen
> "Tom" == Tom Yan writes: Tom, Tom> I just couldn't think of a case that the LBPME bit would actually Tom> indicates that the VPDs should not be used. It's merely bad Tom> implementation of Read Capacity (16), which doesn't practically Tom> stops the device from supporting unmap (even if a

Fwd: [PATCH 1/1] sd: do not let LBPME bit stop the VPDs speak

2016-03-10 Thread Tom Yan
Hmm, is it originated from: (2^32-1) - (2^32-1)%512 = 4294966784 bytes = 8388607 (512-byte) blocks = 0x7f for the byte count (of a bio?) is limited by a 32-bit representation (2^32-1) as well just like the block count in the two scsi commands? What about SD_MAX_XFER_BLOCKS then? On 10 March

Fwd: [PATCH 1/1] sd: do not let LBPME bit stop the VPDs speak

2016-03-10 Thread Tom Yan
The outputs were made with an SSD that supports TRIM plugged in: [tom@localhost ~]$ sudo smartctl --identify=wb /dev/sdc | grep -i trim 69 14 1 Deterministic data after trim supported 69 5 1 Trimmed LBA range(s) returning zeroed data supported 169 0