From: Dave Chinner <david@fromorbit.com>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH v3 1/5] xfs: check the uniqueness of the AGFL entries
Date: Fri, 10 Nov 2017 12:23:12 +1100 [thread overview]
Message-ID: <20171110012312.GG5858@dastard> (raw)
In-Reply-To: <20171109233944.GO26910@magnolia>
On Thu, Nov 09, 2017 at 03:39:44PM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
>
> Make sure we don't list a block twice in the agfl by copying the
> contents of the AGFL to an array, sorting it, and looking for
> duplicates. We can easily check that the number of agfl entries we see
> actually matches the flcount, so do that too.
>
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> ---
> v3: check flcount, don't overflow buffer
> v2: minor reworks per dchinner review suggestions
Looks good. One minor nit:
> + sai.entries = kmem_zalloc(sizeof(xfs_agblock_t) * agflcount,
> + KM_SLEEP | KM_NOFS);
> + if (!sai.entries) {
> + error = -ENOMEM;
> + goto out;
> + }
KM_SLEEP means "never fail", which would make either it or the error
checking redundant. I'd just drop the KM_SLEEP - it's not necessary
if we can handle ENOMEM effectively.
Otherwise it looks good.
Reviewed-by: Dave Chinner <dchinner@redhat.com>
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2017-11-10 1:23 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-07 1:03 [PATCH 0/5] xfs: various 4.15 scrub fixes Darrick J. Wong
2017-11-07 1:03 ` [PATCH 1/5] xfs: check the uniqueness of the AGFL entries Darrick J. Wong
2017-11-09 2:08 ` Dave Chinner
2017-11-09 2:48 ` Darrick J. Wong
2017-11-09 5:02 ` [PATCH v2 " Darrick J. Wong
2017-11-09 22:12 ` Darrick J. Wong
2017-11-09 23:39 ` [PATCH v3 " Darrick J. Wong
2017-11-10 1:23 ` Dave Chinner [this message]
2017-11-07 1:03 ` [PATCH 2/5] xfs: refactor the directory data block bestfree checks Darrick J. Wong
2017-11-09 2:11 ` Dave Chinner
2017-11-07 1:03 ` [PATCH 3/5] xfs: pass inode number to xfs_scrub_ino_set_{preen, warning} Darrick J. Wong
2017-11-09 2:13 ` Dave Chinner
2017-11-07 1:03 ` [PATCH 4/5] xfs: fix uninitialized return values in scrub code Darrick J. Wong
2017-11-09 2:13 ` Dave Chinner
2017-11-07 1:03 ` [PATCH 5/5] xfs: fix btree scrub deref check Darrick J. Wong
2017-11-09 2:16 ` Dave Chinner
2017-11-08 20:56 ` [PATCH 6/5] xfs: only check da node header padding on v5 filesystems Darrick J. Wong
2017-11-09 2:17 ` Dave Chinner
2017-11-09 6:00 ` [PATCH 7/5] xfs: on failed mount, force-reclaim inodes after unmounting quota controls Darrick J. Wong
2017-11-09 23:24 ` Dave Chinner
2017-11-09 23:49 ` Darrick J. Wong
2017-11-09 23:57 ` [PATCH v2 " Darrick J. Wong
2017-11-10 1:19 ` Dave Chinner
2017-11-09 17:35 ` [PATCH 8/5] xfs: remove u_int* type usage Darrick J. Wong
2017-11-09 23:25 ` 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=20171110012312.GG5858@dastard \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.