From: Yongqiang Yang <xiaoqiangnk@gmail.com>
To: linux-ext4@vger.kernel.org
Cc: adilger@gmail.com, Yongqiang Yang <xiaoqiangnk@gmail.com>
Subject: [PATCH 1/4] ext4: do not copy gdt blocks for groups which do not have super when resizing
Date: Mon, 30 Jan 2012 00:01:03 +0800 [thread overview]
Message-ID: <1327852866-4448-2-git-send-email-xiaoqiangnk@gmail.com> (raw)
In-Reply-To: <1327852866-4448-1-git-send-email-xiaoqiangnk@gmail.com>
There is no need to copy gdt blocks for groups which do not have super
in resizing code, so this patch let resize code skip the groups.
Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>
---
fs/ext4/resize.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c
index 59fa0be..9a6fb74 100644
--- a/fs/ext4/resize.c
+++ b/fs/ext4/resize.c
@@ -449,6 +449,9 @@ static int setup_new_flex_group_blocks(struct super_block *sb,
gdblocks = ext4_bg_num_gdb(sb, group);
start = ext4_group_first_block_no(sb, group);
+ if (!ext4_bg_has_super(sb, group))
+ goto handle_itb;
+
/* Copy all of the GDT blocks into the backup in this group */
for (j = 0, block = start + 1; j < gdblocks; j++, block++) {
struct buffer_head *gdb;
@@ -491,6 +494,7 @@ static int setup_new_flex_group_blocks(struct super_block *sb,
goto out;
}
+handle_itb:
/* Initialize group tables of the grop @group */
if (!(bg_flags[i] & EXT4_BG_INODE_ZEROED))
goto handle_bb;
--
1.7.5.1
next prev parent reply other threads:[~2012-03-22 13:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-29 16:01 ext4: add meta_bg and bit64 support to online resizing Yongqiang Yang
2012-01-29 16:01 ` Yongqiang Yang [this message]
2012-01-29 16:01 ` [PATCH 2/4] ext4: fix a bug in resize when first_data_block != 0 Yongqiang Yang
2012-01-29 16:01 ` [PATCH 3/4] ext4: accelerate updating of backup gdb Yongqiang Yang
2012-01-29 16:01 ` [PATCH 4/4] ext4: enable online-resizing support meta_bg and bit64 Yongqiang Yang
2012-03-22 16:00 ` Andreas Dilger
2012-03-23 18:02 ` ext4: add meta_bg and bit64 support to online resizing Anssi Hannula
2012-04-14 14:55 ` Anssi Hannula
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=1327852866-4448-2-git-send-email-xiaoqiangnk@gmail.com \
--to=xiaoqiangnk@gmail.com \
--cc=adilger@gmail.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).