diff options
author | Eric Sandeen <sandeen@sandeen.net> | 2006-09-27 21:02:44 -0400 |
---|---|---|
committer | Tim Shimmin <tes@sgi.com> | 2006-09-27 21:02:44 -0400 |
commit | 065d312e15902976d256ddaf396a7950ec0350a8 (patch) | |
tree | 3bb473ec8f6d6dd8abc551ac52692d9e68d1721b | |
parent | 43129c16e85119355d352e10ff4b30a08053228c (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>
-rw-r--r-- | fs/xfs/quota/xfs_dquot_item.c | 26 | ||||
-rw-r--r-- | fs/xfs/xfs_buf_item.c | 20 | ||||
-rw-r--r-- | fs/xfs/xfs_extfree_item.c | 69 | ||||
-rw-r--r-- | fs/xfs/xfs_inode_item.c | 16 | ||||
-rw-r--r-- | fs/xfs/xfs_trans.h | 2 |
5 files changed, 2 insertions, 131 deletions
diff --git a/fs/xfs/quota/xfs_dquot_item.c b/fs/xfs/quota/xfs_dquot_item.c index 5b2dcc58b244..33ad5af386e0 100644 --- a/fs/xfs/quota/xfs_dquot_item.c +++ b/fs/xfs/quota/xfs_dquot_item.c | |||
@@ -382,18 +382,6 @@ xfs_qm_dquot_logitem_unlock( | |||
382 | 382 | ||
383 | 383 | ||
384 | /* | 384 | /* |
385 | * The transaction with the dquot locked has aborted. The dquot | ||
386 | * must not be dirty within the transaction. We simply unlock just | ||
387 | * as if the transaction had been cancelled. | ||
388 | */ | ||
389 | STATIC void | ||
390 | xfs_qm_dquot_logitem_abort( | ||
391 | xfs_dq_logitem_t *ql) | ||
392 | { | ||
393 | xfs_qm_dquot_logitem_unlock(ql); | ||
394 | } | ||
395 | |||
396 | /* | ||
397 | * this needs to stamp an lsn into the dquot, I think. | 385 | * this needs to stamp an lsn into the dquot, I think. |
398 | * rpc's that look at user dquot's would then have to | 386 | * rpc's that look at user dquot's would then have to |
399 | * push on the dependency recorded in the dquot | 387 | * push on the dependency recorded in the dquot |
@@ -426,7 +414,6 @@ STATIC struct xfs_item_ops xfs_dquot_item_ops = { | |||
426 | .iop_committed = (xfs_lsn_t(*)(xfs_log_item_t*, xfs_lsn_t)) | 414 | .iop_committed = (xfs_lsn_t(*)(xfs_log_item_t*, xfs_lsn_t)) |
427 | xfs_qm_dquot_logitem_committed, | 415 | xfs_qm_dquot_logitem_committed, |
428 | .iop_push = (void(*)(xfs_log_item_t*))xfs_qm_dquot_logitem_push, | 416 | .iop_push = (void(*)(xfs_log_item_t*))xfs_qm_dquot_logitem_push, |
429 | .iop_abort = (void(*)(xfs_log_item_t*))xfs_qm_dquot_logitem_abort, | ||
430 | .iop_pushbuf = (void(*)(xfs_log_item_t*)) | 417 | .iop_pushbuf = (void(*)(xfs_log_item_t*)) |
431 | xfs_qm_dquot_logitem_pushbuf, | 418 | xfs_qm_dquot_logitem_pushbuf, |
432 | .iop_committing = (void(*)(xfs_log_item_t*, xfs_lsn_t)) | 419 | .iop_committing = (void(*)(xfs_log_item_t*, xfs_lsn_t)) |
@@ -559,17 +546,6 @@ xfs_qm_qoff_logitem_committed(xfs_qoff_logitem_t *qf, xfs_lsn_t lsn) | |||
559 | } | 546 | } |
560 | 547 | ||
561 | /* | 548 | /* |
562 | * The transaction of which this QUOTAOFF is a part has been aborted. | ||
563 | * Just clean up after ourselves. | ||
564 | * Shouldn't this never happen in the case of qoffend logitems? XXX | ||
565 | */ | ||
566 | STATIC void | ||
567 | xfs_qm_qoff_logitem_abort(xfs_qoff_logitem_t *qf) | ||
568 | { | ||
569 | kmem_free(qf, sizeof(xfs_qoff_logitem_t)); | ||
570 | } | ||
571 | |||
572 | /* | ||
573 | * There isn't much you can do to push on an quotaoff item. It is simply | 549 | * There isn't much you can do to push on an quotaoff item. It is simply |
574 | * stuck waiting for the log to be flushed to disk. | 550 | * stuck waiting for the log to be flushed to disk. |
575 | */ | 551 | */ |
@@ -644,7 +620,6 @@ STATIC struct xfs_item_ops xfs_qm_qoffend_logitem_ops = { | |||
644 | .iop_committed = (xfs_lsn_t(*)(xfs_log_item_t*, xfs_lsn_t)) | 620 | .iop_committed = (xfs_lsn_t(*)(xfs_log_item_t*, xfs_lsn_t)) |
645 | xfs_qm_qoffend_logitem_committed, | 621 | xfs_qm_qoffend_logitem_committed, |
646 | .iop_push = (void(*)(xfs_log_item_t*))xfs_qm_qoff_logitem_push, | 622 | .iop_push = (void(*)(xfs_log_item_t*))xfs_qm_qoff_logitem_push, |
647 | .iop_abort = (void(*)(xfs_log_item_t*))xfs_qm_qoff_logitem_abort, | ||
648 | .iop_pushbuf = NULL, | 623 | .iop_pushbuf = NULL, |
649 | .iop_committing = (void(*)(xfs_log_item_t*, xfs_lsn_t)) | 624 | .iop_committing = (void(*)(xfs_log_item_t*, xfs_lsn_t)) |
650 | xfs_qm_qoffend_logitem_committing | 625 | xfs_qm_qoffend_logitem_committing |
@@ -667,7 +642,6 @@ STATIC struct xfs_item_ops xfs_qm_qoff_logitem_ops = { | |||
667 | .iop_committed = (xfs_lsn_t(*)(xfs_log_item_t*, xfs_lsn_t)) | 642 | .iop_committed = (xfs_lsn_t(*)(xfs_log_item_t*, xfs_lsn_t)) |
668 | xfs_qm_qoff_logitem_committed, | 643 | xfs_qm_qoff_logitem_committed, |
669 | .iop_push = (void(*)(xfs_log_item_t*))xfs_qm_qoff_logitem_push, | 644 | .iop_push = (void(*)(xfs_log_item_t*))xfs_qm_qoff_logitem_push, |
670 | .iop_abort = (void(*)(xfs_log_item_t*))xfs_qm_qoff_logitem_abort, | ||
671 | .iop_pushbuf = NULL, | 645 | .iop_pushbuf = NULL, |
672 | .iop_committing = (void(*)(xfs_log_item_t*, xfs_lsn_t)) | 646 | .iop_committing = (void(*)(xfs_log_item_t*, xfs_lsn_t)) |
673 | xfs_qm_qoff_logitem_committing | 647 | xfs_qm_qoff_logitem_committing |
diff --git a/fs/xfs/xfs_buf_item.c b/fs/xfs/xfs_buf_item.c index 4597381b8ff9..7a55c248ea70 100644 --- a/fs/xfs/xfs_buf_item.c +++ b/fs/xfs/xfs_buf_item.c | |||
@@ -627,25 +627,6 @@ xfs_buf_item_committed( | |||
627 | } | 627 | } |
628 | 628 | ||
629 | /* | 629 | /* |
630 | * This is called when the transaction holding the buffer is aborted. | ||
631 | * Just behave as if the transaction had been cancelled. If we're shutting down | ||
632 | * and have aborted this transaction, we'll trap this buffer when it tries to | ||
633 | * get written out. | ||
634 | */ | ||
635 | STATIC void | ||
636 | xfs_buf_item_abort( | ||
637 | xfs_buf_log_item_t *bip) | ||
638 | { | ||
639 | xfs_buf_t *bp; | ||
640 | |||
641 | bp = bip->bli_buf; | ||
642 | xfs_buftrace("XFS_ABORT", bp); | ||
643 | XFS_BUF_SUPER_STALE(bp); | ||
644 | xfs_buf_item_unlock(bip); | ||
645 | return; | ||
646 | } | ||
647 | |||
648 | /* | ||
649 | * This is called to asynchronously write the buffer associated with this | 630 | * This is called to asynchronously write the buffer associated with this |
650 | * buf log item out to disk. The buffer will already have been locked by | 631 | * buf log item out to disk. The buffer will already have been locked by |
651 | * a successful call to xfs_buf_item_trylock(). If the buffer still has | 632 | * a successful call to xfs_buf_item_trylock(). If the buffer still has |
@@ -692,7 +673,6 @@ STATIC struct xfs_item_ops xfs_buf_item_ops = { | |||
692 | .iop_committed = (xfs_lsn_t(*)(xfs_log_item_t*, xfs_lsn_t)) | 673 | .iop_committed = (xfs_lsn_t(*)(xfs_log_item_t*, xfs_lsn_t)) |
693 | xfs_buf_item_committed, | 674 | xfs_buf_item_committed, |
694 | .iop_push = (void(*)(xfs_log_item_t*))xfs_buf_item_push, | 675 | .iop_push = (void(*)(xfs_log_item_t*))xfs_buf_item_push, |
695 | .iop_abort = (void(*)(xfs_log_item_t*))xfs_buf_item_abort, | ||
696 | .iop_pushbuf = NULL, | 676 | .iop_pushbuf = NULL, |
697 | .iop_committing = (void(*)(xfs_log_item_t*, xfs_lsn_t)) | 677 | .iop_committing = (void(*)(xfs_log_item_t*, xfs_lsn_t)) |
698 | xfs_buf_item_committing | 678 | xfs_buf_item_committing |
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; | |||
33 | kmem_zone_t *xfs_efd_zone; | 33 | kmem_zone_t *xfs_efd_zone; |
34 | 34 | ||
35 | STATIC void xfs_efi_item_unlock(xfs_efi_log_item_t *); | 35 | STATIC void xfs_efi_item_unlock(xfs_efi_log_item_t *); |
36 | STATIC void xfs_efi_item_abort(xfs_efi_log_item_t *); | ||
37 | STATIC void xfs_efd_item_abort(xfs_efd_log_item_t *); | ||
38 | |||
39 | 36 | ||
40 | void | 37 | void |
41 | xfs_efi_item_free(xfs_efi_log_item_t *efip) | 38 | xfs_efi_item_free(xfs_efi_log_item_t *efip) |
@@ -184,7 +181,7 @@ STATIC void | |||
184 | xfs_efi_item_unlock(xfs_efi_log_item_t *efip) | 181 | xfs_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 | */ | ||
210 | STATIC void | ||
211 | xfs_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 | */ | ||
395 | STATIC void | ||
396 | xfs_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 | |||
416 | STATIC void | 373 | STATIC void |
417 | xfs_efd_item_free(xfs_efd_log_item_t *efdp) | 374 | xfs_efd_item_free(xfs_efd_log_item_t *efdp) |
418 | { | 375 | { |
@@ -514,7 +471,7 @@ STATIC void | |||
514 | xfs_efd_item_unlock(xfs_efd_log_item_t *efdp) | 471 | xfs_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 | */ | ||
550 | STATIC void | ||
551 | xfs_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 |
diff --git a/fs/xfs/xfs_inode_item.c b/fs/xfs/xfs_inode_item.c index f8e80d8e7237..a7a92251eb56 100644 --- a/fs/xfs/xfs_inode_item.c +++ b/fs/xfs/xfs_inode_item.c | |||
@@ -743,21 +743,6 @@ xfs_inode_item_committed( | |||
743 | } | 743 | } |
744 | 744 | ||
745 | /* | 745 | /* |
746 | * The transaction with the inode locked has aborted. The inode | ||
747 | * must not be dirty within the transaction (unless we're forcibly | ||
748 | * shutting down). We simply unlock just as if the transaction | ||
749 | * had been cancelled. | ||
750 | */ | ||
751 | STATIC void | ||
752 | xfs_inode_item_abort( | ||
753 | xfs_inode_log_item_t *iip) | ||
754 | { | ||
755 | xfs_inode_item_unlock(iip); | ||
756 | return; | ||
757 | } | ||
758 | |||
759 | |||
760 | /* | ||
761 | * This gets called by xfs_trans_push_ail(), when IOP_TRYLOCK | 746 | * This gets called by xfs_trans_push_ail(), when IOP_TRYLOCK |
762 | * failed to get the inode flush lock but did get the inode locked SHARED. | 747 | * failed to get the inode flush lock but did get the inode locked SHARED. |
763 | * Here we're trying to see if the inode buffer is incore, and if so whether it's | 748 | * Here we're trying to see if the inode buffer is incore, and if so whether it's |
@@ -915,7 +900,6 @@ STATIC struct xfs_item_ops xfs_inode_item_ops = { | |||
915 | .iop_committed = (xfs_lsn_t(*)(xfs_log_item_t*, xfs_lsn_t)) | 900 | .iop_committed = (xfs_lsn_t(*)(xfs_log_item_t*, xfs_lsn_t)) |
916 | xfs_inode_item_committed, | 901 | xfs_inode_item_committed, |
917 | .iop_push = (void(*)(xfs_log_item_t*))xfs_inode_item_push, | 902 | .iop_push = (void(*)(xfs_log_item_t*))xfs_inode_item_push, |
918 | .iop_abort = (void(*)(xfs_log_item_t*))xfs_inode_item_abort, | ||
919 | .iop_pushbuf = (void(*)(xfs_log_item_t*))xfs_inode_item_pushbuf, | 903 | .iop_pushbuf = (void(*)(xfs_log_item_t*))xfs_inode_item_pushbuf, |
920 | .iop_committing = (void(*)(xfs_log_item_t*, xfs_lsn_t)) | 904 | .iop_committing = (void(*)(xfs_log_item_t*, xfs_lsn_t)) |
921 | xfs_inode_item_committing | 905 | xfs_inode_item_committing |
diff --git a/fs/xfs/xfs_trans.h b/fs/xfs/xfs_trans.h index 9dc88b380608..c68e00105d23 100644 --- a/fs/xfs/xfs_trans.h +++ b/fs/xfs/xfs_trans.h | |||
@@ -149,7 +149,6 @@ typedef struct xfs_item_ops { | |||
149 | void (*iop_unlock)(xfs_log_item_t *); | 149 | void (*iop_unlock)(xfs_log_item_t *); |
150 | xfs_lsn_t (*iop_committed)(xfs_log_item_t *, xfs_lsn_t); | 150 | xfs_lsn_t (*iop_committed)(xfs_log_item_t *, xfs_lsn_t); |
151 | void (*iop_push)(xfs_log_item_t *); | 151 | void (*iop_push)(xfs_log_item_t *); |
152 | void (*iop_abort)(xfs_log_item_t *); | ||
153 | void (*iop_pushbuf)(xfs_log_item_t *); | 152 | void (*iop_pushbuf)(xfs_log_item_t *); |
154 | void (*iop_committing)(xfs_log_item_t *, xfs_lsn_t); | 153 | void (*iop_committing)(xfs_log_item_t *, xfs_lsn_t); |
155 | } xfs_item_ops_t; | 154 | } xfs_item_ops_t; |
@@ -163,7 +162,6 @@ typedef struct xfs_item_ops { | |||
163 | #define IOP_UNLOCK(ip) (*(ip)->li_ops->iop_unlock)(ip) | 162 | #define IOP_UNLOCK(ip) (*(ip)->li_ops->iop_unlock)(ip) |
164 | #define IOP_COMMITTED(ip, lsn) (*(ip)->li_ops->iop_committed)(ip, lsn) | 163 | #define IOP_COMMITTED(ip, lsn) (*(ip)->li_ops->iop_committed)(ip, lsn) |
165 | #define IOP_PUSH(ip) (*(ip)->li_ops->iop_push)(ip) | 164 | #define IOP_PUSH(ip) (*(ip)->li_ops->iop_push)(ip) |
166 | #define IOP_ABORT(ip) (*(ip)->li_ops->iop_abort)(ip) | ||
167 | #define IOP_PUSHBUF(ip) (*(ip)->li_ops->iop_pushbuf)(ip) | 165 | #define IOP_PUSHBUF(ip) (*(ip)->li_ops->iop_pushbuf)(ip) |
168 | #define IOP_COMMITTING(ip, lsn) (*(ip)->li_ops->iop_committing)(ip, lsn) | 166 | #define IOP_COMMITTING(ip, lsn) (*(ip)->li_ops->iop_committing)(ip, lsn) |
169 | 167 | ||