Commit ffabc8ac authored by Shuhei Matsumoto's avatar Shuhei Matsumoto Committed by Tomasz Zawadzki
Browse files

bdev/nvme: Inline bdev_nvme_failover_start() into bdev_nvme_failover()



Signed-off-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I70593de284f5623db9e30d94b03b6576bd6ca29b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10442


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@mellanox.com>
parent 696ad465
Loading
Loading
Loading
Loading
+4 −15
Original line number Diff line number Diff line
@@ -1576,9 +1576,9 @@ bdev_nvme_reset_io(struct nvme_bdev_channel *nbdev_ch, struct nvme_bdev_io *bio)
}

static int
bdev_nvme_failover_start(struct nvme_ctrlr *nvme_ctrlr, bool remove)
bdev_nvme_failover(struct nvme_ctrlr *nvme_ctrlr, bool remove)
{
	struct nvme_path_id *path_id = NULL, *next_path = NULL;
	struct nvme_path_id *path_id, *next_path;
	int rc __attribute__((unused));

	pthread_mutex_lock(&nvme_ctrlr->mutex);
@@ -1624,20 +1624,9 @@ bdev_nvme_failover_start(struct nvme_ctrlr *nvme_ctrlr, bool remove)
	}

	pthread_mutex_unlock(&nvme_ctrlr->mutex);
	return 0;
}

static int
bdev_nvme_failover(struct nvme_ctrlr *nvme_ctrlr, bool remove)
{
	int rc;

	rc = bdev_nvme_failover_start(nvme_ctrlr, remove);
	if (rc == 0) {
	spdk_thread_send_msg(nvme_ctrlr->thread, _bdev_nvme_reset, nvme_ctrlr);
	}

	return rc;
	return 0;
}

static int bdev_nvme_unmap(struct nvme_bdev_io *bio, uint64_t offset_blocks,