]> www.infradead.org Git - users/jedix/linux-maple.git/commit
SPARC64: vds_blk_rw() does not handle drives with q->limits.chunk_sectors > 0
authorGeorge Kennedy <george.kennedy@oracle.com>
Wed, 15 Feb 2017 20:17:58 +0000 (15:17 -0500)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 6 Apr 2017 07:13:55 +0000 (00:13 -0700)
commit782dd8bbc86912c26d3a5ae1bbdebbd54b460725
tree1235747e516f76178c693b5c2f383357e468a665
parent5f67cbb420a412dac3e06ef48584b20de67032b1
SPARC64: vds_blk_rw() does not handle drives with q->limits.chunk_sectors > 0

Drives with q->limits.chunk_sectors > 0 are not properly handled by
vds_blk_rw(). Drives such as NVME set chunk_sectors to indicate a performance
boundary (see call to blk_queue_chunk_sectors() in nvme_alloc_ns()). Currently,
when vds_blk_rw() calls bio_add_page() and the chunk_sectors boundary would be
crossed, bio_add_page() returns zero and vds_blk_rw() fails with -EIO.

The proposed fix now adds an additional check to vds_blk_rw() when
bio_add_page() returns zero that checks for bio->bi_iter.bi_size != 0. If
bi_size != 0, it indicates that a page or pages have been successfully added by
bio_add_page(). When this added condition has been hit, exit the for loop in
vds_blk_rw() and submit the outstanding IOs and continue.

Signed-off-by: George Kennedy <george.kennedy@oracle.com>
Reviewed-By: Bijan Mottahedeh <bijan.mottahedeh@oracle.com>
Reviewed-By: Liam Merwick <Liam.Merwick@oracle.com>
Orabug: 25373818
Signed-off-by: Allen Pais <allen.pais@oracle.com>
drivers/block/vds/vds_blk.c