aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_extfree_item.c
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@sandeen.net>2006-09-27 21:02:44 -0400
committerTim Shimmin <tes@sgi.com>2006-09-27 21:02:44 -0400
commit065d312e15902976d256ddaf396a7950ec0350a8 (patch)
tree3bb473ec8f6d6dd8abc551ac52692d9e68d1721b /fs/xfs/xfs_extfree_item.c
parent43129c16e85119355d352e10ff4b30a08053228c (diff)
[XFS] Remove unused iop_abort log item operation
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>
Diffstat (limited to 'fs/xfs/xfs_extfree_item.c')
-rw-r--r--fs/xfs/xfs_extfree_item.c69
1 files changed, 2 insertions, 67 deletions
diff --git a/fs/xfs/xfs_extfree_item.c b/fs/xfs/xfs_extfree_item.c
index 6cf6d8769b97..6dba78199faf 100644
--- a/fs/xfs/xfs_extfree_item.c
+++ b/fs/xfs/xfs_extfree_item.c
@@ -33,9 +33,6 @@ kmem_zone_t *xfs_efi_zone;
33kmem_zone_t *xfs_efd_zone; 33kmem_zone_t *xfs_efd_zone;
34 34
35STATIC void xfs_efi_item_unlock(xfs_efi_log_item_t *); 35STATIC void xfs_efi_item_unlock(xfs_efi_log_item_t *);
36STATIC void xfs_efi_item_abort(xfs_efi_log_item_t *);
37STATIC void xfs_efd_item_abort(xfs_efd_log_item_t *);
38
39 36
40void 37void
41xfs_efi_item_free(xfs_efi_log_item_t *efip) 38xfs_efi_item_free(xfs_efi_log_item_t *efip)
@@ -184,7 +181,7 @@ STATIC void
184xfs_efi_item_unlock(xfs_efi_log_item_t *efip) 181xfs_efi_item_unlock(xfs_efi_log_item_t *efip)
185{ 182{
186 if (efip->efi_item.li_flags & XFS_LI_ABORTED) 183 if (efip->efi_item.li_flags & XFS_LI_ABORTED)
187 xfs_efi_item_abort(efip); 184 xfs_efi_item_free(efip);
188 return; 185 return;
189} 186}
190 187
@@ -202,18 +199,6 @@ xfs_efi_item_committed(xfs_efi_log_item_t *efip, xfs_lsn_t lsn)
202} 199}
203 200
204/* 201/*
205 * This is called when the transaction logging the EFI is aborted.
206 * Free up the EFI and return. No need to clean up the slot for
207 * the item in the transaction. That was done by the unpin code
208 * which is called prior to this routine in the abort/fs-shutdown path.
209 */
210STATIC void
211xfs_efi_item_abort(xfs_efi_log_item_t *efip)
212{
213 xfs_efi_item_free(efip);
214}
215
216/*
217 * There isn't much you can do to push on an efi item. It is simply 202 * There isn't much you can do to push on an efi item. It is simply
218 * stuck waiting for all of its corresponding efd items to be 203 * stuck waiting for all of its corresponding efd items to be
219 * committed to disk. 204 * committed to disk.
@@ -255,7 +240,6 @@ STATIC struct xfs_item_ops xfs_efi_item_ops = {
255 .iop_committed = (xfs_lsn_t(*)(xfs_log_item_t*, xfs_lsn_t)) 240 .iop_committed = (xfs_lsn_t(*)(xfs_log_item_t*, xfs_lsn_t))
256 xfs_efi_item_committed, 241 xfs_efi_item_committed,
257 .iop_push = (void(*)(xfs_log_item_t*))xfs_efi_item_push, 242 .iop_push = (void(*)(xfs_log_item_t*))xfs_efi_item_push,
258 .iop_abort = (void(*)(xfs_log_item_t*))xfs_efi_item_abort,
259 .iop_pushbuf = NULL, 243 .iop_pushbuf = NULL,
260 .iop_committing = (void(*)(xfs_log_item_t*, xfs_lsn_t)) 244 .iop_committing = (void(*)(xfs_log_item_t*, xfs_lsn_t))
261 xfs_efi_item_committing 245 xfs_efi_item_committing
@@ -386,33 +370,6 @@ xfs_efi_release(xfs_efi_log_item_t *efip,
386 } 370 }
387} 371}
388 372
389/*
390 * This is called when the transaction that should be committing the
391 * EFD corresponding to the given EFI is aborted. The committed and
392 * canceled flags are used to coordinate the freeing of the EFI and
393 * the references by the transaction that committed it.
394 */
395STATIC void
396xfs_efi_cancel(
397 xfs_efi_log_item_t *efip)
398{
399 xfs_mount_t *mp;
400 SPLDECL(s);
401
402 mp = efip->efi_item.li_mountp;
403 AIL_LOCK(mp, s);
404 if (efip->efi_flags & XFS_EFI_COMMITTED) {
405 /*
406 * xfs_trans_delete_ail() drops the AIL lock.
407 */
408 xfs_trans_delete_ail(mp, (xfs_log_item_t *)efip, s);
409 xfs_efi_item_free(efip);
410 } else {
411 efip->efi_flags |= XFS_EFI_CANCELED;
412 AIL_UNLOCK(mp, s);
413 }
414}
415
416STATIC void 373STATIC void
417xfs_efd_item_free(xfs_efd_log_item_t *efdp) 374xfs_efd_item_free(xfs_efd_log_item_t *efdp)
418{ 375{
@@ -514,7 +471,7 @@ STATIC void
514xfs_efd_item_unlock(xfs_efd_log_item_t *efdp) 471xfs_efd_item_unlock(xfs_efd_log_item_t *efdp)
515{ 472{
516 if (efdp->efd_item.li_flags & XFS_LI_ABORTED) 473 if (efdp->efd_item.li_flags & XFS_LI_ABORTED)
517 xfs_efd_item_abort(efdp); 474 xfs_efd_item_free(efdp);
518 return; 475 return;
519} 476}
520 477
@@ -541,27 +498,6 @@ xfs_efd_item_committed(xfs_efd_log_item_t *efdp, xfs_lsn_t lsn)
541} 498}
542 499
543/* 500/*
544 * The transaction of which this EFD is a part has been aborted.
545 * Inform its companion EFI of this fact and then clean up after
546 * ourselves. No need to clean up the slot for the item in the
547 * transaction. That was done by the unpin code which is called
548 * prior to this routine in the abort/fs-shutdown path.
549 */
550STATIC void
551xfs_efd_item_abort(xfs_efd_log_item_t *efdp)
552{
553 /*
554 * If we got a log I/O error, it's always the case that the LR with the
555 * EFI got unpinned and freed before the EFD got aborted. So don't
556 * reference the EFI at all in that case.
557 */
558 if ((efdp->efd_item.li_flags & XFS_LI_ABORTED) == 0)
559 xfs_efi_cancel(efdp->efd_efip);
560
561 xfs_efd_item_free(efdp);
562}
563
564/*
565 * There isn't much you can do to push on an efd item. It is simply 501 * There isn't much you can do to push on an efd item. It is simply
566 * stuck waiting for the log to be flushed to disk. 502 * stuck waiting for the log to be flushed to disk.
567 */ 503 */
@@ -602,7 +538,6 @@ STATIC struct xfs_item_ops xfs_efd_item_ops = {
602 .iop_committed = (xfs_lsn_t(*)(xfs_log_item_t*, xfs_lsn_t)) 538 .iop_committed = (xfs_lsn_t(*)(xfs_log_item_t*, xfs_lsn_t))
603 xfs_efd_item_committed, 539 xfs_efd_item_committed,
604 .iop_push = (void(*)(xfs_log_item_t*))xfs_efd_item_push, 540 .iop_push = (void(*)(xfs_log_item_t*))xfs_efd_item_push,
605 .iop_abort = (void(*)(xfs_log_item_t*))xfs_efd_item_abort,
606 .iop_pushbuf = NULL, 541 .iop_pushbuf = NULL,
607 .iop_committing = (void(*)(xfs_log_item_t*, xfs_lsn_t)) 542 .iop_committing = (void(*)(xfs_log_item_t*, xfs_lsn_t))
608 xfs_efd_item_committing 543 xfs_efd_item_committing