bdev/ocssd: store nvme_bdev_ns in a separate variable

Change-Id: I5a8cb443929c0749aa50e19da1a57244479d2895
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/482411
Reviewed-by: Mateusz Kozlowski <mateusz.kozlowski@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
Konrad Sztyber 2020-01-22 15:08:32 +01:00 committed by Jim Harris
parent d5ffabca72
commit 42226f33ed

View File

@ -915,15 +915,16 @@ void
bdev_ocssd_handle_chunk_notification(struct nvme_bdev_ctrlr *nvme_bdev_ctrlr)
{
struct bdev_ocssd_ns *ocssd_ns;
struct nvme_bdev_ns *nvme_ns;
uint32_t nsid;
for (nsid = 0; nsid < nvme_bdev_ctrlr->num_ns; ++nsid) {
if (nvme_bdev_ctrlr->namespaces[nsid] == NULL ||
!nvme_bdev_ctrlr->namespaces[nsid]->populated) {
nvme_ns = nvme_bdev_ctrlr->namespaces[nsid];
if (nvme_ns == NULL || !nvme_ns->populated) {
continue;
}
ocssd_ns = bdev_ocssd_get_ns_from_nvme(nvme_bdev_ctrlr->namespaces[nsid]);
ocssd_ns = bdev_ocssd_get_ns_from_nvme(nvme_ns);
ocssd_ns->chunk_notify_pending = true;
}
}