diff options
| author | Damien Le Moal <dlemoal@kernel.org> | 2025-11-07 09:38:42 +0300 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2025-11-07 19:28:08 +0300 |
| commit | bbac6e0fa57f6624123edf20ba8f9b7c0e092117 (patch) | |
| tree | f48563bfca0678a885278e108a3a92320780f3a6 /scripts | |
| parent | 86a9ce21f5b781c56eba23cbbd2264ab74778ab0 (diff) | |
| download | linux-bbac6e0fa57f6624123edf20ba8f9b7c0e092117.tar.xz | |
block: improve blk_zone_wp_offset()
blk_zone_wp_offset() is always called with a struct blk_zone obtained
from the device, that is, it will never see the BLK_ZONE_COND_ACTIVE
condition. However, handling this condition makes this function more
solid and will also avoid issues when propagating cached report requests
to underlying stacked devices is implemented. Add BLK_ZONE_COND_ACTIVE
as a new case in blk_zone_wp_offset() switch.
Also while at it, change the handling of the full condition to return
UINT_MAX for the zone write pointer to reflect the fact that the write
pointer of a full zone is invalid.
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions
