Skip to content

Commit

Permalink
Merge pull request #538 from pengliang233/fix_typo
Browse files Browse the repository at this point in the history
fix typo in code
  • Loading branch information
mikechristie authored Mar 6, 2019
2 parents 156ac8a + cb1a378 commit ad95a7f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
14 changes: 7 additions & 7 deletions alua.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,11 @@ tcmu_get_alua_grp(struct tcmu_device *dev, const char *name)
* can manually change states, so report this as
* implicit.
*/
rdev->failover_type = TMCUR_DEV_FAILOVER_ALL_ACTIVE;
rdev->failover_type = TCMUR_DEV_FAILOVER_ALL_ACTIVE;

group->tpgs = TPGS_ALUA_IMPLICIT;
} else if (!strcmp(str_val, "Implicit")) {
rdev->failover_type = TMCUR_DEV_FAILOVER_IMPLICIT;
rdev->failover_type = TCMUR_DEV_FAILOVER_IMPLICIT;

group->tpgs = TPGS_ALUA_IMPLICIT;
} else if (!strcmp(str_val, "Explicit")) {
Expand All @@ -219,7 +219,7 @@ tcmu_get_alua_grp(struct tcmu_device *dev, const char *name)
* We only need implicit enabled in the kernel so we can
* interact with the alua configfs interface.
*/
rdev->failover_type = TMCUR_DEV_FAILOVER_EXPLICIT;
rdev->failover_type = TCMUR_DEV_FAILOVER_EXPLICIT;

group->tpgs = TPGS_ALUA_EXPLICIT;
} else {
Expand Down Expand Up @@ -400,12 +400,12 @@ static int alua_sync_state(struct tcmu_device *dev,
uint8_t alua_state;
int ret;

if (rdev->failover_type == TMCUR_DEV_FAILOVER_IMPLICIT) {
if (rdev->failover_type == TCMUR_DEV_FAILOVER_IMPLICIT) {
tcmu_update_dev_lock_state(dev);
return TCMU_STS_OK;
}

if (rdev->failover_type != TMCUR_DEV_FAILOVER_EXPLICIT ||
if (rdev->failover_type != TCMUR_DEV_FAILOVER_EXPLICIT ||
!rhandler->get_lock_tag)
return TCMU_STS_OK;

Expand Down Expand Up @@ -766,12 +766,12 @@ int alua_check_state(struct tcmu_device *dev, struct tcmulib_cmd *cmd)
{
struct tcmur_device *rdev = tcmu_dev_get_private(dev);

if (rdev->failover_type == TMCUR_DEV_FAILOVER_EXPLICIT) {
if (rdev->failover_type == TCMUR_DEV_FAILOVER_EXPLICIT) {
if (rdev->lock_state != TCMUR_DEV_LOCK_LOCKED) {
tcmu_dev_dbg(dev, "device lock not held.\n");
return TCMU_STS_FENCED;
}
} else if (rdev->failover_type == TMCUR_DEV_FAILOVER_IMPLICIT) {
} else if (rdev->failover_type == TCMUR_DEV_FAILOVER_IMPLICIT) {
return alua_implicit_transition(dev, cmd);
}

Expand Down
2 changes: 1 addition & 1 deletion tcmur_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ int tcmu_get_lock_tag(struct tcmu_device *dev, uint16_t *tag)
struct tcmur_device *rdev = tcmu_dev_get_private(dev);
int retry = 0, ret;

if (rdev->failover_type != TMCUR_DEV_FAILOVER_EXPLICIT)
if (rdev->failover_type != TCMUR_DEV_FAILOVER_EXPLICIT)
return 0;

pthread_mutex_lock(&rdev->state_lock);
Expand Down
6 changes: 3 additions & 3 deletions tcmur_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
#define TCMUR_UA_DEV_SIZE_CHANGED 0

enum {
TMCUR_DEV_FAILOVER_ALL_ACTIVE,
TMCUR_DEV_FAILOVER_IMPLICIT,
TMCUR_DEV_FAILOVER_EXPLICIT,
TCMUR_DEV_FAILOVER_ALL_ACTIVE,
TCMUR_DEV_FAILOVER_IMPLICIT,
TCMUR_DEV_FAILOVER_EXPLICIT,
};

enum {
Expand Down

0 comments on commit ad95a7f

Please sign in to comment.