All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: linux-xfs@vger.kernel.org
Cc: Dave Chinner <david@fromorbit.com>
Subject: [PATCH 1/5] xfs: mark XLOG_FORCED_SHUTDOWN as unlikely
Date: Thu, 12 Mar 2020 15:39:55 +0100	[thread overview]
Message-ID: <20200312143959.583781-2-hch@lst.de> (raw)
In-Reply-To: <20200312143959.583781-1-hch@lst.de>

A shutdown log is a slow failure path.  Add an unlikely annotation to
it.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 fs/xfs/xfs_log_priv.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/xfs/xfs_log_priv.h b/fs/xfs/xfs_log_priv.h
index b192c5a9f9fd..e400170ff4af 100644
--- a/fs/xfs/xfs_log_priv.h
+++ b/fs/xfs/xfs_log_priv.h
@@ -402,7 +402,8 @@ struct xlog {
 #define XLOG_BUF_CANCEL_BUCKET(log, blkno) \
 	((log)->l_buf_cancel_table + ((uint64_t)blkno % XLOG_BC_TABLE_SIZE))
 
-#define XLOG_FORCED_SHUTDOWN(log)	((log)->l_flags & XLOG_IO_ERROR)
+#define XLOG_FORCED_SHUTDOWN(log) \
+	(unlikely((log)->l_flags & XLOG_IO_ERROR))
 
 /* common routines */
 extern int
-- 
2.24.1


  reply	other threads:[~2020-03-12 14:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-12 14:39 misc log cleanups Christoph Hellwig
2020-03-12 14:39 ` Christoph Hellwig [this message]
2020-03-12 23:45   ` [PATCH 1/5] xfs: mark XLOG_FORCED_SHUTDOWN as unlikely Darrick J. Wong
2020-03-12 14:39 ` [PATCH 2/5] xfs: remove the unused XLOG_UNMOUNT_REC_TYPE define Christoph Hellwig
2020-03-12 23:45   ` Darrick J. Wong
2020-03-12 14:39 ` [PATCH 3/5] xfs: remove the unused return value from xfs_log_unmount_write Christoph Hellwig
2020-03-12 23:49   ` Darrick J. Wong
2020-03-13 11:18     ` Christoph Hellwig
2020-03-12 14:39 ` [PATCH 4/5] xfs: remove dead code " Christoph Hellwig
2020-03-12 23:51   ` Darrick J. Wong
2020-03-12 14:39 ` [PATCH 5/5] xfs: cleanup xfs_log_unmount_write Christoph Hellwig
2020-03-12 23:52   ` 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=20200312143959.583781-2-hch@lst.de \
    --to=hch@lst.de \
    --cc=david@fromorbit.com \
    --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.