nvme: rename struct spdk_nvme_controller_process
Change-Id: If8f29409b86281532eae6d87d056a2f02f6609d4 Signed-off-by: GangCao <gang.cao@intel.com>
This commit is contained in:
parent
74c4833229
commit
af9eca84d6
@ -809,10 +809,10 @@ nvme_ctrlr_configure_aer(struct spdk_nvme_ctrlr *ctrlr)
|
||||
int
|
||||
nvme_ctrlr_add_process(struct spdk_nvme_ctrlr *ctrlr, void *devhandle)
|
||||
{
|
||||
struct spdk_nvme_controller_process *ctrlr_proc;
|
||||
struct spdk_nvme_ctrlr_process *ctrlr_proc;
|
||||
|
||||
/* Initialize the per process properties for this ctrlr */
|
||||
ctrlr_proc = spdk_zmalloc(sizeof(struct spdk_nvme_controller_process), 64, NULL);
|
||||
ctrlr_proc = spdk_zmalloc(sizeof(struct spdk_nvme_ctrlr_process), 64, NULL);
|
||||
if (ctrlr_proc == NULL) {
|
||||
SPDK_ERRLOG("failed to allocate memory to track the process props\n");
|
||||
|
||||
@ -836,7 +836,7 @@ nvme_ctrlr_add_process(struct spdk_nvme_ctrlr *ctrlr, void *devhandle)
|
||||
* Note: the ctrl_lock must be held when calling this function.
|
||||
*/
|
||||
static void
|
||||
nvme_ctrlr_cleanup_process(struct spdk_nvme_controller_process *proc)
|
||||
nvme_ctrlr_cleanup_process(struct spdk_nvme_ctrlr_process *proc)
|
||||
{
|
||||
struct nvme_request *req, *tmp_req;
|
||||
|
||||
@ -859,7 +859,7 @@ nvme_ctrlr_cleanup_process(struct spdk_nvme_controller_process *proc)
|
||||
void
|
||||
nvme_ctrlr_free_processes(struct spdk_nvme_ctrlr *ctrlr)
|
||||
{
|
||||
struct spdk_nvme_controller_process *active_proc, *tmp;
|
||||
struct spdk_nvme_ctrlr_process *active_proc, *tmp;
|
||||
|
||||
/* Free all the processes' properties and make sure no pending admin IOs */
|
||||
TAILQ_FOREACH_SAFE(active_proc, &ctrlr->active_procs, tailq, tmp) {
|
||||
@ -880,7 +880,7 @@ nvme_ctrlr_free_processes(struct spdk_nvme_ctrlr *ctrlr)
|
||||
static void
|
||||
nvme_ctrlr_remove_inactive_proc(struct spdk_nvme_ctrlr *ctrlr)
|
||||
{
|
||||
struct spdk_nvme_controller_process *active_proc, *tmp;
|
||||
struct spdk_nvme_ctrlr_process *active_proc, *tmp;
|
||||
|
||||
TAILQ_FOREACH_SAFE(active_proc, &ctrlr->active_procs, tailq, tmp) {
|
||||
if ((kill(active_proc->pid, 0) == -1) && (errno == ESRCH)) {
|
||||
@ -896,8 +896,8 @@ nvme_ctrlr_remove_inactive_proc(struct spdk_nvme_ctrlr *ctrlr)
|
||||
void
|
||||
nvme_ctrlr_proc_get_ref(struct spdk_nvme_ctrlr *ctrlr)
|
||||
{
|
||||
struct spdk_nvme_controller_process *active_proc;
|
||||
pid_t pid = getpid();
|
||||
struct spdk_nvme_ctrlr_process *active_proc;
|
||||
pid_t pid = getpid();
|
||||
|
||||
pthread_mutex_lock(&ctrlr->ctrlr_lock);
|
||||
|
||||
@ -916,8 +916,8 @@ nvme_ctrlr_proc_get_ref(struct spdk_nvme_ctrlr *ctrlr)
|
||||
void
|
||||
nvme_ctrlr_proc_put_ref(struct spdk_nvme_ctrlr *ctrlr)
|
||||
{
|
||||
struct spdk_nvme_controller_process *active_proc;
|
||||
pid_t pid = getpid();
|
||||
struct spdk_nvme_ctrlr_process *active_proc;
|
||||
pid_t pid = getpid();
|
||||
|
||||
pthread_mutex_lock(&ctrlr->ctrlr_lock);
|
||||
|
||||
@ -937,8 +937,8 @@ nvme_ctrlr_proc_put_ref(struct spdk_nvme_ctrlr *ctrlr)
|
||||
int
|
||||
nvme_ctrlr_get_ref_count(struct spdk_nvme_ctrlr *ctrlr)
|
||||
{
|
||||
struct spdk_nvme_controller_process *active_proc;
|
||||
int ref = 0;
|
||||
struct spdk_nvme_ctrlr_process *active_proc;
|
||||
int ref = 0;
|
||||
|
||||
pthread_mutex_lock(&ctrlr->ctrlr_lock);
|
||||
|
||||
|
@ -297,7 +297,7 @@ enum nvme_ctrlr_state {
|
||||
/*
|
||||
* Used to track properties for all processes accessing the controller.
|
||||
*/
|
||||
struct spdk_nvme_controller_process {
|
||||
struct spdk_nvme_ctrlr_process {
|
||||
/** Whether it is the primary process */
|
||||
bool is_primary;
|
||||
|
||||
@ -307,7 +307,7 @@ struct spdk_nvme_controller_process {
|
||||
/** Active admin requests to be completed */
|
||||
STAILQ_HEAD(, nvme_request) active_reqs;
|
||||
|
||||
TAILQ_ENTRY(spdk_nvme_controller_process) tailq;
|
||||
TAILQ_ENTRY(spdk_nvme_ctrlr_process) tailq;
|
||||
|
||||
/** Per process PCI device handle */
|
||||
struct spdk_pci_device *devhandle;
|
||||
@ -399,7 +399,7 @@ struct spdk_nvme_ctrlr {
|
||||
uint64_t sleep_timeout_tsc;
|
||||
|
||||
/** Track all the processes manage this controller */
|
||||
TAILQ_HEAD(, spdk_nvme_controller_process) active_procs;
|
||||
TAILQ_HEAD(, spdk_nvme_ctrlr_process) active_procs;
|
||||
};
|
||||
|
||||
struct nvme_driver {
|
||||
|
@ -683,10 +683,10 @@ static void
|
||||
nvme_pcie_qpair_insert_pending_admin_request(struct spdk_nvme_qpair *qpair,
|
||||
struct nvme_request *req, struct spdk_nvme_cpl *cpl)
|
||||
{
|
||||
struct spdk_nvme_ctrlr *ctrlr = qpair->ctrlr;
|
||||
struct nvme_request *active_req = req;
|
||||
struct spdk_nvme_controller_process *active_proc, *tmp;
|
||||
bool pending_on_proc = false;
|
||||
struct spdk_nvme_ctrlr *ctrlr = qpair->ctrlr;
|
||||
struct nvme_request *active_req = req;
|
||||
struct spdk_nvme_ctrlr_process *active_proc, *tmp;
|
||||
bool pending_on_proc = false;
|
||||
|
||||
/*
|
||||
* The admin request is from another process. Move to the per
|
||||
@ -725,7 +725,7 @@ nvme_pcie_qpair_complete_pending_admin_request(struct spdk_nvme_qpair *qpair)
|
||||
struct nvme_request *req, *tmp_req;
|
||||
bool proc_found = false;
|
||||
pid_t pid = getpid();
|
||||
struct spdk_nvme_controller_process *proc;
|
||||
struct spdk_nvme_ctrlr_process *proc;
|
||||
|
||||
/*
|
||||
* Check whether there is any pending admin request from
|
||||
|
Loading…
x
Reference in New Issue
Block a user