xfs_trans.c (195cd83d1b8835a2f344ed411b46bba48ddfcc49) xfs_trans.c (ddf92053e45c0e07dcb031b56512d52f98cde517)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc.
4 * Copyright (C) 2010 Red Hat, Inc.
5 * All Rights Reserved.
6 */
7#include "xfs.h"
8#include "xfs_fs.h"

--- 766 unchanged lines hidden (view full) ---

775 struct xfs_log_item *lip, *next;
776
777 trace_xfs_trans_free_items(tp, _RET_IP_);
778
779 list_for_each_entry_safe(lip, next, &tp->t_items, li_trans) {
780 xfs_trans_del_item(lip);
781 if (abort)
782 set_bit(XFS_LI_ABORTED, &lip->li_flags);
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc.
4 * Copyright (C) 2010 Red Hat, Inc.
5 * All Rights Reserved.
6 */
7#include "xfs.h"
8#include "xfs_fs.h"

--- 766 unchanged lines hidden (view full) ---

775 struct xfs_log_item *lip, *next;
776
777 trace_xfs_trans_free_items(tp, _RET_IP_);
778
779 list_for_each_entry_safe(lip, next, &tp->t_items, li_trans) {
780 xfs_trans_del_item(lip);
781 if (abort)
782 set_bit(XFS_LI_ABORTED, &lip->li_flags);
783
784 if (lip->li_ops->iop_unlock)
785 lip->li_ops->iop_unlock(lip);
783 if (lip->li_ops->iop_release)
784 lip->li_ops->iop_release(lip);
786 }
787}
788
789static inline void
790xfs_log_item_batch_insert(
791 struct xfs_ail *ailp,
792 struct xfs_ail_cursor *cur,
793 struct xfs_log_item **log_items,

--- 16 unchanged lines hidden (view full) ---

810
811/*
812 * Bulk operation version of xfs_trans_committed that takes a log vector of
813 * items to insert into the AIL. This uses bulk AIL insertion techniques to
814 * minimise lock traffic.
815 *
816 * If we are called with the aborted flag set, it is because a log write during
817 * a CIL checkpoint commit has failed. In this case, all the items in the
785 }
786}
787
788static inline void
789xfs_log_item_batch_insert(
790 struct xfs_ail *ailp,
791 struct xfs_ail_cursor *cur,
792 struct xfs_log_item **log_items,

--- 16 unchanged lines hidden (view full) ---

809
810/*
811 * Bulk operation version of xfs_trans_committed that takes a log vector of
812 * items to insert into the AIL. This uses bulk AIL insertion techniques to
813 * minimise lock traffic.
814 *
815 * If we are called with the aborted flag set, it is because a log write during
816 * a CIL checkpoint commit has failed. In this case, all the items in the
818 * checkpoint have already gone through iop_committed and iop_unlock, which
817 * checkpoint have already gone through iop_committed and iop_committing, which
819 * means that checkpoint commit abort handling is treated exactly the same
820 * as an iclog write error even though we haven't started any IO yet. Hence in
821 * this case all we need to do is iop_committed processing, followed by an
822 * iop_unpin(aborted) call.
823 *
824 * The AIL cursor is used to optimise the insert process. If commit_lsn is not
825 * at the end of the AIL, the insert cursor avoids the need to walk
826 * the AIL to find the insertion point on every xfs_log_item_batch_insert()

--- 292 unchanged lines hidden ---
818 * means that checkpoint commit abort handling is treated exactly the same
819 * as an iclog write error even though we haven't started any IO yet. Hence in
820 * this case all we need to do is iop_committed processing, followed by an
821 * iop_unpin(aborted) call.
822 *
823 * The AIL cursor is used to optimise the insert process. If commit_lsn is not
824 * at the end of the AIL, the insert cursor avoids the need to walk
825 * the AIL to find the insertion point on every xfs_log_item_batch_insert()

--- 292 unchanged lines hidden ---