From: Theodore Ts'o <tytso@mit.edu>
To: Carlos Maiolino <cmaiolino@redhat.com>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCH] ext4: Ensure Inode flags consistency are checked in build time [V2]
Date: Mon, 10 Dec 2012 15:01:38 -0500 [thread overview]
Message-ID: <20121210200138.GB5179@thunk.org> (raw)
In-Reply-To: <1354555976-18052-1-git-send-email-cmaiolino@redhat.com>
On Mon, Dec 03, 2012 at 03:32:56PM -0200, Carlos Maiolino wrote:
> Flags being used by atomic operations in inode flags (e.g.
> ext4_test_inode_flag(), should be consistent with that actually stored in
> inodes, i.e.: EXT4_XXX_FL.
>
> It ensures that this consistency is checked at build-time, not at run-time.
>
> Currently, the flags consistency are being checked at run-time, but, there is no
> real reason to not do a build-time check instead of a run-time check. The code
> is comparing macro defined values with enum type variables, where both are
> constants, so, there is no problem in comparing constants at build-time.
>
> enum variables are treated as constants by the C compiler, according to the C99
> specs (see www.open-std.org/jtc1/sc22/wg14/www/docs/n1124.pdf sec. 6.2.5, item
> 16), so, there is no real problem in comparing an enumeration type at build time
>
> CC'ing Sergio who helped me to achieve this conclusion, in case there is
> something else we need to discuss.
>
> Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com>
Thanks, applied.
- Ted
prev parent reply other threads:[~2012-12-10 20:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-03 17:32 [PATCH] ext4: Ensure Inode flags consistency are checked in build time [V2] Carlos Maiolino
2012-12-06 19:05 ` Carlos Maiolino
2012-12-10 20:01 ` Theodore Ts'o [this message]
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=20121210200138.GB5179@thunk.org \
--to=tytso@mit.edu \
--cc=cmaiolino@redhat.com \
--cc=linux-ext4@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).