zbd: only put an upper limit on max open zones once
authorNiklas Cassel <niklas.cassel@wdc.com>
Fri, 14 May 2021 12:52:51 +0000 (12:52 +0000)
committerJens Axboe <axboe@kernel.dk>
Fri, 14 May 2021 14:57:26 +0000 (08:57 -0600)
commit6399ab79bf410ac317260614c36f60ad76e5aa35
treea8fa53d9780e0d76909f820747311f4189d86dea
parent30bec59eab3908b681cbc2866179f7166a849c83
zbd: only put an upper limit on max open zones once

There is an upper limit that is checked for each td, and for each file,
even though a file has a pointer to a zoned_block_device_info that has
already been created. Multiple files, from the same or from another td
can point to the same zoned_block_device_info.
All zoned_block_device_info:s have already been created earlier in the
call chain.

Simplify this by only checking the upper limit on max open zones when a
zoned_block_device_info is created.

This way, max_open_zones is handled from a single location, instead of
potentially being reassigned from a completely different location.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
zbd.c