lib/ftl: assert that chunk is never NULL
Code on line 613 should never be reached for last chunk on the band, since it is checked on line 606. This assert verifies that, all chunks before last are not NULL. Change-Id: I78a9967f91c0873981b3308e888d85fa7c8d6641 Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462488 Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
94bf29d268
commit
37acf6814b
@ -611,6 +611,7 @@ ftl_band_next_xfer_ppa(struct ftl_band *band, struct ftl_ppa ppa, size_t num_lbk
|
||||
}
|
||||
|
||||
chunk = ftl_band_next_operational_chunk(band, chunk);
|
||||
assert(chunk);
|
||||
ppa.grp = chunk->start_ppa.grp;
|
||||
ppa.pu = chunk->start_ppa.pu;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user