public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: xfs@oss.sgi.com
Subject: [PATCH 06/15] xfs: RT bitmap and summary buffers are not typed
Date: Wed, 17 Feb 2016 18:20:43 +1100	[thread overview]
Message-ID: <1455693652-3899-7-git-send-email-david@fromorbit.com> (raw)
In-Reply-To: <1455693652-3899-1-git-send-email-david@fromorbit.com>

From: Dave Chinner <dchinner@redhat.com>

Source kernel commit f67ca6eca89cddd355c83639a90109e245f9d5a7

When logging buffers, we attach a type to them that follows the
buffer all the way into the log and is used to identify the buffer
contents in log recovery. Both the realtime summary buffers and the
bitmap buffers do not have types defined or set, so when we try to
log them we see assert failure:

XFS: Assertion failed: (bip->bli_flags & XFS_BLI_STALE) || (xfs_blft_from_flags(&bip->__bli_format) > XFS_BLFT_UNKNOWN_BUF && xfs_blft_from_flags(&bip->__bli_format) < XFS_BLFT_MAX_BUF), file: fs/xfs/xfs_buf_item.c, line: 294

Fix this by adding buffer log format types for these buffers, and
add identification support into log recovery for them. Only build the log
recovery support if CONFIG_XFS_RT=y - we can't get into log recovery for real
time filesystems if support is not built into the kernel, and this avoids
potential build problems.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Tested-by: Ross Zwisler <ross.zwisler@linux.intel.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
---
 libxfs/xfs_log_format.h | 2 ++
 libxfs/xfs_rtbitmap.c   | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/libxfs/xfs_log_format.h b/libxfs/xfs_log_format.h
index db8ceeb..c860345 100644
--- a/libxfs/xfs_log_format.h
+++ b/libxfs/xfs_log_format.h
@@ -495,6 +495,8 @@ enum xfs_blft {
 	XFS_BLFT_ATTR_LEAF_BUF,
 	XFS_BLFT_ATTR_RMT_BUF,
 	XFS_BLFT_SB_BUF,
+	XFS_BLFT_RTBITMAP_BUF,
+	XFS_BLFT_RTSUMMARY_BUF,
 	XFS_BLFT_MAX_BUF = (1 << XFS_BLFT_BITS),
 };
 
diff --git a/libxfs/xfs_rtbitmap.c b/libxfs/xfs_rtbitmap.c
index 5648ea5..3e61eb2 100644
--- a/libxfs/xfs_rtbitmap.c
+++ b/libxfs/xfs_rtbitmap.c
@@ -66,6 +66,9 @@ xfs_rtbuf_get(
 				   mp->m_bsize, 0, &bp, NULL);
 	if (error)
 		return error;
+
+	xfs_trans_buf_set_type(tp, bp, issum ? XFS_BLFT_RTSUMMARY_BUF
+					     : XFS_BLFT_RTBITMAP_BUF);
 	*bpp = bp;
 	return 0;
 }
-- 
2.7.0

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  parent reply	other threads:[~2016-02-17  7:21 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-17  7:20 [PATCH 00/15] xfsprogs: libxfs kernel sync to 4.6-for-next Dave Chinner
2016-02-17  7:20 ` [PATCH 01/15] xfs: wire up Q_XGETNEXTQUOTA / get_nextdqblk Dave Chinner
2016-02-17  7:25   ` Christoph Hellwig
2016-02-17  7:20 ` [PATCH 02/15] xfs: handle errors from ->free_blocks in xfs_btree_kill_iroot Dave Chinner
2016-02-17  7:20 ` [PATCH 03/15] xfs: factor btree block freeing into a helper Dave Chinner
2016-02-17  7:20 ` [PATCH 04/15] xfs: move buffer invalidation to xfs_btree_free_block Dave Chinner
2016-02-17  7:20 ` [PATCH 05/15] xfs: remove unused function definitions Dave Chinner
2016-02-17  7:20 ` Dave Chinner [this message]
2016-02-17  7:20 ` [PATCH 07/15] xfs: RT bitmap and summary buffers need verifiers Dave Chinner
2016-02-17  7:20 ` [PATCH 08/15] xfs: introduce inode log format object Dave Chinner
2016-02-17  7:20 ` [PATCH 09/15] xfs: remove timestamps from incore inode Dave Chinner
2016-02-26 18:02   ` Brian Foster
2016-02-26 19:35     ` Darrick J. Wong
2016-02-17  7:20 ` [PATCH 10/15] xfs: cull unnecessary icdinode fields Dave Chinner
2016-02-17  7:20 ` [PATCH 11/15] xfs: move v1 inode conversion to xfs_inode_from_disk Dave Chinner
2016-02-17  7:32   ` Christoph Hellwig
2016-02-17  7:48     ` Dave Chinner
2016-02-17  8:30       ` Dave Chinner
2016-02-17  8:33         ` Christoph Hellwig
2016-02-17  9:30           ` Dave Chinner
2016-02-17  7:20 ` [PATCH 12/15] xfs: use vfs inode nlink field everywhere Dave Chinner
2016-02-17  7:35   ` Christoph Hellwig
2016-02-17  7:49     ` Dave Chinner
2016-02-17  7:20 ` [PATCH 13/15] xfs: move inode generation count to VFS inode Dave Chinner
2016-02-17  7:20 ` [PATCH 14/15] xfs: move di_changecount " Dave Chinner
2016-02-17  7:20 ` [PATCH 15/15] xfs: mode di_mode to vfs inode Dave Chinner
2016-02-17  7:56 ` [PATCH 00/15] xfsprogs: libxfs kernel sync to 4.6-for-next Christoph Hellwig
2016-02-17  8:16   ` Dave Chinner

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=1455693652-3899-7-git-send-email-david@fromorbit.com \
    --to=david@fromorbit.com \
    --cc=xfs@oss.sgi.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox