]> git.baikalelectronics.ru Git - kernel.git/commit
block: Fix null_blk_zoned creation failure with small number of zones
authorShin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Tue, 11 Dec 2018 12:08:26 +0000 (21:08 +0900)
committerJens Axboe <axboe@kernel.dk>
Tue, 11 Dec 2018 23:19:38 +0000 (16:19 -0700)
commitd09b9d756780ff343d4618f5f0b38301ff9fd953
treee1f46fa013f3a75142525c4a5a4c60b5f14d438c
parent096b9645ef4759b03bb6aee33e737903b33393a7
block: Fix null_blk_zoned creation failure with small number of zones

null_blk_zoned creation fails if the number of zones specified is equal to or is
smaller than 64 due to a memory allocation failure in blk_alloc_zones(). With
such a small number of zones, the required memory size for all zones descriptors
fits in a single page, and the page order for alloc_pages_node() is zero. Allow
this value in blk_alloc_zones() for the allocation to succeed.

Fixes: 4633f7cb1dc9 "block: Introduce blk_revalidate_disk_zones()"
Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-zoned.c