From: Yongqiang Yang <xiaoqiangnk@gmail.com>
To: tytso@mit.edu
Cc: linux-ext4@vger.kernel.org, Yongqiang Yang <xiaoqiangnk@gmail.com>
Subject: [PATCH 3/4] ext4: let AGGRESSIVE_TEST brace code only related to itself
Date: Wed, 26 Oct 2011 15:11:51 +0800 [thread overview]
Message-ID: <1319613112-16807-3-git-send-email-xiaoqiangnk@gmail.com> (raw)
In-Reply-To: <1319613112-16807-1-git-send-email-xiaoqiangnk@gmail.com>
Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>
---
fs/ext4/extents.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index 8b09a47..49b4e28 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -182,12 +182,12 @@ static inline int ext4_ext_space_block(struct inode *inode, int check)
size = (inode->i_sb->s_blocksize - sizeof(struct ext4_extent_header))
/ sizeof(struct ext4_extent);
- if (!check) {
#ifdef AGGRESSIVE_TEST
+ if (!check) {
if (size > 6)
size = 6;
-#endif
}
+#endif
return size;
}
@@ -197,12 +197,12 @@ static inline int ext4_ext_space_block_idx(struct inode *inode, int check)
size = (inode->i_sb->s_blocksize - sizeof(struct ext4_extent_header))
/ sizeof(struct ext4_extent_idx);
- if (!check) {
#ifdef AGGRESSIVE_TEST
+ if (!check) {
if (size > 5)
size = 5;
-#endif
}
+#endif
return size;
}
@@ -213,12 +213,12 @@ static inline int ext4_ext_space_root(struct inode *inode, int check)
size = sizeof(EXT4_I(inode)->i_data);
size -= sizeof(struct ext4_extent_header);
size /= sizeof(struct ext4_extent);
- if (!check) {
#ifdef AGGRESSIVE_TEST
+ if (!check) {
if (size > 3)
size = 3;
-#endif
}
+#endif
return size;
}
@@ -229,12 +229,12 @@ static inline int ext4_ext_space_root_idx(struct inode *inode, int check)
size = sizeof(EXT4_I(inode)->i_data);
size -= sizeof(struct ext4_extent_header);
size /= sizeof(struct ext4_extent_idx);
- if (!check) {
#ifdef AGGRESSIVE_TEST
+ if (!check) {
if (size > 4)
size = 4;
-#endif
}
+#endif
return size;
}
--
1.7.5.1
next prev parent reply other threads:[~2011-10-26 9:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-26 7:11 [PATCH 1/4] ext4: fold two if statements into one Yongqiang Yang
2011-10-26 7:11 ` [PATCH 2/4] ext4: move variable to its scope Yongqiang Yang
2011-10-29 13:24 ` Ted Ts'o
2011-10-26 7:11 ` Yongqiang Yang [this message]
2011-10-29 13:30 ` [PATCH 3/4] ext4: let AGGRESSIVE_TEST brace code only related to itself Ted Ts'o
2011-10-26 7:11 ` [PATCH 4/4] ext4: trace punch_hole correctly in ext4_ext_map_blocks Yongqiang Yang
2011-10-29 13:51 ` Ted Ts'o
2011-10-29 13:14 ` [PATCH 1/4] ext4: fold two if statements into one Ted Ts'o
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=1319613112-16807-3-git-send-email-xiaoqiangnk@gmail.com \
--to=xiaoqiangnk@gmail.com \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
/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).