From: Theodore Ts'o <tytso@mit.edu>
To: Andreas Dilger <adilger@dilger.ca>
Cc: Ext4 Developers List <linux-ext4@vger.kernel.org>
Subject: [PATCH] ext4: renumber EXT4_EX_* flags to avoid flag aliasing problems flags
Date: Tue, 2 Sep 2014 21:44:16 -0400 [thread overview]
Message-ID: <20140903014416.GA2504@thunk.org> (raw)
In-Reply-To: <A71E6FF0-16EC-4747-89E4-F9574A89FF89@dilger.ca>
On Tue, Sep 02, 2014 at 01:01:54PM -0600, Andreas Dilger wrote:
> Why not move EXT4_EX_*CACHE flags to the end of the range (e.g. 0x8000
> and 0x4000) to minimize potential conflicts in the future?
Good idea, thanks!
- Ted
commit ef78955523bffe055035f0b3a98aba31534bf27c
Author: Theodore Ts'o <tytso@mit.edu>
Date: Tue Sep 2 21:41:59 2014 -0400
ext4: renumber EXT4_EX_* flags to avoid flag aliasing problems
Suggested-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index 4855800..f70c3fc 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -569,7 +569,6 @@ enum {
#define EXT4_GET_BLOCKS_NO_PUT_HOLE 0x0200
/* Convert written extents to unwritten */
#define EXT4_GET_BLOCKS_CONVERT_UNWRITTEN 0x0400
-/* DO NOT ASSIGN ADDITIONAL FLAG VALUES WITHOUT ADJUSTING THE FLAGS BELOW */
/*
* The bit position of these flags must not overlap with any of the
@@ -580,8 +579,8 @@ enum {
* caching the extents when reading from the extent tree while a
* truncate or punch hole operation is in progress.
*/
-#define EXT4_EX_NOCACHE 0x0800
-#define EXT4_EX_FORCE_CACHE 0x1000
+#define EXT4_EX_NOCACHE 0x40000000
+#define EXT4_EX_FORCE_CACHE 0x20000000
/*
* Flags used by ext4_free_blocks
prev parent reply other threads:[~2014-09-03 1:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-31 20:00 [PATCH] ext4: fix accidental flag aliasing in ext4_map_blocks flags Theodore Ts'o
2014-09-01 18:33 ` [PATCH] ext4: fix ZERO_RANGE bug hidden by flag aliasing Theodore Ts'o
2014-09-02 19:01 ` [PATCH] ext4: fix accidental flag aliasing in ext4_map_blocks flags Andreas Dilger
2014-09-03 1:44 ` 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=20140903014416.GA2504@thunk.org \
--to=tytso@mit.edu \
--cc=adilger@dilger.ca \
--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).