Re: blk-merge: BIO front merge size check for chunked devices

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

 



On 02/02/2016 08:06 AM, Damien Le Moal wrote:
> 
> Hello,
> 
> In ll_front_merge_fn, the request size result of the eventual front
> merge of a BIO with a request is checked against the maximum
> size allowed for the request using blk_rq_get_max_sectors. This
> function will also check that the merge result will not span block
> chunks for chunked block devices using the function blk_max_size_offset.
> 
> However, blk_rq_get_max_sectors always calls blk_max_size_offset using
> the request sector position, which in the case of a front merge is not
> the position at which the merged request would be issued: the sector
> position to use must be that of the BIO, and not that of the request.
> 
> This problem can trigger a “boundary violation error” for write
> requests on ZAC/ZBC host-managed SMR disks as the last write BIO
> of a zone (a chunk) can end up being front-merged with the first
> request of the following zone (chunk).
> 
> The attached patch against linux-4.5-rc2 fixes this problem by adding
> an offset argument to the function blk_rq_get_max_sectors.
> 

Reviewed-by: Hannes Reinecke <hare@xxxxxxxx>

I can easily respin this as a proper patch if required.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		   Teamlead Storage & Networking
hare@xxxxxxx			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
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