From 19100ed580ebdb50c22eedd5aef76a637612986f Mon Sep 17 00:00:00 2001
From: Daniel Verkamp <daniel.verkamp@intel.com>
Date: Fri, 9 Mar 2018 15:20:21 -0700
Subject: [PATCH] bdev: rename spdk_bdev_module_if -> spdk_bdev_module

This better matches the style in the rest of SPDK.

No functional change - this is a pure find/replace of
spdk_bdev_module_if to spdk_bdev_module.  Instances of this struct will
be renamed in another patch.

Change-Id: I3f6933c8a366e625fc3a1b6401aee26ee03ba69c
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/403368
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
---
 doc/bdev_module.md                            |  6 ++--
 include/spdk/blob_bdev.h                      |  4 +--
 include/spdk_internal/bdev.h                  | 24 +++++++--------
 lib/bdev/aio/bdev_aio.c                       |  2 +-
 lib/bdev/bdev.c                               | 30 +++++++++----------
 lib/bdev/error/vbdev_error.c                  |  2 +-
 lib/bdev/gpt/vbdev_gpt.c                      |  2 +-
 lib/bdev/lvol/vbdev_lvol.c                    |  2 +-
 lib/bdev/malloc/bdev_malloc.c                 |  2 +-
 lib/bdev/null/bdev_null.c                     |  2 +-
 lib/bdev/nvme/bdev_nvme.c                     |  2 +-
 lib/bdev/part.c                               |  2 +-
 lib/bdev/pmem/bdev_pmem.c                     |  2 +-
 lib/bdev/rbd/bdev_rbd.c                       |  2 +-
 lib/bdev/split/vbdev_split.c                  |  2 +-
 lib/bdev/virtio/bdev_virtio_blk.c             |  2 +-
 lib/bdev/virtio/bdev_virtio_scsi.c            |  2 +-
 lib/blob/bdev/blob_bdev.c                     |  2 +-
 test/unit/lib/bdev/bdev.c/bdev_ut.c           |  4 +--
 test/unit/lib/bdev/mt/bdev.c/bdev_ut.c        |  2 +-
 test/unit/lib/bdev/part.c/part_ut.c           |  4 +--
 test/unit/lib/bdev/pmem/bdev_pmem_ut.c        |  4 +--
 .../lib/bdev/vbdev_lvol.c/vbdev_lvol_ut.c     |  6 ++--
 23 files changed, 56 insertions(+), 56 deletions(-)

diff --git a/doc/bdev_module.md b/doc/bdev_module.md
index 60eba007fa..a315b33b36 100644
--- a/doc/bdev_module.md
+++ b/doc/bdev_module.md
@@ -27,14 +27,14 @@ starting point is to copy the existing 'null' bdev module.
 The primary interface that bdev modules will interact with is in
 include/spdk_internal/bdev.h. In that header a macro is defined that registers
 a new bdev module - SPDK_BDEV_MODULE_REGISTER. This macro take as argument a
-pointer spdk_bdev_module_if structure that is used to register new bdev module.
+pointer spdk_bdev_module structure that is used to register new bdev module.
 
-The spdk_bdev_module_if structure describes the module properties like
+The spdk_bdev_module structure describes the module properties like
 initialization (`module_init`) and teardown (`module_fini`) functions,
 the function that returns context size (`get_ctx_size`) - scratch space that
 will be allocated in each I/O request for use by this module, and a callback
 that will be called each time a new bdev is registered by another module
-(`examine`). Please check the documentation of struct spdk_bdev_module_if for
+(`examine`). Please check the documentation of struct spdk_bdev_module for
 more details.
 
 ## Creating Bdevs
diff --git a/include/spdk/blob_bdev.h b/include/spdk/blob_bdev.h
index c50c439b76..dcaa5b18c1 100644
--- a/include/spdk/blob_bdev.h
+++ b/include/spdk/blob_bdev.h
@@ -47,7 +47,7 @@ extern "C" {
 
 struct spdk_bs_dev;
 struct spdk_bdev;
-struct spdk_bdev_module_if;
+struct spdk_bdev_module;
 
 /**
  * Create a blobstore block device from a bdev.
@@ -69,7 +69,7 @@ struct spdk_bs_dev *spdk_bdev_create_bs_dev(struct spdk_bdev *bdev, spdk_bdev_re
  *
  * \return 0 on success, negative errno on failure.
  */
-int spdk_bs_bdev_claim(struct spdk_bs_dev *bs_dev, struct spdk_bdev_module_if *module);
+int spdk_bs_bdev_claim(struct spdk_bs_dev *bs_dev, struct spdk_bdev_module *module);
 
 #ifdef __cplusplus
 }
diff --git a/include/spdk_internal/bdev.h b/include/spdk_internal/bdev.h
index accdbbe2be..3141571ccd 100644
--- a/include/spdk_internal/bdev.h
+++ b/include/spdk_internal/bdev.h
@@ -77,7 +77,7 @@
  */
 
 /** Block device module */
-struct spdk_bdev_module_if {
+struct spdk_bdev_module {
 	/**
 	 * Initialization function for the module.  Called by the spdk
 	 * application during startup.
@@ -138,7 +138,7 @@ struct spdk_bdev_module_if {
 	 */
 	bool async_fini;
 
-	TAILQ_ENTRY(spdk_bdev_module_if) tailq;
+	TAILQ_ENTRY(spdk_bdev_module) tailq;
 };
 
 typedef void (*spdk_bdev_unregister_cb)(void *cb_arg, int rc);
@@ -257,7 +257,7 @@ struct spdk_bdev {
 	/**
 	 * Pointer to the bdev module that registered this bdev.
 	 */
-	struct spdk_bdev_module_if *module;
+	struct spdk_bdev_module *module;
 
 	/** function table for all LUN ops */
 	const struct spdk_bdev_fn_table *fn_table;
@@ -282,7 +282,7 @@ struct spdk_bdev {
 	 * Pointer to the module that has claimed this bdev for purposes of creating virtual
 	 *  bdevs on top of it.  Set to NULL if the bdev has not been claimed.
 	 */
-	struct spdk_bdev_module_if *claim_module;
+	struct spdk_bdev_module *claim_module;
 
 	/** Callback function that will be called after bdev destruct is completed. */
 	spdk_bdev_unregister_cb	unregister_cb;
@@ -439,11 +439,11 @@ void spdk_bdev_unregister_done(struct spdk_bdev *bdev, int bdeverrno);
 int spdk_vbdev_register(struct spdk_bdev *vbdev, struct spdk_bdev **base_bdevs,
 			int base_bdev_count);
 
-void spdk_bdev_module_examine_done(struct spdk_bdev_module_if *module);
-void spdk_bdev_module_init_done(struct spdk_bdev_module_if *module);
+void spdk_bdev_module_examine_done(struct spdk_bdev_module *module);
+void spdk_bdev_module_init_done(struct spdk_bdev_module *module);
 void spdk_bdev_module_finish_done(void);
 int spdk_bdev_module_claim_bdev(struct spdk_bdev *bdev, struct spdk_bdev_desc *desc,
-				struct spdk_bdev_module_if *module);
+				struct spdk_bdev_module *module);
 void spdk_bdev_module_release_bdev(struct spdk_bdev *bdev);
 
 /**
@@ -542,7 +542,7 @@ int spdk_bdev_notify_blockcnt_change(struct spdk_bdev *bdev, uint64_t size);
 void spdk_scsi_nvme_translate(const struct spdk_bdev_io *bdev_io,
 			      int *sc, int *sk, int *asc, int *ascq);
 
-void spdk_bdev_module_list_add(struct spdk_bdev_module_if *bdev_module);
+void spdk_bdev_module_list_add(struct spdk_bdev_module *bdev_module);
 
 /**
  * Find registered module with name pointed by \c name.
@@ -550,7 +550,7 @@ void spdk_bdev_module_list_add(struct spdk_bdev_module_if *bdev_module);
  * \param name name of module to be searched for.
  * \return pointer to module or NULL if no module with \c name exist
  */
-struct spdk_bdev_module_if *spdk_bdev_module_list_find(const char *name);
+struct spdk_bdev_module *spdk_bdev_module_list_find(const char *name);
 
 static inline struct spdk_bdev_io *
 spdk_bdev_io_from_ctx(void *ctx)
@@ -570,7 +570,7 @@ struct spdk_bdev_part_base {
 	uint32_t			channel_size;
 	spdk_bdev_part_base_free_fn	base_free_fn;
 	bool				claimed;
-	struct spdk_bdev_module_if	*module;
+	struct spdk_bdev_module		*module;
 	struct spdk_bdev_fn_table	*fn_table;
 	struct bdev_part_tailq		*tailq;
 	spdk_io_channel_create_cb	ch_create_cb;
@@ -596,7 +596,7 @@ void spdk_bdev_part_free(struct spdk_bdev_part *part);
 void spdk_bdev_part_base_hotremove(struct spdk_bdev *base_bdev, struct bdev_part_tailq *tailq);
 int spdk_bdev_part_base_construct(struct spdk_bdev_part_base *base, struct spdk_bdev *bdev,
 				  spdk_bdev_remove_cb_t remove_cb,
-				  struct spdk_bdev_module_if *module,
+				  struct spdk_bdev_module *module,
 				  struct spdk_bdev_fn_table *fn_table,
 				  struct bdev_part_tailq *tailq,
 				  spdk_bdev_part_base_free_fn free_fn,
@@ -628,6 +628,6 @@ void spdk_bdev_part_submit_request(struct spdk_bdev_part_channel *ch, struct spd
 /*
  *  Second helper macro for "stringize" trick to work.
  */
-#define SPDK_BDEV_MODULE_REGISTER_FN_NAME_(line) spdk_bdev_module_if_register_ ## line
+#define SPDK_BDEV_MODULE_REGISTER_FN_NAME_(line) spdk_bdev_module_register_ ## line
 
 #endif /* SPDK_INTERNAL_BDEV_H */
diff --git a/lib/bdev/aio/bdev_aio.c b/lib/bdev/aio/bdev_aio.c
index 264767fee4..9bc2ac2e8a 100644
--- a/lib/bdev/aio/bdev_aio.c
+++ b/lib/bdev/aio/bdev_aio.c
@@ -59,7 +59,7 @@ bdev_aio_get_ctx_size(void)
 	return sizeof(struct bdev_aio_task);
 }
 
-static struct spdk_bdev_module_if aio_if = {
+static struct spdk_bdev_module aio_if = {
 	.name		= "aio",
 	.module_init	= bdev_aio_initialize,
 	.module_fini	= NULL,
diff --git a/lib/bdev/bdev.c b/lib/bdev/bdev.c
index b49906774b..174dad2719 100644
--- a/lib/bdev/bdev.c
+++ b/lib/bdev/bdev.c
@@ -76,7 +76,7 @@ struct spdk_bdev_mgr {
 
 	void *zero_buffer;
 
-	TAILQ_HEAD(, spdk_bdev_module_if) bdev_modules;
+	TAILQ_HEAD(, spdk_bdev_module) bdev_modules;
 
 	TAILQ_HEAD(, spdk_bdev) bdevs;
 
@@ -396,7 +396,7 @@ spdk_bdev_io_get_buf(struct spdk_bdev_io *bdev_io, spdk_bdev_io_get_buf_cb cb, u
 static int
 spdk_bdev_module_get_max_ctx_size(void)
 {
-	struct spdk_bdev_module_if *bdev_module;
+	struct spdk_bdev_module *bdev_module;
 	int max_bdev_module_size = 0;
 
 	TAILQ_FOREACH(bdev_module, &g_bdev_mgr.bdev_modules, tailq) {
@@ -411,7 +411,7 @@ spdk_bdev_module_get_max_ctx_size(void)
 void
 spdk_bdev_config_text(FILE *fp)
 {
-	struct spdk_bdev_module_if *bdev_module;
+	struct spdk_bdev_module *bdev_module;
 
 	TAILQ_FOREACH(bdev_module, &g_bdev_mgr.bdev_modules, tailq) {
 		if (bdev_module->config_text) {
@@ -479,7 +479,7 @@ spdk_bdev_init_complete(int rc)
 static void
 spdk_bdev_module_action_complete(void)
 {
-	struct spdk_bdev_module_if *m;
+	struct spdk_bdev_module *m;
 
 	/*
 	 * Don't finish bdev subsystem initialization if
@@ -510,7 +510,7 @@ spdk_bdev_module_action_complete(void)
 }
 
 static void
-spdk_bdev_module_action_done(struct spdk_bdev_module_if *module)
+spdk_bdev_module_action_done(struct spdk_bdev_module *module)
 {
 	assert(module->action_in_progress > 0);
 	module->action_in_progress--;
@@ -518,13 +518,13 @@ spdk_bdev_module_action_done(struct spdk_bdev_module_if *module)
 }
 
 void
-spdk_bdev_module_init_done(struct spdk_bdev_module_if *module)
+spdk_bdev_module_init_done(struct spdk_bdev_module *module)
 {
 	spdk_bdev_module_action_done(module);
 }
 
 void
-spdk_bdev_module_examine_done(struct spdk_bdev_module_if *module)
+spdk_bdev_module_examine_done(struct spdk_bdev_module *module)
 {
 	spdk_bdev_module_action_done(module);
 }
@@ -532,7 +532,7 @@ spdk_bdev_module_examine_done(struct spdk_bdev_module_if *module)
 static int
 spdk_bdev_modules_init(void)
 {
-	struct spdk_bdev_module_if *module;
+	struct spdk_bdev_module *module;
 	int rc = 0;
 
 	TAILQ_FOREACH(module, &g_bdev_mgr.bdev_modules, tailq) {
@@ -687,8 +687,8 @@ spdk_bdev_module_finish_iter(void *arg)
 {
 	/* Notice that this variable is static. It is saved between calls to
 	 * this function. */
-	static struct spdk_bdev_module_if *resume_bdev_module = NULL;
-	struct spdk_bdev_module_if *bdev_module;
+	static struct spdk_bdev_module *resume_bdev_module = NULL;
+	struct spdk_bdev_module *bdev_module;
 
 	/* Start iterating from the last touched module */
 	if (!resume_bdev_module) {
@@ -2374,7 +2374,7 @@ spdk_bdev_io_get_thread(struct spdk_bdev_io *bdev_io)
 static int
 _spdk_bdev_register(struct spdk_bdev *bdev)
 {
-	struct spdk_bdev_module_if *module;
+	struct spdk_bdev_module *module;
 
 	assert(bdev->module != NULL);
 
@@ -2572,7 +2572,7 @@ spdk_bdev_close(struct spdk_bdev_desc *desc)
 
 int
 spdk_bdev_module_claim_bdev(struct spdk_bdev *bdev, struct spdk_bdev_desc *desc,
-			    struct spdk_bdev_module_if *module)
+			    struct spdk_bdev_module *module)
 {
 	if (bdev->claim_module != NULL) {
 		SPDK_ERRLOG("bdev %s already claimed by module %s\n", bdev->name,
@@ -2635,7 +2635,7 @@ spdk_bdev_io_get_iovec(struct spdk_bdev_io *bdev_io, struct iovec **iovp, int *i
 }
 
 void
-spdk_bdev_module_list_add(struct spdk_bdev_module_if *bdev_module)
+spdk_bdev_module_list_add(struct spdk_bdev_module *bdev_module)
 {
 
 	if (spdk_bdev_module_list_find(bdev_module->name)) {
@@ -2659,10 +2659,10 @@ spdk_bdev_module_list_add(struct spdk_bdev_module_if *bdev_module)
 	}
 }
 
-struct spdk_bdev_module_if *
+struct spdk_bdev_module *
 spdk_bdev_module_list_find(const char *name)
 {
-	struct spdk_bdev_module_if *bdev_module;
+	struct spdk_bdev_module *bdev_module;
 
 	TAILQ_FOREACH(bdev_module, &g_bdev_mgr.bdev_modules, tailq) {
 		if (strcmp(name, bdev_module->name) == 0) {
diff --git a/lib/bdev/error/vbdev_error.c b/lib/bdev/error/vbdev_error.c
index 4799f82c56..2c3dd426d9 100644
--- a/lib/bdev/error/vbdev_error.c
+++ b/lib/bdev/error/vbdev_error.c
@@ -72,7 +72,7 @@ static int vbdev_error_init(void);
 
 static void vbdev_error_examine(struct spdk_bdev *bdev);
 
-static struct spdk_bdev_module_if error_if = {
+static struct spdk_bdev_module error_if = {
 	.name = "error",
 	.module_init = vbdev_error_init,
 	.module_fini = NULL,
diff --git a/lib/bdev/gpt/vbdev_gpt.c b/lib/bdev/gpt/vbdev_gpt.c
index fe37debb86..c8b8d89aed 100644
--- a/lib/bdev/gpt/vbdev_gpt.c
+++ b/lib/bdev/gpt/vbdev_gpt.c
@@ -52,7 +52,7 @@
 static int vbdev_gpt_init(void);
 static void vbdev_gpt_examine(struct spdk_bdev *bdev);
 
-static struct spdk_bdev_module_if gpt_if = {
+static struct spdk_bdev_module gpt_if = {
 	.name = "gpt",
 	.module_init = vbdev_gpt_init,
 	.examine = vbdev_gpt_examine,
diff --git a/lib/bdev/lvol/vbdev_lvol.c b/lib/bdev/lvol/vbdev_lvol.c
index fc03736895..2ae5453a76 100644
--- a/lib/bdev/lvol/vbdev_lvol.c
+++ b/lib/bdev/lvol/vbdev_lvol.c
@@ -47,7 +47,7 @@ static int vbdev_lvs_init(void);
 static int vbdev_lvs_get_ctx_size(void);
 static void vbdev_lvs_examine(struct spdk_bdev *bdev);
 
-static struct spdk_bdev_module_if g_lvol_if = {
+static struct spdk_bdev_module g_lvol_if = {
 	.name = "lvol",
 	.module_init = vbdev_lvs_init,
 	.examine = vbdev_lvs_examine,
diff --git a/lib/bdev/malloc/bdev_malloc.c b/lib/bdev/malloc/bdev_malloc.c
index 4ea5fb4803..561136a84a 100644
--- a/lib/bdev/malloc/bdev_malloc.c
+++ b/lib/bdev/malloc/bdev_malloc.c
@@ -101,7 +101,7 @@ bdev_malloc_get_ctx_size(void)
 	return sizeof(struct malloc_task) + spdk_copy_task_size();
 }
 
-static struct spdk_bdev_module_if malloc_if = {
+static struct spdk_bdev_module malloc_if = {
 	.name = "malloc",
 	.module_init = bdev_malloc_initialize,
 	.config_text = bdev_malloc_get_spdk_running_config,
diff --git a/lib/bdev/null/bdev_null.c b/lib/bdev/null/bdev_null.c
index 00faa0e521..9c7dab6fbc 100644
--- a/lib/bdev/null/bdev_null.c
+++ b/lib/bdev/null/bdev_null.c
@@ -60,7 +60,7 @@ static int bdev_null_initialize(void);
 static void bdev_null_finish(void);
 static void bdev_null_get_spdk_running_config(FILE *fp);
 
-static struct spdk_bdev_module_if null_if = {
+static struct spdk_bdev_module null_if = {
 	.name = "null",
 	.module_init = bdev_null_initialize,
 	.module_fini = bdev_null_finish,
diff --git a/lib/bdev/nvme/bdev_nvme.c b/lib/bdev/nvme/bdev_nvme.c
index eacf703b0c..bc096b5fae 100644
--- a/lib/bdev/nvme/bdev_nvme.c
+++ b/lib/bdev/nvme/bdev_nvme.c
@@ -158,7 +158,7 @@ bdev_nvme_get_ctx_size(void)
 	return sizeof(struct nvme_bdev_io);
 }
 
-static struct spdk_bdev_module_if nvme_if = {
+static struct spdk_bdev_module nvme_if = {
 	.name = "nvme",
 	.module_init = bdev_nvme_library_init,
 	.module_fini = bdev_nvme_library_fini,
diff --git a/lib/bdev/part.c b/lib/bdev/part.c
index 52552cc75f..ff837effe7 100644
--- a/lib/bdev/part.c
+++ b/lib/bdev/part.c
@@ -195,7 +195,7 @@ spdk_bdev_part_channel_destroy_cb(void *io_device, void *ctx_buf)
 
 int
 spdk_bdev_part_base_construct(struct spdk_bdev_part_base *base, struct spdk_bdev *bdev,
-			      spdk_bdev_remove_cb_t remove_cb, struct spdk_bdev_module_if *module,
+			      spdk_bdev_remove_cb_t remove_cb, struct spdk_bdev_module *module,
 			      struct spdk_bdev_fn_table *fn_table, struct bdev_part_tailq *tailq,
 			      spdk_bdev_part_base_free_fn free_fn,
 			      uint32_t channel_size, spdk_io_channel_create_cb ch_create_cb,
diff --git a/lib/bdev/pmem/bdev_pmem.c b/lib/bdev/pmem/bdev_pmem.c
index 91c8a8ee7b..8f68aee6a0 100644
--- a/lib/bdev/pmem/bdev_pmem.c
+++ b/lib/bdev/pmem/bdev_pmem.c
@@ -54,7 +54,7 @@ static TAILQ_HEAD(, pmem_disk) g_pmem_disks = TAILQ_HEAD_INITIALIZER(g_pmem_disk
 static int bdev_pmem_initialize(void);
 static void bdev_pmem_finish(void);
 
-static struct spdk_bdev_module_if pmem_if = {
+static struct spdk_bdev_module pmem_if = {
 	.name = "pmem",
 	.module_init = bdev_pmem_initialize,
 	.module_fini = bdev_pmem_finish,
diff --git a/lib/bdev/rbd/bdev_rbd.c b/lib/bdev/rbd/bdev_rbd.c
index daab76cdf0..beae99b3dc 100644
--- a/lib/bdev/rbd/bdev_rbd.c
+++ b/lib/bdev/rbd/bdev_rbd.c
@@ -214,7 +214,7 @@ bdev_rbd_get_ctx_size(void)
 	return sizeof(struct bdev_rbd_io);
 }
 
-static struct spdk_bdev_module_if rbd_if = {
+static struct spdk_bdev_module rbd_if = {
 	.name = "rbd",
 	.module_init = bdev_rbd_library_init,
 	.get_ctx_size = bdev_rbd_get_ctx_size,
diff --git a/lib/bdev/split/vbdev_split.c b/lib/bdev/split/vbdev_split.c
index 1665b42051..765c053eff 100644
--- a/lib/bdev/split/vbdev_split.c
+++ b/lib/bdev/split/vbdev_split.c
@@ -57,7 +57,7 @@ struct vbdev_split_channel {
 static int vbdev_split_init(void);
 static void vbdev_split_examine(struct spdk_bdev *bdev);
 
-static struct spdk_bdev_module_if split_if = {
+static struct spdk_bdev_module split_if = {
 	.name = "split",
 	.module_init = vbdev_split_init,
 	.examine = vbdev_split_examine,
diff --git a/lib/bdev/virtio/bdev_virtio_blk.c b/lib/bdev/virtio/bdev_virtio_blk.c
index 7120e078b6..834d01b2bc 100644
--- a/lib/bdev/virtio/bdev_virtio_blk.c
+++ b/lib/bdev/virtio/bdev_virtio_blk.c
@@ -82,7 +82,7 @@ struct bdev_virtio_blk_io_channel {
 static int bdev_virtio_initialize(void);
 static int bdev_virtio_blk_get_ctx_size(void);
 
-static struct spdk_bdev_module_if virtio_blk_if = {
+static struct spdk_bdev_module virtio_blk_if = {
 	.name = "virtio_blk",
 	.module_init = bdev_virtio_initialize,
 	.get_ctx_size = bdev_virtio_blk_get_ctx_size,
diff --git a/lib/bdev/virtio/bdev_virtio_scsi.c b/lib/bdev/virtio/bdev_virtio_scsi.c
index 0282043b99..f5d8d29732 100644
--- a/lib/bdev/virtio/bdev_virtio_scsi.c
+++ b/lib/bdev/virtio/bdev_virtio_scsi.c
@@ -399,7 +399,7 @@ bdev_virtio_get_ctx_size(void)
 	return sizeof(struct virtio_scsi_io_ctx);
 }
 
-static struct spdk_bdev_module_if virtio_scsi_if = {
+static struct spdk_bdev_module virtio_scsi_if = {
 	.name = "virtio_scsi",
 	.module_init = bdev_virtio_initialize,
 	.module_fini = bdev_virtio_finish,
diff --git a/lib/blob/bdev/blob_bdev.c b/lib/blob/bdev/blob_bdev.c
index 55f860ae47..fbe516db2c 100644
--- a/lib/blob/bdev/blob_bdev.c
+++ b/lib/blob/bdev/blob_bdev.c
@@ -160,7 +160,7 @@ bdev_blob_unmap(struct spdk_bs_dev *dev, struct spdk_io_channel *channel, uint64
 }
 
 int
-spdk_bs_bdev_claim(struct spdk_bs_dev *bs_dev, struct spdk_bdev_module_if *module)
+spdk_bs_bdev_claim(struct spdk_bs_dev *bs_dev, struct spdk_bdev_module *module)
 {
 	struct blob_bdev *blob_bdev = (struct blob_bdev *)bs_dev;
 	int rc;
diff --git a/test/unit/lib/bdev/bdev.c/bdev_ut.c b/test/unit/lib/bdev/bdev.c/bdev_ut.c
index 6533726b51..282691079e 100644
--- a/test/unit/lib/bdev/bdev.c/bdev_ut.c
+++ b/test/unit/lib/bdev/bdev.c/bdev_ut.c
@@ -68,13 +68,13 @@ static struct spdk_bdev_fn_table fn_table = {
 	.destruct = stub_destruct,
 };
 
-struct spdk_bdev_module_if bdev_ut_if = {
+struct spdk_bdev_module bdev_ut_if = {
 	.name = "bdev_ut",
 };
 
 static void vbdev_ut_examine(struct spdk_bdev *bdev);
 
-struct spdk_bdev_module_if vbdev_ut_if = {
+struct spdk_bdev_module vbdev_ut_if = {
 	.name = "vbdev_ut",
 	.examine = vbdev_ut_examine,
 };
diff --git a/test/unit/lib/bdev/mt/bdev.c/bdev_ut.c b/test/unit/lib/bdev/mt/bdev.c/bdev_ut.c
index 5b715ee7a7..1a60e68a50 100644
--- a/test/unit/lib/bdev/mt/bdev.c/bdev_ut.c
+++ b/test/unit/lib/bdev/mt/bdev.c/bdev_ut.c
@@ -176,7 +176,7 @@ module_fini(void)
 {
 }
 
-struct spdk_bdev_module_if bdev_ut_if = {
+struct spdk_bdev_module bdev_ut_if = {
 	.name = "bdev_ut",
 	.module_init = module_init,
 	.module_fini = module_fini,
diff --git a/test/unit/lib/bdev/part.c/part_ut.c b/test/unit/lib/bdev/part.c/part_ut.c
index 96013a1f9c..2b7e35bedb 100644
--- a/test/unit/lib/bdev/part.c/part_ut.c
+++ b/test/unit/lib/bdev/part.c/part_ut.c
@@ -47,13 +47,13 @@ spdk_scsi_nvme_translate(const struct spdk_bdev_io *bdev_io,
 {
 }
 
-struct spdk_bdev_module_if bdev_ut_if = {
+struct spdk_bdev_module bdev_ut_if = {
 	.name = "bdev_ut",
 };
 
 static void vbdev_ut_examine(struct spdk_bdev *bdev);
 
-struct spdk_bdev_module_if vbdev_ut_if = {
+struct spdk_bdev_module vbdev_ut_if = {
 	.name = "vbdev_ut",
 	.examine = vbdev_ut_examine,
 };
diff --git a/test/unit/lib/bdev/pmem/bdev_pmem_ut.c b/test/unit/lib/bdev/pmem/bdev_pmem_ut.c
index 676f999352..c68099ae38 100644
--- a/test/unit/lib/bdev/pmem/bdev_pmem_ut.c
+++ b/test/unit/lib/bdev/pmem/bdev_pmem_ut.c
@@ -37,7 +37,7 @@
 
 #include "bdev/pmem/bdev_pmem.c"
 
-static struct spdk_bdev_module_if *g_bdev_pmem_module;
+static struct spdk_bdev_module *g_bdev_pmem_module;
 static int g_bdev_module_cnt;
 
 struct pmemblk {
@@ -296,7 +296,7 @@ ut_bdev_pmem_destruct(struct spdk_bdev *bdev)
 }
 
 void
-spdk_bdev_module_list_add(struct spdk_bdev_module_if *bdev_module)
+spdk_bdev_module_list_add(struct spdk_bdev_module *bdev_module)
 {
 	g_bdev_pmem_module = bdev_module;
 	g_bdev_module_cnt++;
diff --git a/test/unit/lib/bdev/vbdev_lvol.c/vbdev_lvol_ut.c b/test/unit/lib/bdev/vbdev_lvol.c/vbdev_lvol_ut.c
index 8841741750..2220013488 100644
--- a/test/unit/lib/bdev/vbdev_lvol.c/vbdev_lvol_ut.c
+++ b/test/unit/lib/bdev/vbdev_lvol.c/vbdev_lvol_ut.c
@@ -180,7 +180,7 @@ spdk_lvs_load(struct spdk_bs_dev *dev,
 }
 
 int
-spdk_bs_bdev_claim(struct spdk_bs_dev *bs_dev, struct spdk_bdev_module_if *module)
+spdk_bs_bdev_claim(struct spdk_bs_dev *bs_dev, struct spdk_bdev_module *module)
 {
 	if (lvol_already_opened == true) {
 		return -1;
@@ -488,7 +488,7 @@ spdk_blob_io_readv(struct spdk_blob *blob, struct spdk_io_channel *channel,
 }
 
 void
-spdk_bdev_module_list_add(struct spdk_bdev_module_if *bdev_module)
+spdk_bdev_module_list_add(struct spdk_bdev_module *bdev_module)
 {
 }
 
@@ -538,7 +538,7 @@ spdk_vbdev_register(struct spdk_bdev *vbdev, struct spdk_bdev **base_bdevs, int
 }
 
 void
-spdk_bdev_module_examine_done(struct spdk_bdev_module_if *module)
+spdk_bdev_module_examine_done(struct spdk_bdev_module *module)
 {
 	g_examine_done = true;
 }