Commit b2570934 authored by Niklas Cassel's avatar Niklas Cassel Committed by Tomasz Zawadzki
Browse files

nvme: change the type of spdk_nvme_ctrlr::state from enum to int



When adding an additional state to enum nvme_ctrlr_state, abidiff (1.6.0)
will report that almost every public interface in the nvme library has
been impacted, causing test/make/check_so_deps.sh to fail.

While it is possible that by adding another state, the compiler decides
to use a larger data type for representing enum nvme_ctrlr_state, abidiff
shouldn't complain in the first place, since spdk_nvme_ctrlr is only
ever exposed as an opaque handle. It can never be accessed directly.

Jim Harris suggested to workaround this abidiff bug by changing the type
of spdk_nvme_ctrlr::state from enum to int.

Signed-off-by: default avatarNiklas Cassel <niklas.cassel@wdc.com>
Change-Id: I8b85446580043e95cf791249d643907587e2f982
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4427


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent 1c2a2bb7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -720,7 +720,7 @@ struct spdk_nvme_ctrlr {
	union spdk_nvme_cap_register	cap;
	union spdk_nvme_vs_register	vs;

	enum nvme_ctrlr_state		state;
	int				state;
	uint64_t			state_timeout_tsc;

	uint64_t			next_keep_alive_tick;