From: "Darrick J. Wong" <djwong@kernel.org>
To: Christoph Hellwig <hch@lst.de>
Cc: linux-xfs@vger.kernel.org, Brian Foster <bfoster@redhat.com>
Subject: Re: [PATCH 4/7] xfs: only look at the fork format in xfs_idestroy_fork
Date: Tue, 13 Apr 2021 17:08:39 -0700 [thread overview]
Message-ID: <20210414000839.GR3957620@magnolia> (raw)
In-Reply-To: <20210412133819.2618857-5-hch@lst.de>
On Mon, Apr 12, 2021 at 03:38:16PM +0200, Christoph Hellwig wrote:
> Stop using the XFS_IFEXTENTS flag, and instead switch on the fork format
> in xfs_idestroy_fork to decide how to cleanup.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> Reviewed-by: Brian Foster <bfoster@redhat.com>
Looks ok,
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
--D
> ---
> fs/xfs/libxfs/xfs_inode_fork.c | 13 ++++++-------
> 1 file changed, 6 insertions(+), 7 deletions(-)
>
> diff --git a/fs/xfs/libxfs/xfs_inode_fork.c b/fs/xfs/libxfs/xfs_inode_fork.c
> index a8800ff03f9432..73eea7939b55e4 100644
> --- a/fs/xfs/libxfs/xfs_inode_fork.c
> +++ b/fs/xfs/libxfs/xfs_inode_fork.c
> @@ -522,17 +522,16 @@ xfs_idestroy_fork(
> ifp->if_broot = NULL;
> }
>
> - /*
> - * If the format is local, then we can't have an extents array so just
> - * look for an inline data array. If we're not local then we may or may
> - * not have an extents list, so check and free it up if we do.
> - */
> - if (ifp->if_format == XFS_DINODE_FMT_LOCAL) {
> + switch (ifp->if_format) {
> + case XFS_DINODE_FMT_LOCAL:
> kmem_free(ifp->if_u1.if_data);
> ifp->if_u1.if_data = NULL;
> - } else if (ifp->if_flags & XFS_IFEXTENTS) {
> + break;
> + case XFS_DINODE_FMT_EXTENTS:
> + case XFS_DINODE_FMT_BTREE:
> if (ifp->if_height)
> xfs_iext_destroy(ifp);
> + break;
> }
> }
>
> --
> 2.30.1
>
next prev parent reply other threads:[~2021-04-14 0:08 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-12 13:38 remove the if_flags field in struct xfs_ifork Christoph Hellwig
2021-04-12 13:38 ` [PATCH 1/7] xfs: move the XFS_IFEXTENTS check into xfs_iread_extents Christoph Hellwig
2021-04-13 23:21 ` Darrick J. Wong
2021-04-12 13:38 ` [PATCH 2/7] xfs: rename and simplify xfs_bmap_one_block Christoph Hellwig
2021-04-14 0:05 ` Darrick J. Wong
2021-04-12 13:38 ` [PATCH 3/7] xfs: simplify xfs_attr_remove_args Christoph Hellwig
2021-04-14 0:06 ` Darrick J. Wong
2021-04-12 13:38 ` [PATCH 4/7] xfs: only look at the fork format in xfs_idestroy_fork Christoph Hellwig
2021-04-14 0:08 ` Darrick J. Wong [this message]
2021-04-12 13:38 ` [PATCH 5/7] xfs: remove XFS_IFBROOT Christoph Hellwig
2021-04-12 16:03 ` Brian Foster
2021-04-14 15:23 ` Darrick J. Wong
2021-04-14 0:13 ` Darrick J. Wong
2021-04-12 13:38 ` [PATCH 6/7] xfs: remove XFS_IFINLINE Christoph Hellwig
2021-04-12 16:03 ` Brian Foster
2021-04-14 0:33 ` Darrick J. Wong
2021-04-12 13:38 ` [PATCH 7/7] xfs: remove XFS_IFEXTENTS Christoph Hellwig
2021-04-12 16:03 ` Brian Foster
2021-04-14 0:37 ` Darrick J. Wong
2021-04-14 5:59 ` Christoph Hellwig
2021-04-14 15:27 ` Darrick J. Wong
2021-04-14 15:29 ` Christoph Hellwig
2021-04-15 23:14 ` Dave Chinner
-- strict thread matches above, loose matches on Subject: below --
2021-04-02 14:24 RFC: remove the if_flags field in struct xfs_ifork Christoph Hellwig
2021-04-02 14:24 ` [PATCH 4/7] xfs: only look at the fork format in xfs_idestroy_fork Christoph Hellwig
2021-04-05 16:35 ` Brian Foster
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=20210414000839.GR3957620@magnolia \
--to=djwong@kernel.org \
--cc=bfoster@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).