Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d15cbf2f authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Darrick J. Wong
Browse files

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: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarBrian Foster <bfoster@redhat.com>
Reviewed-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
parent 086252c3
Loading
Loading
Loading
Loading
+11 −14
Original line number Diff line number Diff line
@@ -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,8 +2881,8 @@ 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;

@@ -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
	{
+1 −1
Original line number Diff line number Diff line
@@ -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;

+2 −2
Original line number Diff line number Diff line
@@ -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;
}

+1 −1
Original line number Diff line number Diff line
@@ -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];
+1 −1
Original line number Diff line number Diff line
@@ -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.
 *