>>>>> "Bart" == Bart Van Assche <bart.vanass...@sandisk.com> writes:

Bart> Today if a BLKDISCARD ioctl passes a non-aligned start and/or end
Bart> sector to the kernel then the block layer will submit invalid
Bart> (non-aligned) REQ_DISCARD requests to the block driver the ioctl
Bart> applies to.

I do not know what you mean by "invalid".

A device that implements UNMAP can freely ignore any parts of a request
block range that are not aligned to its internal allocation units.

>From SBC: "An unmap request with a number of logical blocks that is not
a multiple of this value (OPTIMAL UNMAP GRANULARITY) may result in unmap
operations on fewer LBAs than requested." and "An unmap request with a
starting LBA that is not optimal may result in unmap operations on fewer
LBAs than requested."

The same is true for SATA which has no way report granularity and
alignment at all.

Nowhere does it say that a request that is not an aligned multiple of
any reported granularity should be considered "invalid" or rejected by
the storage.

-- 
Martin K. Petersen      Oracle Linux Engineering
--
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