lib/ftl: Set write pointer for zone in full state during initialization
Zone in full state should have write pointer set to
the last block plus one to be consistent with internal
ftl write pointer tracking.
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1437 (master)
(cherry picked from commit ead6c54c75
)
Change-Id: Ib81124e7a8451f8daec82d3d41dc55f6ed328ba2
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2118
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
bb9348e736
commit
d7b0ae8913
@ -923,6 +923,11 @@ ftl_dev_get_zone_info_cb(struct spdk_bdev_io *bdev_io, bool success, void *cb_ar
|
||||
"zone id: %"PRIu64"\n", init_ctx->zone_id);
|
||||
}
|
||||
|
||||
/* Set write pointer to the last block plus one for zone in full state */
|
||||
if (zone->info.state == SPDK_BDEV_ZONE_STATE_FULL) {
|
||||
zone->info.write_pointer = zone->info.zone_id + zone->info.capacity;
|
||||
}
|
||||
|
||||
if (zone->info.state != SPDK_BDEV_ZONE_STATE_OFFLINE) {
|
||||
band->num_zones++;
|
||||
CIRCLEQ_INSERT_TAIL(&band->zones, zone, circleq);
|
||||
|
Loading…
Reference in New Issue
Block a user