Skip to content

Commit

Permalink
[XFS] Remove unused iop_abort log item operation
Browse files Browse the repository at this point in the history
SGI-PV: 955302
SGI-Modid: xfs-linux-melb:xfs-kern:26747a

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: Nathan Scott <nathans@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
  • Loading branch information
Eric Sandeen authored and Tim Shimmin committed Sep 28, 2006
1 parent 43129c1 commit 065d312
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 131 deletions.
26 changes: 0 additions & 26 deletions fs/xfs/quota/xfs_dquot_item.c
Original file line number Diff line number Diff line change
Expand Up @@ -381,18 +381,6 @@ xfs_qm_dquot_logitem_unlock(
}


/*
* The transaction with the dquot locked has aborted. The dquot
* must not be dirty within the transaction. We simply unlock just
* as if the transaction had been cancelled.
*/
STATIC void
xfs_qm_dquot_logitem_abort(
xfs_dq_logitem_t *ql)
{
xfs_qm_dquot_logitem_unlock(ql);
}

/*
* this needs to stamp an lsn into the dquot, I think.
* rpc's that look at user dquot's would then have to
Expand Down Expand Up @@ -426,7 +414,6 @@ STATIC struct xfs_item_ops xfs_dquot_item_ops = {
.iop_committed = (xfs_lsn_t(*)(xfs_log_item_t*, xfs_lsn_t))
xfs_qm_dquot_logitem_committed,
.iop_push = (void(*)(xfs_log_item_t*))xfs_qm_dquot_logitem_push,
.iop_abort = (void(*)(xfs_log_item_t*))xfs_qm_dquot_logitem_abort,
.iop_pushbuf = (void(*)(xfs_log_item_t*))
xfs_qm_dquot_logitem_pushbuf,
.iop_committing = (void(*)(xfs_log_item_t*, xfs_lsn_t))
Expand Down Expand Up @@ -558,17 +545,6 @@ xfs_qm_qoff_logitem_committed(xfs_qoff_logitem_t *qf, xfs_lsn_t lsn)
return (lsn);
}

/*
* The transaction of which this QUOTAOFF is a part has been aborted.
* Just clean up after ourselves.
* Shouldn't this never happen in the case of qoffend logitems? XXX
*/
STATIC void
xfs_qm_qoff_logitem_abort(xfs_qoff_logitem_t *qf)
{
kmem_free(qf, sizeof(xfs_qoff_logitem_t));
}

/*
* There isn't much you can do to push on an quotaoff item. It is simply
* stuck waiting for the log to be flushed to disk.
Expand Down Expand Up @@ -644,7 +620,6 @@ STATIC struct xfs_item_ops xfs_qm_qoffend_logitem_ops = {
.iop_committed = (xfs_lsn_t(*)(xfs_log_item_t*, xfs_lsn_t))
xfs_qm_qoffend_logitem_committed,
.iop_push = (void(*)(xfs_log_item_t*))xfs_qm_qoff_logitem_push,
.iop_abort = (void(*)(xfs_log_item_t*))xfs_qm_qoff_logitem_abort,
.iop_pushbuf = NULL,
.iop_committing = (void(*)(xfs_log_item_t*, xfs_lsn_t))
xfs_qm_qoffend_logitem_committing
Expand All @@ -667,7 +642,6 @@ STATIC struct xfs_item_ops xfs_qm_qoff_logitem_ops = {
.iop_committed = (xfs_lsn_t(*)(xfs_log_item_t*, xfs_lsn_t))
xfs_qm_qoff_logitem_committed,
.iop_push = (void(*)(xfs_log_item_t*))xfs_qm_qoff_logitem_push,
.iop_abort = (void(*)(xfs_log_item_t*))xfs_qm_qoff_logitem_abort,
.iop_pushbuf = NULL,
.iop_committing = (void(*)(xfs_log_item_t*, xfs_lsn_t))
xfs_qm_qoff_logitem_committing
Expand Down
20 changes: 0 additions & 20 deletions fs/xfs/xfs_buf_item.c
Original file line number Diff line number Diff line change
Expand Up @@ -626,25 +626,6 @@ xfs_buf_item_committed(
return (lsn);
}

/*
* This is called when the transaction holding the buffer is aborted.
* Just behave as if the transaction had been cancelled. If we're shutting down
* and have aborted this transaction, we'll trap this buffer when it tries to
* get written out.
*/
STATIC void
xfs_buf_item_abort(
xfs_buf_log_item_t *bip)
{
xfs_buf_t *bp;

bp = bip->bli_buf;
xfs_buftrace("XFS_ABORT", bp);
XFS_BUF_SUPER_STALE(bp);
xfs_buf_item_unlock(bip);
return;
}

/*
* This is called to asynchronously write the buffer associated with this
* buf log item out to disk. The buffer will already have been locked by
Expand Down Expand Up @@ -692,7 +673,6 @@ STATIC struct xfs_item_ops xfs_buf_item_ops = {
.iop_committed = (xfs_lsn_t(*)(xfs_log_item_t*, xfs_lsn_t))
xfs_buf_item_committed,
.iop_push = (void(*)(xfs_log_item_t*))xfs_buf_item_push,
.iop_abort = (void(*)(xfs_log_item_t*))xfs_buf_item_abort,
.iop_pushbuf = NULL,
.iop_committing = (void(*)(xfs_log_item_t*, xfs_lsn_t))
xfs_buf_item_committing
Expand Down
69 changes: 2 additions & 67 deletions fs/xfs/xfs_extfree_item.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ kmem_zone_t *xfs_efi_zone;
kmem_zone_t *xfs_efd_zone;

STATIC void xfs_efi_item_unlock(xfs_efi_log_item_t *);
STATIC void xfs_efi_item_abort(xfs_efi_log_item_t *);
STATIC void xfs_efd_item_abort(xfs_efd_log_item_t *);


void
xfs_efi_item_free(xfs_efi_log_item_t *efip)
Expand Down Expand Up @@ -184,7 +181,7 @@ STATIC void
xfs_efi_item_unlock(xfs_efi_log_item_t *efip)
{
if (efip->efi_item.li_flags & XFS_LI_ABORTED)
xfs_efi_item_abort(efip);
xfs_efi_item_free(efip);
return;
}

Expand All @@ -201,18 +198,6 @@ xfs_efi_item_committed(xfs_efi_log_item_t *efip, xfs_lsn_t lsn)
return lsn;
}

/*
* This is called when the transaction logging the EFI is aborted.
* Free up the EFI and return. No need to clean up the slot for
* the item in the transaction. That was done by the unpin code
* which is called prior to this routine in the abort/fs-shutdown path.
*/
STATIC void
xfs_efi_item_abort(xfs_efi_log_item_t *efip)
{
xfs_efi_item_free(efip);
}

/*
* There isn't much you can do to push on an efi item. It is simply
* stuck waiting for all of its corresponding efd items to be
Expand Down Expand Up @@ -255,7 +240,6 @@ STATIC struct xfs_item_ops xfs_efi_item_ops = {
.iop_committed = (xfs_lsn_t(*)(xfs_log_item_t*, xfs_lsn_t))
xfs_efi_item_committed,
.iop_push = (void(*)(xfs_log_item_t*))xfs_efi_item_push,
.iop_abort = (void(*)(xfs_log_item_t*))xfs_efi_item_abort,
.iop_pushbuf = NULL,
.iop_committing = (void(*)(xfs_log_item_t*, xfs_lsn_t))
xfs_efi_item_committing
Expand Down Expand Up @@ -386,33 +370,6 @@ xfs_efi_release(xfs_efi_log_item_t *efip,
}
}

/*
* This is called when the transaction that should be committing the
* EFD corresponding to the given EFI is aborted. The committed and
* canceled flags are used to coordinate the freeing of the EFI and
* the references by the transaction that committed it.
*/
STATIC void
xfs_efi_cancel(
xfs_efi_log_item_t *efip)
{
xfs_mount_t *mp;
SPLDECL(s);

mp = efip->efi_item.li_mountp;
AIL_LOCK(mp, s);
if (efip->efi_flags & XFS_EFI_COMMITTED) {
/*
* xfs_trans_delete_ail() drops the AIL lock.
*/
xfs_trans_delete_ail(mp, (xfs_log_item_t *)efip, s);
xfs_efi_item_free(efip);
} else {
efip->efi_flags |= XFS_EFI_CANCELED;
AIL_UNLOCK(mp, s);
}
}

STATIC void
xfs_efd_item_free(xfs_efd_log_item_t *efdp)
{
Expand Down Expand Up @@ -514,7 +471,7 @@ STATIC void
xfs_efd_item_unlock(xfs_efd_log_item_t *efdp)
{
if (efdp->efd_item.li_flags & XFS_LI_ABORTED)
xfs_efd_item_abort(efdp);
xfs_efd_item_free(efdp);
return;
}

Expand All @@ -540,27 +497,6 @@ xfs_efd_item_committed(xfs_efd_log_item_t *efdp, xfs_lsn_t lsn)
return (xfs_lsn_t)-1;
}

/*
* The transaction of which this EFD is a part has been aborted.
* Inform its companion EFI of this fact and then clean up after
* ourselves. No need to clean up the slot for the item in the
* transaction. That was done by the unpin code which is called
* prior to this routine in the abort/fs-shutdown path.
*/
STATIC void
xfs_efd_item_abort(xfs_efd_log_item_t *efdp)
{
/*
* If we got a log I/O error, it's always the case that the LR with the
* EFI got unpinned and freed before the EFD got aborted. So don't
* reference the EFI at all in that case.
*/
if ((efdp->efd_item.li_flags & XFS_LI_ABORTED) == 0)
xfs_efi_cancel(efdp->efd_efip);

xfs_efd_item_free(efdp);
}

/*
* There isn't much you can do to push on an efd item. It is simply
* stuck waiting for the log to be flushed to disk.
Expand Down Expand Up @@ -602,7 +538,6 @@ STATIC struct xfs_item_ops xfs_efd_item_ops = {
.iop_committed = (xfs_lsn_t(*)(xfs_log_item_t*, xfs_lsn_t))
xfs_efd_item_committed,
.iop_push = (void(*)(xfs_log_item_t*))xfs_efd_item_push,
.iop_abort = (void(*)(xfs_log_item_t*))xfs_efd_item_abort,
.iop_pushbuf = NULL,
.iop_committing = (void(*)(xfs_log_item_t*, xfs_lsn_t))
xfs_efd_item_committing
Expand Down
16 changes: 0 additions & 16 deletions fs/xfs/xfs_inode_item.c
Original file line number Diff line number Diff line change
Expand Up @@ -742,21 +742,6 @@ xfs_inode_item_committed(
return (lsn);
}

/*
* The transaction with the inode locked has aborted. The inode
* must not be dirty within the transaction (unless we're forcibly
* shutting down). We simply unlock just as if the transaction
* had been cancelled.
*/
STATIC void
xfs_inode_item_abort(
xfs_inode_log_item_t *iip)
{
xfs_inode_item_unlock(iip);
return;
}


/*
* This gets called by xfs_trans_push_ail(), when IOP_TRYLOCK
* failed to get the inode flush lock but did get the inode locked SHARED.
Expand Down Expand Up @@ -915,7 +900,6 @@ STATIC struct xfs_item_ops xfs_inode_item_ops = {
.iop_committed = (xfs_lsn_t(*)(xfs_log_item_t*, xfs_lsn_t))
xfs_inode_item_committed,
.iop_push = (void(*)(xfs_log_item_t*))xfs_inode_item_push,
.iop_abort = (void(*)(xfs_log_item_t*))xfs_inode_item_abort,
.iop_pushbuf = (void(*)(xfs_log_item_t*))xfs_inode_item_pushbuf,
.iop_committing = (void(*)(xfs_log_item_t*, xfs_lsn_t))
xfs_inode_item_committing
Expand Down
2 changes: 0 additions & 2 deletions fs/xfs/xfs_trans.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ typedef struct xfs_item_ops {
void (*iop_unlock)(xfs_log_item_t *);
xfs_lsn_t (*iop_committed)(xfs_log_item_t *, xfs_lsn_t);
void (*iop_push)(xfs_log_item_t *);
void (*iop_abort)(xfs_log_item_t *);
void (*iop_pushbuf)(xfs_log_item_t *);
void (*iop_committing)(xfs_log_item_t *, xfs_lsn_t);
} xfs_item_ops_t;
Expand All @@ -163,7 +162,6 @@ typedef struct xfs_item_ops {
#define IOP_UNLOCK(ip) (*(ip)->li_ops->iop_unlock)(ip)
#define IOP_COMMITTED(ip, lsn) (*(ip)->li_ops->iop_committed)(ip, lsn)
#define IOP_PUSH(ip) (*(ip)->li_ops->iop_push)(ip)
#define IOP_ABORT(ip) (*(ip)->li_ops->iop_abort)(ip)
#define IOP_PUSHBUF(ip) (*(ip)->li_ops->iop_pushbuf)(ip)
#define IOP_COMMITTING(ip, lsn) (*(ip)->li_ops->iop_committing)(ip, lsn)

Expand Down

0 comments on commit 065d312

Please sign in to comment.