UBI: rename MOVE_CANCEL_BITFLIPS to MOVE_TARGET_BITFLIPS
While looking at a problem reported by UBI around the PEB moving area I noticed that the 'MOVE_CANCEL_BITFLIPS' is a bit inconsistent name and 'MOVE_TARGET_BITFLIPS' better - let's rename it. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
This commit is contained in:
parent
0ca39d74de
commit
cc831464f8
|
@ -979,7 +979,7 @@ static int is_error_sane(int err)
|
||||||
* physical eraseblock @to. The @vid_hdr buffer may be changed by this
|
* physical eraseblock @to. The @vid_hdr buffer may be changed by this
|
||||||
* function. Returns:
|
* function. Returns:
|
||||||
* o %0 in case of success;
|
* o %0 in case of success;
|
||||||
* o %MOVE_CANCEL_RACE, %MOVE_TARGET_WR_ERR, %MOVE_CANCEL_BITFLIPS, etc;
|
* o %MOVE_CANCEL_RACE, %MOVE_TARGET_WR_ERR, %MOVE_TARGET_BITFLIPS, etc;
|
||||||
* o a negative error code in case of failure.
|
* o a negative error code in case of failure.
|
||||||
*/
|
*/
|
||||||
int ubi_eba_copy_leb(struct ubi_device *ubi, int from, int to,
|
int ubi_eba_copy_leb(struct ubi_device *ubi, int from, int to,
|
||||||
|
@ -1116,7 +1116,7 @@ int ubi_eba_copy_leb(struct ubi_device *ubi, int from, int to,
|
||||||
if (is_error_sane(err))
|
if (is_error_sane(err))
|
||||||
err = MOVE_TARGET_RD_ERR;
|
err = MOVE_TARGET_RD_ERR;
|
||||||
} else
|
} else
|
||||||
err = MOVE_CANCEL_BITFLIPS;
|
err = MOVE_TARGET_BITFLIPS;
|
||||||
goto out_unlock_buf;
|
goto out_unlock_buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1143,7 +1143,7 @@ int ubi_eba_copy_leb(struct ubi_device *ubi, int from, int to,
|
||||||
if (is_error_sane(err))
|
if (is_error_sane(err))
|
||||||
err = MOVE_TARGET_RD_ERR;
|
err = MOVE_TARGET_RD_ERR;
|
||||||
} else
|
} else
|
||||||
err = MOVE_CANCEL_BITFLIPS;
|
err = MOVE_TARGET_BITFLIPS;
|
||||||
goto out_unlock_buf;
|
goto out_unlock_buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -118,7 +118,7 @@ enum {
|
||||||
* PEB
|
* PEB
|
||||||
* MOVE_TARGET_WR_ERR: canceled because there was a write error to the target
|
* MOVE_TARGET_WR_ERR: canceled because there was a write error to the target
|
||||||
* PEB
|
* PEB
|
||||||
* MOVE_CANCEL_BITFLIPS: canceled because a bit-flip was detected in the
|
* MOVE_TARGET_BITFLIPS: canceled because a bit-flip was detected in the
|
||||||
* target PEB
|
* target PEB
|
||||||
* MOVE_RETRY: retry scrubbing the PEB
|
* MOVE_RETRY: retry scrubbing the PEB
|
||||||
*/
|
*/
|
||||||
|
@ -127,7 +127,7 @@ enum {
|
||||||
MOVE_SOURCE_RD_ERR,
|
MOVE_SOURCE_RD_ERR,
|
||||||
MOVE_TARGET_RD_ERR,
|
MOVE_TARGET_RD_ERR,
|
||||||
MOVE_TARGET_WR_ERR,
|
MOVE_TARGET_WR_ERR,
|
||||||
MOVE_CANCEL_BITFLIPS,
|
MOVE_TARGET_BITFLIPS,
|
||||||
MOVE_RETRY,
|
MOVE_RETRY,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -798,7 +798,7 @@ static int wear_leveling_worker(struct ubi_device *ubi, struct ubi_work *wrk,
|
||||||
scrubbing = 1;
|
scrubbing = 1;
|
||||||
goto out_not_moved;
|
goto out_not_moved;
|
||||||
}
|
}
|
||||||
if (err == MOVE_CANCEL_BITFLIPS || err == MOVE_TARGET_WR_ERR ||
|
if (err == MOVE_TARGET_BITFLIPS || err == MOVE_TARGET_WR_ERR ||
|
||||||
err == MOVE_TARGET_RD_ERR) {
|
err == MOVE_TARGET_RD_ERR) {
|
||||||
/*
|
/*
|
||||||
* Target PEB had bit-flips or write error - torture it.
|
* Target PEB had bit-flips or write error - torture it.
|
||||||
|
|
Loading…
Reference in New Issue