All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: darrick.wong@oracle.com
Cc: Chandan Babu R <chandanrlinux@gmail.com>,
	Christoph Hellwig <hch@lst.de>,
	linux-xfs@vger.kernel.org
Subject: [PATCH 18/25] xfs: refactor xlog_item_is_intent now that we're done converting
Date: Wed, 06 May 2020 18:03:37 -0700	[thread overview]
Message-ID: <158881341704.189971.9418165129953886860.stgit@magnolia> (raw)
In-Reply-To: <158881329912.189971.14392758631836955942.stgit@magnolia>

From: Darrick J. Wong <darrick.wong@oracle.com>

Now that we've finished converting all types of log intent items to
provide an ->iop_recover function, we can convert the "is this an intent
item?" predicate to look for a non-null iop_recover pointer.

Move the predicate closer to the functions that use it.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Chandan Babu R <chandanrlinux@gmail.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
---
 fs/xfs/xfs_log_recover.c |   20 ++++++--------------
 1 file changed, 6 insertions(+), 14 deletions(-)


diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c
index 65081a3efeff..e21cb9c33faa 100644
--- a/fs/xfs/xfs_log_recover.c
+++ b/fs/xfs/xfs_log_recover.c
@@ -2546,20 +2546,6 @@ xlog_recover_process_data(
 	return 0;
 }
 
-/* Is this log item a deferred action intent? */
-static inline bool xlog_item_is_intent(struct xfs_log_item *lip)
-{
-	switch (lip->li_type) {
-	case XFS_LI_EFI:
-	case XFS_LI_RUI:
-	case XFS_LI_CUI:
-	case XFS_LI_BUI:
-		return true;
-	default:
-		return false;
-	}
-}
-
 /* Take all the collected deferred ops and finish them in order. */
 static int
 xlog_finish_defer_ops(
@@ -2594,6 +2580,12 @@ xlog_finish_defer_ops(
 	return xfs_trans_commit(tp);
 }
 
+/* Is this log item a deferred action intent? */
+static inline bool xlog_item_is_intent(struct xfs_log_item *lip)
+{
+	return lip->li_ops->iop_recover != NULL;
+}
+
 /*
  * When this is called, all of the log intent items which did not have
  * corresponding log done items should be in the AIL.  What we do now


  parent reply	other threads:[~2020-05-07  1:07 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-07  1:01 [PATCH v4 00/25] xfs: refactor log recovery Darrick J. Wong
2020-05-07  1:01 ` [PATCH 01/25] xfs: convert xfs_log_recover_item_t to struct xfs_log_recover_item Darrick J. Wong
2020-05-07  1:01 ` [PATCH 02/25] xfs: refactor log recovery item sorting into a generic dispatch structure Darrick J. Wong
2020-05-07  1:01 ` [PATCH 03/25] xfs: refactor log recovery item dispatch for pass2 readhead functions Darrick J. Wong
2020-05-07  1:02 ` [PATCH 04/25] xfs: refactor log recovery item dispatch for pass1 commit functions Darrick J. Wong
2020-05-07  1:02 ` [PATCH 05/25] xfs: refactor log recovery buffer item dispatch for pass2 " Darrick J. Wong
2020-05-07  1:02 ` [PATCH 06/25] xfs: refactor log recovery inode " Darrick J. Wong
2020-05-07  1:02 ` [PATCH 07/25] xfs: refactor log recovery dquot " Darrick J. Wong
2020-05-07  1:02 ` [PATCH 08/25] xfs: refactor log recovery icreate " Darrick J. Wong
2020-05-07  1:02 ` [PATCH 09/25] xfs: refactor log recovery EFI " Darrick J. Wong
2020-05-07  1:02 ` [PATCH 10/25] xfs: refactor log recovery RUI " Darrick J. Wong
2020-05-07  1:02 ` [PATCH 11/25] xfs: refactor log recovery CUI " Darrick J. Wong
2020-05-07  1:02 ` [PATCH 12/25] xfs: refactor log recovery BUI " Darrick J. Wong
2020-05-07  1:03 ` [PATCH 13/25] xfs: remove log recovery quotaoff " Darrick J. Wong
2020-05-07  1:03 ` [PATCH 14/25] xfs: refactor recovered EFI log item playback Darrick J. Wong
2020-05-07  1:03 ` [PATCH 15/25] xfs: refactor recovered RUI " Darrick J. Wong
2020-05-07  1:03 ` [PATCH 16/25] xfs: refactor recovered CUI " Darrick J. Wong
2020-05-07  1:03 ` [PATCH 17/25] xfs: refactor recovered BUI " Darrick J. Wong
2020-05-07  1:03 ` Darrick J. Wong [this message]
2020-05-07  1:03 ` [PATCH 19/25] xfs: refactor releasing finished intents during log recovery Darrick J. Wong
2020-05-07  1:03 ` [PATCH 20/25] xfs: refactor adding recovered intent items to the log Darrick J. Wong
2020-05-07  6:06   ` Christoph Hellwig
2020-05-07  1:03 ` [PATCH 21/25] xfs: refactor intent item RECOVERED flag into the log item Darrick J. Wong
2020-05-07  1:04 ` [PATCH 22/25] xfs: refactor intent item iop_recover calls Darrick J. Wong
2020-05-07  1:04 ` [PATCH 23/25] xfs: hoist setting of XFS_LI_RECOVERED to caller Darrick J. Wong
2020-05-07  1:04 ` [PATCH 24/25] xfs: move log recovery buffer cancellation code to xfs_buf_item_recover.c Darrick J. Wong
2020-05-07  1:04 ` [PATCH 25/25] xfs: remove unnecessary includes from xfs_log_recover.c Darrick J. Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=158881341704.189971.9418165129953886860.stgit@magnolia \
    --to=darrick.wong@oracle.com \
    --cc=chandanrlinux@gmail.com \
    --cc=hch@lst.de \
    --cc=linux-xfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.