From: David Sterba <dsterba@suse.cz>
To: Qu Wenruo <quwenruo.btrfs@gmx.com>
Cc: Nikolay Borisov <nborisov@suse.com>, Qu Wenruo <wqu@suse.com>,
linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs: Introduce compile time structure size check
Date: Fri, 13 Jul 2018 16:34:31 +0200 [thread overview]
Message-ID: <20180713143431.GX3126@twin.jikos.cz> (raw)
In-Reply-To: <50163977-ed21-3f97-dced-8bf08dfcfa33@gmx.com>
On Thu, Jul 12, 2018 at 02:56:55PM +0800, Qu Wenruo wrote:
>
>
> On 2018年07月12日 14:27, Nikolay Borisov wrote:
> >
> >
> > On 12.07.2018 09:19, Qu Wenruo wrote:
> >> Introduce a new macro based compile time check for ioctl structures.
> >>
> >> The new macro is BTRFS_ASSERT_SIZE(), which is mostly copied from
> >> VMMDEV_ASSERT_SIZE().
> >>
> >> Such check is only added to structure pended to power of 2.
> >> And exposed one structure, btrfs_ioctl_get_dev_stats() is not aligned
> >> well.
> >> The misalign is introduced by commit b27f7c0c150f ("btrfs: join DEV_STATS
> >> ioctls to one").
> >
> > So what's the negative effect if a structure is not aligned to a power of 2?
>
> No real negative effect, until one day one may find the comment is not
> correct.
So the comment needs to be fixed.
next prev parent reply other threads:[~2018-07-13 14:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-12 6:19 [PATCH] btrfs: Introduce compile time structure size check Qu Wenruo
2018-07-12 6:27 ` Nikolay Borisov
2018-07-12 6:56 ` Qu Wenruo
2018-07-13 14:34 ` David Sterba [this message]
2018-07-13 14:34 ` David Sterba
2018-07-13 14:36 ` Qu Wenruo
2018-07-13 14:46 ` David Sterba
2018-07-13 14:57 ` Qu Wenruo
2018-07-13 15:25 ` David Sterba
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=20180713143431.GX3126@twin.jikos.cz \
--to=dsterba@suse.cz \
--cc=linux-btrfs@vger.kernel.org \
--cc=nborisov@suse.com \
--cc=quwenruo.btrfs@gmx.com \
--cc=wqu@suse.com \
/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