public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Cc: "Gustavo A. R. Silva" <gustavoars@kernel.org>,
	Dave Chinner <david@fromorbit.com>,
	linux-xfs@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-hardening@vger.kernel.org
Subject: Re: [PATCH v3][next] xfs: Replace one-element arrays with flexible-array members
Date: Sat, 20 Mar 2021 13:17:11 -0700	[thread overview]
Message-ID: <20210320201711.GY22100@magnolia> (raw)
In-Reply-To: <96be7032-a95c-e8d2-a7f8-64b96686ea42@embeddedor.com>

On Mon, Mar 15, 2021 at 01:31:17PM -0500, Gustavo A. R. Silva wrote:
> 
> 
> On 3/10/21 22:47, Darrick J. Wong wrote:
> > On Wed, Mar 10, 2021 at 10:23:02PM -0600, Gustavo A. R. Silva wrote:
> >> There is a regular need in the kernel to provide a way to declare having
> >> a dynamically sized set of trailing elements in a structure. Kernel code
> >> should always use “flexible array members”[1] for these cases. The older
> >> style of one-element or zero-length arrays should no longer be used[2].
> >>
> >> Refactor the code according to the use of flexible-array members in
> >> multiple structures, instead of one-element arrays. Also, make use of
> >> the new struct_size() helper to properly calculate the size of multiple
> >> structures that contain flexible-array members. Additionally, wrap
> >> some calls to the struct_size() helper in multiple inline functions.
> >>
> >> Below are the results of running xfstests for groups shutdown and log
> >> with the following configuration in local.config:
> >>
> >> export TEST_DEV=/dev/sda3
> >> export TEST_DIR=/mnt/test
> >> export SCRATCH_DEV=/dev/sda4
> >> export SCRATCH_MNT=/mnt/scratch
> >>
> >> The size for both partitions /dev/sda3 and /dev/sda4 is 25GB.
> > 
> > Looks good to me, will toss it at my fstests cloud and see if anything
> > shakes out.  Thanks for cleaning up this goofy thorn-pile!
> 
> Great. It's been fun to work on this. :p

Did you run the /entire/ fstests suite?  With this patch applied to
5.12-rc2, I keep seeing list corruption assertions about an hour into
the test run, and usually on some test that heavily exercises allocating
and deleting file extents.  I'll try to look at this patch more closely
next week, but I figured I should let you know early, on the off chance
something sticks out to you.

--D

> > Reviewed-by: Darrick J. Wong <djwong@kernel.org>
> 
> Thanks!
> --
> Gustavo

  reply	other threads:[~2021-03-20 20:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-11  4:23 [PATCH v3][next] xfs: Replace one-element arrays with flexible-array members Gustavo A. R. Silva
2021-03-11  4:47 ` Darrick J. Wong
2021-03-15 18:31   ` Gustavo A. R. Silva
2021-03-20 20:17     ` Darrick J. Wong [this message]
2021-03-20 20:20       ` Gustavo A. R. Silva
2021-03-20 21:48         ` Darrick J. Wong
2021-04-09  6:54           ` Gustavo A. R. Silva
2021-04-10  0:08             ` Gustavo A. R. Silva

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=20210320201711.GY22100@magnolia \
    --to=djwong@kernel.org \
    --cc=david@fromorbit.com \
    --cc=gustavo@embeddedor.com \
    --cc=gustavoars@kernel.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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