public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 3/3] xfs: scrub should mark dir corrupt if entry points to unallocated inode
Date: Wed, 11 Mar 2020 16:55:19 +1100	[thread overview]
Message-ID: <20200311055519.GD10776@dread.disaster.area> (raw)
In-Reply-To: <158388770010.939608.11408184090778445318.stgit@magnolia>

On Tue, Mar 10, 2020 at 05:48:20PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
> 
> In xchk_dir_check_ftype, we should mark the directory corrupt if we try
> to _iget a directory entry's inode pointer and the inode btree says the
> inode is not allocated.  This involves changing the IGET call to force
> the inobt lookup to return EINVAL if the inode isn't allocated; and
> rearranging the code so that we always perform the iget.
> 
> We can also remove the !hasftype code from the function, because any
> DT_ flags we encounter on those filesystems were synthesized in core,
> not read in from disk.
> 
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> ---
>  fs/xfs/scrub/dir.c |   39 ++++++++++++++++++++++-----------------
>  1 file changed, 22 insertions(+), 17 deletions(-)

That's much neater.

Reviewed-by: Dave Chinner <dchinner@redhat.com>

-- 
Dave Chinner
david@fromorbit.com

  reply	other threads:[~2020-03-11  5:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-11  0:48 [PATCH v2 0/3] xfs: fix errors in attr/directory scrubbers Darrick J. Wong
2020-03-11  0:48 ` [PATCH 1/3] xfs: mark dir corrupt when lookup-by-hash fails Darrick J. Wong
2020-03-11  5:52   ` Dave Chinner
2020-03-11  0:48 ` [PATCH 2/3] xfs: mark extended attr " Darrick J. Wong
2020-03-11  5:53   ` Dave Chinner
2020-03-11  0:48 ` [PATCH 3/3] xfs: scrub should mark dir corrupt if entry points to unallocated inode Darrick J. Wong
2020-03-11  5:55   ` Dave Chinner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-02-29  1:49 [PATCH 0/3] xfs: fix errors in attr/directory scrubbers Darrick J. Wong
2020-02-29  1:49 ` [PATCH 3/3] xfs: scrub should mark dir corrupt if entry points to unallocated inode Darrick J. Wong
2020-03-02 17:44   ` Allison Collins
2020-03-03 22:39   ` Dave Chinner
2020-03-03 23:06     ` 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=20200311055519.GD10776@dread.disaster.area \
    --to=david@fromorbit.com \
    --cc=darrick.wong@oracle.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox