public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@sandeen.net>
To: xfs@oss.sgi.com
Subject: Re: [PATCH 3/3] xfs: RT bitmap and summary buffers need verifiers
Date: Mon, 1 Feb 2016 19:25:22 -0600	[thread overview]
Message-ID: <56B00582.2070506@sandeen.net> (raw)
In-Reply-To: <1454373550-3102-4-git-send-email-david@fromorbit.com>

On 2/1/16 6:39 PM, Dave Chinner wrote:
> From: Dave Chinner <dchinner@redhat.com>
> 
> Buffers without verifiers issue runtime warnings on XFS. We don't
> have anything we can actually verify in the RT buffers (no CRCs, not
> magic numbers, etc), but we still need verifiers to avoid the
> warnings.
> 
> Add a set of dummy verifier operations for the realtime buffers and
> apply them in the appropriate places.
> 
> Signed-off-by: Dave Chinner <dchinner@redhat.com>
> ---
>  fs/xfs/libxfs/xfs_rtbitmap.c | 27 ++++++++++++++++++++++++++-
>  fs/xfs/libxfs/xfs_shared.h   |  1 +
>  fs/xfs/xfs_log_recover.c     |  4 ++--
>  3 files changed, 29 insertions(+), 3 deletions(-)
> 
> diff --git a/fs/xfs/libxfs/xfs_rtbitmap.c b/fs/xfs/libxfs/xfs_rtbitmap.c
> index bfa7b85..01c0cdb 100644
> --- a/fs/xfs/libxfs/xfs_rtbitmap.c
> +++ b/fs/xfs/libxfs/xfs_rtbitmap.c
> @@ -42,6 +42,31 @@
>   */
>  
>  /*
> + * Real time buffers need verifiers to avoid runtime warnigns during IO.

"warnings" ;)

Otherwise:
Reviewed-by: Eric Sandeen <sandeen@redhat.com>

> + * We don't have anything to verify, however, so these are just dummy
> + * operations.
> + */
> +static void
> +xfs_rtbuf_verify_read(
> +	struct xfs_buf	*bp)
> +{
> +	return;
> +}
> +
> +static void
> +xfs_rtbuf_verify_write(
> +	struct xfs_buf	*bp)
> +{
> +	return;
> +}
> +
> +const struct xfs_buf_ops xfs_rtbuf_ops = {
> +	.name = "rtbuf",
> +	.verify_read = xfs_rtbuf_verify_read,
> +	.verify_write = xfs_rtbuf_verify_write,
> +};
> +
> +/*
>   * Get a buffer for the bitmap or summary file block specified.
>   * The buffer is returned read and locked.
>   */
> @@ -68,7 +93,7 @@ xfs_rtbuf_get(
>  	ASSERT(map.br_startblock != NULLFSBLOCK);
>  	error = xfs_trans_read_buf(mp, tp, mp->m_ddev_targp,
>  				   XFS_FSB_TO_DADDR(mp, map.br_startblock),
> -				   mp->m_bsize, 0, &bp, NULL);
> +				   mp->m_bsize, 0, &bp, &xfs_rtbuf_ops);
>  	if (error)
>  		return error;
>  
> diff --git a/fs/xfs/libxfs/xfs_shared.h b/fs/xfs/libxfs/xfs_shared.h
> index 15c3ceb..81ac870 100644
> --- a/fs/xfs/libxfs/xfs_shared.h
> +++ b/fs/xfs/libxfs/xfs_shared.h
> @@ -53,6 +53,7 @@ extern const struct xfs_buf_ops xfs_dquot_buf_ra_ops;
>  extern const struct xfs_buf_ops xfs_sb_buf_ops;
>  extern const struct xfs_buf_ops xfs_sb_quiet_buf_ops;
>  extern const struct xfs_buf_ops xfs_symlink_buf_ops;
> +extern const struct xfs_buf_ops xfs_rtbuf_ops;
>  
>  /*
>   * Transaction types.  Used to distinguish types of buffers. These never reach
> diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c
> index e2d7533..9d09a0d 100644
> --- a/fs/xfs/xfs_log_recover.c
> +++ b/fs/xfs/xfs_log_recover.c
> @@ -2475,8 +2475,8 @@ xlog_recover_validate_buf_type(
>  		break;
>  	case XFS_BLFT_RTBITMAP_BUF:
>  	case XFS_BLFT_RTSUMMARY_BUF:
> -		/* no verification of RT buffers is done */
> -		bp->b_ops = NULL;
> +		/* no magic numbers for verification of RT buffers */
> +		bp->b_ops = &xfs_rtbuf_ops;
>  		break;
>  	default:
>  		xfs_warn(mp, "Unknown buffer type %d!",
> 

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

  reply	other threads:[~2016-02-02  1:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-02  0:39 [PATCH 0/3] xfs: fix realtime device assert failures Dave Chinner
2016-02-02  0:39 ` [PATCH 1/3] xfs: lock rt summary inode on allocation Dave Chinner
2016-02-02  1:26   ` Eric Sandeen
2016-02-02  0:39 ` [PATCH 2/3] xfs: RT bitmap and summary buffers are not typed Dave Chinner
2016-02-02  1:26   ` Eric Sandeen
2016-02-02  0:39 ` [PATCH 3/3] xfs: RT bitmap and summary buffers need verifiers Dave Chinner
2016-02-02  1:25   ` Eric Sandeen [this message]
2016-02-04 21:22 ` [PATCH 0/3] xfs: fix realtime device assert failures Ross Zwisler
2016-02-05 22:35   ` 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=56B00582.2070506@sandeen.net \
    --to=sandeen@sandeen.net \
    --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