Linux XFS filesystem development
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Eric Sandeen <sandeen@sandeen.net>
Cc: "Darrick J. Wong" <darrick.wong@oracle.com>,
	Eric Sandeen <sandeen@redhat.com>,
	xfs <linux-xfs@vger.kernel.org>
Subject: Re: [PATCH] libxfs: check all defer ops types
Date: Fri, 26 Oct 2018 12:24:58 -0700	[thread overview]
Message-ID: <20181026192458.GA8643@infradead.org> (raw)
In-Reply-To: <d13db2aa-3e73-7dd6-8677-7e19f9b7ffcd@sandeen.net>

On Fri, Oct 26, 2018 at 02:11:47PM -0500, Eric Sandeen wrote:
> static const struct
> xfs_defer_op_type *defer_op_types[XFS_DEFER_OPS_TYPE_MAX] = {
>        xfs_bmap_update_defer_type,
>        xfs_refcount_update_defer_type,
>        xfs_rmap_update_defer_type,
>        xfs_extent_free_defer_type,
>        xfs_agfl_free_defer_type,
> };

I think this should be:

static const struct xfs_defer_op_type *defer_op_types[] = {
	[XFS_DEFER_OPS_TYPE_BMAP]	= &xfs_bmap_update_defer_type,
	[XFS_DEFER_OPS_TYPE_REFCOUNT]	= &xfs_refcount_update_defer_type,
	[XFS_DEFER_OPS_TYPE_RMAP]	= &xfs_rmap_update_defer_type,
	[XFS_DEFER_OPS_TYPE_FREE]	= &xfs_extent_free_defer_type,
	[XFS_DEFER_OPS_TYPE_AGFL_FREE]	= &xfs_agfl_free_defer_type,
};

somefunc()
{
	BUILD_BUG_ON(ARRAY_SIZE(defer_op_types) != XFS_DEFER_OPS_TYPE_MAX);
}

  parent reply	other threads:[~2018-10-27  4:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-26 16:19 [PATCH] libxfs: check all defer ops types Darrick J. Wong
2018-10-26 19:02 ` Eric Sandeen
2018-10-26 19:11   ` Eric Sandeen
2018-10-26 19:18     ` Darrick J. Wong
2018-10-26 19:26       ` Christoph Hellwig
2018-10-26 19:24     ` Christoph Hellwig [this message]
2018-10-26 19:26       ` Eric Sandeen

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=20181026192458.GA8643@infradead.org \
    --to=hch@infradead.org \
    --cc=darrick.wong@oracle.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=sandeen@redhat.com \
    --cc=sandeen@sandeen.net \
    /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