Jens,
On 7/14/16 01:19, Jens Axboe wrote:
On 07/12/2016 10:23 PM, Damien Le Moal wrote:
For a front merge, the maximum number of sectors of the
request must be checked against the front merge BIO sector,
not the current sector of the request.
Why does this matter? The merging should only happen before we start the
request, hence rq pos and first bio should be one and the same.
The block device of SMR drives is set up as chunked with the chunk size
equal to the drive zone size. Since write requests directed to
sequential zones cannot cross zone boundaries, both the front merge code
and the back merge code must ensure that requests resulting from a merge
do not cross chunk boundaries.
The back merge code does this well, but the front merge code fails to
prevent merging when the BIO is the last write in a zone and the request
is the first write in the following (empty) zone. The check against the
request LBA does not prevent the merge as the request+bio size fit in
the empty zone. The check must be against the BIO LBA to detect the
chunk boundary crossing.
Best regards.
--
Damien Le Moal, Ph.D.
Sr. Manager, System Software Group, HGST Research,
HGST, a Western Digital brand
Damien.LeMoal@xxxxxxxx
(+81) 0466-98-3593 (ext. 513593)
1 kirihara-cho, Fujisawa,
Kanagawa, 252-0888 Japan
www.hgst.com
Western Digital Corporation (and its subsidiaries) E-mail Confidentiality Notice & Disclaimer:
This e-mail and any files transmitted with it may contain confidential or legally privileged information of WDC and/or its affiliates, and are intended solely for the use of the individual or entity to which they are addressed. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited. If you have received this e-mail in error, please notify the sender immediately and delete the e-mail in its entirety from your system.
--
To unsubscribe from this list: send the line "unsubscribe linux-block" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html