zbd: add zbd_zone_remainder() helper function
authorShin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Mon, 14 Nov 2022 02:12:58 +0000 (11:12 +0900)
committerVincent Fu <vincent.fu@samsung.com>
Fri, 18 Nov 2022 14:55:16 +0000 (09:55 -0500)
commitdf67bf1e5d3186f3b8776faf0934491295d9464d
tree89f97c473548085c9027808f80c02615d65ff223
parenta7f1b5cdea3c4757a0c0226762fed12017b9b90f
zbd: add zbd_zone_remainder() helper function

Add the helper function zbd_zone_remainder(), which returns the number
of bytes that are still available for writing before the zone gets full.
Use this function to improve readability. It will also be used in the
following patch.

Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Tested-by: Dmitry Fomichev <dmitry.fomichev@wdc.com>
Reviewed-by: Dmitry Fomichev <dmitry.fomichev@wdc.com>
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
zbd.c