提交 d15cbf2f 编写于 作者: C Christoph Hellwig 提交者: Darrick J. Wong

xfs: stop using XFS_LI_ABORTED as a parameter flag

Just pass a straight bool aborted instead of abusing XFS_LI_ABORTED as a
flag in function parameters.
Signed-off-by: NChristoph Hellwig <hch@lst.de>
Reviewed-by: NBrian Foster <bfoster@redhat.com>
Reviewed-by: NDarrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: NDarrick J. Wong <darrick.wong@oracle.com>
上级 086252c3
......@@ -50,12 +50,9 @@ xlog_dealloc_log(
struct xlog *log);
/* local state machine functions */
STATIC void xlog_state_done_syncing(xlog_in_core_t *iclog, int);
STATIC void
xlog_state_do_callback(
struct xlog *log,
int aborted,
struct xlog_in_core *iclog);
STATIC void xlog_state_done_syncing(
struct xlog_in_core *iclog,
bool aborted);
STATIC int
xlog_state_get_iclog_space(
struct xlog *log,
......@@ -1246,7 +1243,7 @@ xlog_ioend_work(
struct xlog_in_core *iclog =
container_of(work, struct xlog_in_core, ic_end_io_work);
struct xlog *log = iclog->ic_log;
int aborted = 0;
bool aborted = false;
int error;
error = blk_status_to_errno(iclog->ic_bio.bi_status);
......@@ -1267,9 +1264,9 @@ xlog_ioend_work(
* callback routines to let them know that the log-commit
* didn't succeed.
*/
aborted = XFS_LI_ABORTED;
aborted = true;
} else if (iclog->ic_state & XLOG_STATE_IOERROR) {
aborted = XFS_LI_ABORTED;
aborted = true;
}
xlog_state_done_syncing(iclog, aborted);
......@@ -2645,7 +2642,7 @@ xlog_get_lowest_lsn(
STATIC void
xlog_state_do_callback(
struct xlog *log,
int aborted,
bool aborted,
struct xlog_in_core *ciclog)
{
xlog_in_core_t *iclog;
......@@ -2884,10 +2881,10 @@ xlog_state_do_callback(
*/
STATIC void
xlog_state_done_syncing(
xlog_in_core_t *iclog,
int aborted)
struct xlog_in_core *iclog,
bool aborted)
{
struct xlog *log = iclog->ic_log;
struct xlog *log = iclog->ic_log;
spin_lock(&log->l_icloglock);
......@@ -3966,7 +3963,7 @@ xfs_log_force_umount(
* avoid races.
*/
wake_up_all(&log->l_cilp->xc_commit_wait);
xlog_state_do_callback(log, XFS_LI_ABORTED, NULL);
xlog_state_do_callback(log, true, NULL);
#ifdef XFSERRORDEBUG
{
......
......@@ -77,7 +77,7 @@ xlog_copy_iovec(struct xfs_log_vec *lv, struct xfs_log_iovec **vecp,
*/
typedef struct xfs_log_callback {
struct xfs_log_callback *cb_next;
void (*cb_func)(void *, int);
void (*cb_func)(void *, bool);
void *cb_arg;
} xfs_log_callback_t;
......
......@@ -577,7 +577,7 @@ xlog_discard_busy_extents(
static void
xlog_cil_committed(
void *args,
int abort)
bool abort)
{
struct xfs_cil_ctx *ctx = args;
struct xfs_mount *mp = ctx->cil->xc_log->l_mp;
......@@ -864,7 +864,7 @@ xlog_cil_push(
out_abort_free_ticket:
xfs_log_ticket_put(tic);
out_abort:
xlog_cil_committed(ctx, XFS_LI_ABORTED);
xlog_cil_committed(ctx, true);
return -EIO;
}
......
......@@ -833,7 +833,7 @@ xfs_trans_committed_bulk(
struct xfs_ail *ailp,
struct xfs_log_vec *log_vector,
xfs_lsn_t commit_lsn,
int aborted)
bool aborted)
{
#define LOG_ITEM_BATCH_SIZE 32
struct xfs_log_item *log_items[LOG_ITEM_BATCH_SIZE];
......
......@@ -21,7 +21,7 @@ void xfs_trans_free_items(struct xfs_trans *tp, xfs_lsn_t commit_lsn,
void xfs_trans_unreserve_and_mod_sb(struct xfs_trans *tp);
void xfs_trans_committed_bulk(struct xfs_ail *ailp, struct xfs_log_vec *lv,
xfs_lsn_t commit_lsn, int aborted);
xfs_lsn_t commit_lsn, bool aborted);
/*
* AIL traversal cursor.
*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册