scsi: Delete mutex from spdk_scsi_globals
This mutex is not used anywhere. After removing mutex from struct spdk_scsi_globals, struct spdk_scsi_globals is empty. Hence then remove struct spdk_scsi_globals. We can create struct spdk_scsi_globals again if it becomes necessary. Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: I749ae43f7735a7c9383d090eae2093bb52607f17 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8192 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot Reviewed-by: Ziye Yang <ziye.yang@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com>
This commit is contained in:
parent
11d76e8c81
commit
074f503d27
@ -34,26 +34,15 @@
|
||||
|
||||
#include "scsi_internal.h"
|
||||
|
||||
struct spdk_scsi_globals g_scsi;
|
||||
|
||||
int
|
||||
spdk_scsi_init(void)
|
||||
{
|
||||
int rc;
|
||||
|
||||
rc = pthread_mutex_init(&g_scsi.mutex, NULL);
|
||||
if (rc != 0) {
|
||||
SPDK_ERRLOG("mutex_init() failed\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
spdk_scsi_fini(void)
|
||||
{
|
||||
pthread_mutex_destroy(&g_scsi.mutex);
|
||||
}
|
||||
|
||||
SPDK_TRACE_REGISTER_FN(scsi_trace, "scsi", TRACE_GROUP_SCSI)
|
||||
|
@ -213,10 +213,4 @@ int scsi2_reserve(struct spdk_scsi_task *task, uint8_t *cdb);
|
||||
int scsi2_release(struct spdk_scsi_task *task);
|
||||
int scsi2_reserve_check(struct spdk_scsi_task *task);
|
||||
|
||||
struct spdk_scsi_globals {
|
||||
pthread_mutex_t mutex;
|
||||
};
|
||||
|
||||
extern struct spdk_scsi_globals g_scsi;
|
||||
|
||||
#endif /* SPDK_SCSI_INTERNAL_H */
|
||||
|
@ -51,8 +51,6 @@ struct spdk_bdev {
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT(scsi)
|
||||
|
||||
struct spdk_scsi_globals g_spdk_scsi;
|
||||
|
||||
static bool g_lun_execute_fail = false;
|
||||
static int g_lun_execute_status = SPDK_SCSI_TASK_PENDING;
|
||||
static uint32_t g_task_count = 0;
|
||||
|
@ -44,8 +44,6 @@
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT(scsi)
|
||||
|
||||
struct spdk_scsi_globals g_spdk_scsi;
|
||||
|
||||
static uint64_t g_test_bdev_num_blocks;
|
||||
|
||||
TAILQ_HEAD(, spdk_bdev_io) g_bdev_io_queue;
|
||||
|
Loading…
Reference in New Issue
Block a user