All of lore.kernel.org
 help / color / mirror / Atom feed
* ext4: prevent parallel resizers and fix some error handling in resize
@ 2011-07-19  4:02 Yongqiang Yang
  2011-07-19  4:02 ` [PATCH v2 01/11] ext4: prevent parallel resizers by atomic bit ops Yongqiang Yang
                   ` (10 more replies)
  0 siblings, 11 replies; 22+ messages in thread
From: Yongqiang Yang @ 2011-07-19  4:02 UTC (permalink / raw)
  To: linux-ext4; +Cc: adilger, amir73il, tm

Hi,

This patch series prevents parallel resizers and fixes some error handling in
resize code.  Besides these, some code is simplified so that the code could be
used easily in new resize implementation.

In the new resize implementation, all work, like allocating group tables, are
done by kernel side, so it can support flex_bg feature and BLOCK_UNINIT, and
adds multi groups (a flex groups) each time, it thus is very fast.

Once the patch series are merged, the new resize implementation will be post
quickly.

I split the patches into 2 series to let the patches be reviewed easily.

v1->v2:
   -- add commit logs for the 8th and the 10th patches.
   -- fix error handling in the 4th patch.
   -- remove the patch which prevents a fs without journal fromn being resized.

The patch for no-journal mode is removed so that this patches can be merged quickly,
we can handle no-journal mode after new resize is merged.

[PATCH v2 01/11] ext4: prevent parallel resizers by atomic bit ops
[PATCH v2 02/11] ext4: prevent a fs with errors from being resized
[PATCH v2 03/11] ext4: rename ext4_add_groupblocks() to
[PATCH v2 04/11] ext4: let ext4_group_add_blocks() return an error
[PATCH v2 05/11] ext4: let ext4_group_add_blocks() handle 0 blocks
[PATCH v2 06/11] ext4: fix a typo in ext4_group_extend()
[PATCH v2 07/11] ext4: let setup_new_group_blocks() set multi-bits
[PATCH v2 08/11] ext4: simplify journal handling in
[PATCH v2 09/11] ext4: remove lock_buffer in bclean() and
[PATCH v2 10/11] ext4: simplify parameters of add_new_gdb()
[PATCH v2 11/11] ext4: simplify parameters of reserve_backup_gdb()

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH v2 01/11] ext4: prevent parallel resizers by atomic bit ops
  2011-07-19  4:02 ext4: prevent parallel resizers and fix some error handling in resize Yongqiang Yang
@ 2011-07-19  4:02 ` Yongqiang Yang
  2011-07-27  1:38   ` Ted Ts'o
  2011-07-19  4:02 ` [PATCH v2 02/11] ext4: prevent a fs with errors from being resized Yongqiang Yang
                   ` (9 subsequent siblings)
  10 siblings, 1 reply; 22+ messages in thread
From: Yongqiang Yang @ 2011-07-19  4:02 UTC (permalink / raw)
  To: linux-ext4; +Cc: adilger, amir73il, tm, Yongqiang Yang

Before this patch, parallel resizers are allowed and protected by a mutex lock,
actually, there is no need to support parallel resizer, so this patch prevents
parallel resizers by atmoic bit ops, like lock_page() and unlock_page() do.

To do this, the patch removed the mutex lock s_resize_lock from struct ext4_sb_info
and added a unsigned long field named s_resize_flags which inidicates if there is
a resizer.

Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>
---
 fs/ext4/ext4.h   |    7 +++++-
 fs/ext4/ioctl.c  |   12 +++++++---
 fs/ext4/resize.c |   55 ++++++++++++++++++++---------------------------------
 fs/ext4/super.c  |    2 +-
 4 files changed, 36 insertions(+), 40 deletions(-)

 v1->v2:
    nothing changed.
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index 62cee2b..bb0f776 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -1127,7 +1127,8 @@ struct ext4_sb_info {
 	struct journal_s *s_journal;
 	struct list_head s_orphan;
 	struct mutex s_orphan_lock;
-	struct mutex s_resize_lock;
+	unsigned long s_resize_flags;		/* Flags indicating if there
+						   is a resizer */
 	unsigned long s_commit_interval;
 	u32 s_max_batch_time;
 	u32 s_min_batch_time;
@@ -2269,6 +2270,10 @@ static inline void set_bitmap_uptodate(struct buffer_head *bh)
 extern wait_queue_head_t ext4__ioend_wq[EXT4_WQ_HASH_SZ];
 extern struct mutex ext4__aio_mutex[EXT4_WQ_HASH_SZ];
 
+#define EXT4_RESIZING	0
+extern int ext4_resize_begin(struct super_block *sb);
+extern void ext4_resize_end(struct super_block *sb);
+
 #endif	/* __KERNEL__ */
 
 #endif	/* _EXT4_H */
diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c
index 808c554..f18bfe3 100644
--- a/fs/ext4/ioctl.c
+++ b/fs/ext4/ioctl.c
@@ -202,8 +202,9 @@ setversion_out:
 		struct super_block *sb = inode->i_sb;
 		int err, err2=0;
 
-		if (!capable(CAP_SYS_RESOURCE))
-			return -EPERM;
+		err = ext4_resize_begin(sb);
+		if (err)
+			return err;
 
 		if (get_user(n_blocks_count, (__u32 __user *)arg))
 			return -EFAULT;
@@ -221,6 +222,7 @@ setversion_out:
 		if (err == 0)
 			err = err2;
 		mnt_drop_write(filp->f_path.mnt);
+		ext4_resize_end(sb);
 
 		return err;
 	}
@@ -271,8 +273,9 @@ mext_out:
 		struct super_block *sb = inode->i_sb;
 		int err, err2=0;
 
-		if (!capable(CAP_SYS_RESOURCE))
-			return -EPERM;
+		err = ext4_resize_begin(sb);
+		if (err)
+			return err;
 
 		if (copy_from_user(&input, (struct ext4_new_group_input __user *)arg,
 				sizeof(input)))
@@ -291,6 +294,7 @@ mext_out:
 		if (err == 0)
 			err = err2;
 		mnt_drop_write(filp->f_path.mnt);
+		ext4_resize_end(sb);
 
 		return err;
 	}
diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c
index 80bbc9c..0213f63 100644
--- a/fs/ext4/resize.c
+++ b/fs/ext4/resize.c
@@ -16,6 +16,25 @@
 
 #include "ext4_jbd2.h"
 
+int ext4_resize_begin(struct super_block *sb)
+{
+	int ret = 0;
+
+	if (!capable(CAP_SYS_RESOURCE))
+		return -EPERM;
+
+	if (test_and_set_bit_lock(EXT4_RESIZING, &EXT4_SB(sb)->s_resize_flags))
+		ret = -EBUSY;
+
+	return ret;
+}
+
+void ext4_resize_end(struct super_block *sb)
+{
+	clear_bit_unlock(EXT4_RESIZING, &EXT4_SB(sb)->s_resize_flags);
+	smp_mb__after_clear_bit();
+}
+
 #define outside(b, first, last)	((b) < (first) || (b) >= (last))
 #define inside(b, first, last)	((b) >= (first) && (b) < (last))
 
@@ -181,11 +200,7 @@ static int setup_new_group_blocks(struct super_block *sb,
 	if (IS_ERR(handle))
 		return PTR_ERR(handle);
 
-	mutex_lock(&sbi->s_resize_lock);
-	if (input->group != sbi->s_groups_count) {
-		err = -EBUSY;
-		goto exit_journal;
-	}
+	BUG_ON(input->group != sbi->s_groups_count);
 
 	if (IS_ERR(bh = bclean(handle, sb, input->block_bitmap))) {
 		err = PTR_ERR(bh);
@@ -285,7 +300,6 @@ exit_bh:
 	brelse(bh);
 
 exit_journal:
-	mutex_unlock(&sbi->s_resize_lock);
 	if ((err2 = ext4_journal_stop(handle)) && !err)
 		err = err2;
 
@@ -799,13 +813,6 @@ int ext4_group_add(struct super_block *sb, struct ext4_new_group_data *input)
 		goto exit_put;
 	}
 
-	mutex_lock(&sbi->s_resize_lock);
-	if (input->group != sbi->s_groups_count) {
-		ext4_warning(sb, "multiple resizers run on filesystem!");
-		err = -EBUSY;
-		goto exit_journal;
-	}
-
 	if ((err = ext4_journal_get_write_access(handle, sbi->s_sbh)))
 		goto exit_journal;
 
@@ -829,7 +836,6 @@ int ext4_group_add(struct super_block *sb, struct ext4_new_group_data *input)
         /*
          * OK, now we've set up the new group.  Time to make it active.
          *
-         * We do not lock all allocations via s_resize_lock
          * so we have to be safe wrt. concurrent accesses the group
          * data.  So we need to be careful to set all of the relevant
          * group descriptor data etc. *before* we enable the group.
@@ -886,13 +892,9 @@ int ext4_group_add(struct super_block *sb, struct ext4_new_group_data *input)
 	 *
 	 * The precise rules we use are:
 	 *
-	 * * Writers of s_groups_count *must* hold s_resize_lock
-	 * AND
 	 * * Writers must perform a smp_wmb() after updating all dependent
 	 *   data and before modifying the groups count
 	 *
-	 * * Readers must hold s_resize_lock over the access
-	 * OR
 	 * * Readers must perform an smp_rmb() after reading the groups count
 	 *   and before reading any dependent data.
 	 *
@@ -937,7 +939,6 @@ int ext4_group_add(struct super_block *sb, struct ext4_new_group_data *input)
 	ext4_handle_dirty_super(handle, sb);
 
 exit_journal:
-	mutex_unlock(&sbi->s_resize_lock);
 	if ((err2 = ext4_journal_stop(handle)) && !err)
 		err = err2;
 	if (!err) {
@@ -972,9 +973,6 @@ int ext4_group_extend(struct super_block *sb, struct ext4_super_block *es,
 	int err;
 	ext4_group_t group;
 
-	/* We don't need to worry about locking wrt other resizers just
-	 * yet: we're going to revalidate es->s_blocks_count after
-	 * taking the s_resize_lock below. */
 	o_blocks_count = ext4_blocks_count(es);
 
 	if (test_opt(sb, DEBUG))
@@ -995,7 +993,7 @@ int ext4_group_extend(struct super_block *sb, struct ext4_super_block *es,
 
 	if (n_blocks_count < o_blocks_count) {
 		ext4_warning(sb, "can't shrink FS - resize aborted");
-		return -EBUSY;
+		return -EINVAL;
 	}
 
 	/* Handle the remaining blocks in the last group only. */
@@ -1038,24 +1036,13 @@ int ext4_group_extend(struct super_block *sb, struct ext4_super_block *es,
 		goto exit_put;
 	}
 
-	mutex_lock(&EXT4_SB(sb)->s_resize_lock);
-	if (o_blocks_count != ext4_blocks_count(es)) {
-		ext4_warning(sb, "multiple resizers run on filesystem!");
-		mutex_unlock(&EXT4_SB(sb)->s_resize_lock);
-		ext4_journal_stop(handle);
-		err = -EBUSY;
-		goto exit_put;
-	}
-
 	if ((err = ext4_journal_get_write_access(handle,
 						 EXT4_SB(sb)->s_sbh))) {
 		ext4_warning(sb, "error %d on journal write access", err);
-		mutex_unlock(&EXT4_SB(sb)->s_resize_lock);
 		ext4_journal_stop(handle);
 		goto exit_put;
 	}
 	ext4_blocks_count_set(es, o_blocks_count + add);
-	mutex_unlock(&EXT4_SB(sb)->s_resize_lock);
 	ext4_debug("freeing blocks %llu through %llu\n", o_blocks_count,
 		   o_blocks_count + add);
 	/* We add the blocks to the bitmap and set the group need init bit */
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 7910e61..39c2992 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -3492,7 +3492,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
 
 	INIT_LIST_HEAD(&sbi->s_orphan); /* unlinked but open files */
 	mutex_init(&sbi->s_orphan_lock);
-	mutex_init(&sbi->s_resize_lock);
+	sbi->s_resize_flags = 0;
 
 	sb->s_root = NULL;
 
-- 
1.7.5.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH v2 02/11] ext4: prevent a fs with errors from being resized
  2011-07-19  4:02 ext4: prevent parallel resizers and fix some error handling in resize Yongqiang Yang
  2011-07-19  4:02 ` [PATCH v2 01/11] ext4: prevent parallel resizers by atomic bit ops Yongqiang Yang
@ 2011-07-19  4:02 ` Yongqiang Yang
  2011-07-27  1:42   ` Ted Ts'o
  2011-07-19  4:02 ` [PATCH v2 03/11] ext4: rename ext4_add_groupblocks() to ext4_group_add_blocks() Yongqiang Yang
                   ` (8 subsequent siblings)
  10 siblings, 1 reply; 22+ messages in thread
From: Yongqiang Yang @ 2011-07-19  4:02 UTC (permalink / raw)
  To: linux-ext4; +Cc: adilger, amir73il, tm, Yongqiang Yang

A filesystem with errors is not allowed to being resized, otherwise, it is
easy to destroy the filesystem.

Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>
---
 fs/ext4/resize.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

 v1->v2:
    nothing changed.
diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c
index 0213f63..53d9795 100644
--- a/fs/ext4/resize.c
+++ b/fs/ext4/resize.c
@@ -23,6 +23,16 @@ int ext4_resize_begin(struct super_block *sb)
 	if (!capable(CAP_SYS_RESOURCE))
 		return -EPERM;
 
+	/*
+	 * We are not allowed to do online-resizing on a filesystem mounted
+	 * with error, because it can destroy the filesystem easily.
+	 */
+	if (EXT4_SB(sb)->s_mount_state & EXT4_ERROR_FS) {
+		ext4_warning(sb, "There are errors in the filesystem, "
+			     "so online resizing is not allowed\n");
+		return -EPERM;
+	}
+
 	if (test_and_set_bit_lock(EXT4_RESIZING, &EXT4_SB(sb)->s_resize_flags))
 		ret = -EBUSY;
 
-- 
1.7.5.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH v2 03/11] ext4: rename ext4_add_groupblocks() to ext4_group_add_blocks()
  2011-07-19  4:02 ext4: prevent parallel resizers and fix some error handling in resize Yongqiang Yang
  2011-07-19  4:02 ` [PATCH v2 01/11] ext4: prevent parallel resizers by atomic bit ops Yongqiang Yang
  2011-07-19  4:02 ` [PATCH v2 02/11] ext4: prevent a fs with errors from being resized Yongqiang Yang
@ 2011-07-19  4:02 ` Yongqiang Yang
  2011-07-27  1:45   ` Ted Ts'o
  2011-07-19  4:02 ` [PATCH v2 04/11] ext4: let ext4_group_add_blocks() return an error code Yongqiang Yang
                   ` (7 subsequent siblings)
  10 siblings, 1 reply; 22+ messages in thread
From: Yongqiang Yang @ 2011-07-19  4:02 UTC (permalink / raw)
  To: linux-ext4; +Cc: adilger, amir73il, tm, Yongqiang Yang

This patch renamed ext4_add_groupblocks() to ext4_group_add_blocks().

Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>
---
 fs/ext4/ext4.h    |    2 +-
 fs/ext4/mballoc.c |    4 ++--
 fs/ext4/resize.c  |    2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

 v1->v2:
   nothing changed.
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index bb0f776..bbe81db 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -1799,7 +1799,7 @@ extern void ext4_free_blocks(handle_t *handle, struct inode *inode,
 			     unsigned long count, int flags);
 extern int ext4_mb_add_groupinfo(struct super_block *sb,
 		ext4_group_t i, struct ext4_group_desc *desc);
-extern void ext4_add_groupblocks(handle_t *handle, struct super_block *sb,
+extern void ext4_group_add_blocks(handle_t *handle, struct super_block *sb,
 				ext4_fsblk_t block, unsigned long count);
 extern int ext4_trim_fs(struct super_block *, struct fstrim_range *);
 
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index b97a2d2..ea80c0b 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -4656,7 +4656,7 @@ error_return:
 }
 
 /**
- * ext4_add_groupblocks() -- Add given blocks to an existing group
+ * ext4_group_add_blocks() -- Add given blocks to an existing group
  * @handle:			handle to this transaction
  * @sb:				super block
  * @block:			start physcial block to add to the block group
@@ -4664,7 +4664,7 @@ error_return:
  *
  * This marks the blocks as free in the bitmap and buddy.
  */
-void ext4_add_groupblocks(handle_t *handle, struct super_block *sb,
+void ext4_group_add_blocks(handle_t *handle, struct super_block *sb,
 			 ext4_fsblk_t block, unsigned long count)
 {
 	struct buffer_head *bitmap_bh = NULL;
diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c
index 53d9795..d241ecb 100644
--- a/fs/ext4/resize.c
+++ b/fs/ext4/resize.c
@@ -1056,7 +1056,7 @@ int ext4_group_extend(struct super_block *sb, struct ext4_super_block *es,
 	ext4_debug("freeing blocks %llu through %llu\n", o_blocks_count,
 		   o_blocks_count + add);
 	/* We add the blocks to the bitmap and set the group need init bit */
-	ext4_add_groupblocks(handle, sb, o_blocks_count, add);
+	ext4_group_add_blocks(handle, sb, o_blocks_count, add);
 	ext4_handle_dirty_super(handle, sb);
 	ext4_debug("freed blocks %llu through %llu\n", o_blocks_count,
 		   o_blocks_count + add);
-- 
1.7.5.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH v2 04/11] ext4: let ext4_group_add_blocks() return an error code
  2011-07-19  4:02 ext4: prevent parallel resizers and fix some error handling in resize Yongqiang Yang
                   ` (2 preceding siblings ...)
  2011-07-19  4:02 ` [PATCH v2 03/11] ext4: rename ext4_add_groupblocks() to ext4_group_add_blocks() Yongqiang Yang
@ 2011-07-19  4:02 ` Yongqiang Yang
  2011-07-27  1:49   ` Ted Ts'o
  2011-07-19  4:02 ` [PATCH v2 05/11] ext4: let ext4_group_add_blocks() handle 0 blocks quickly Yongqiang Yang
                   ` (6 subsequent siblings)
  10 siblings, 1 reply; 22+ messages in thread
From: Yongqiang Yang @ 2011-07-19  4:02 UTC (permalink / raw)
  To: linux-ext4; +Cc: adilger, amir73il, tm, Yongqiang Yang

This patch lets ext4_group_add_blocks() return an error code if it fails,
so that upper functions can handle error correctly.

Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>
---
 fs/ext4/ext4.h    |    2 +-
 fs/ext4/mballoc.c |   20 +++++++++++++++-----
 fs/ext4/resize.c  |   10 +++++++---
 3 files changed, 23 insertions(+), 9 deletions(-)

 v1->v2:
   let all error case fall to ext4_std_error().
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index bbe81db..da7ab48 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -1799,7 +1799,7 @@ extern void ext4_free_blocks(handle_t *handle, struct inode *inode,
 			     unsigned long count, int flags);
 extern int ext4_mb_add_groupinfo(struct super_block *sb,
 		ext4_group_t i, struct ext4_group_desc *desc);
-extern void ext4_group_add_blocks(handle_t *handle, struct super_block *sb,
+extern int ext4_group_add_blocks(handle_t *handle, struct super_block *sb,
 				ext4_fsblk_t block, unsigned long count);
 extern int ext4_trim_fs(struct super_block *, struct fstrim_range *);
 
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index ea80c0b..48784eb 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -4664,7 +4664,7 @@ error_return:
  *
  * This marks the blocks as free in the bitmap and buddy.
  */
-void ext4_group_add_blocks(handle_t *handle, struct super_block *sb,
+int ext4_group_add_blocks(handle_t *handle, struct super_block *sb,
 			 ext4_fsblk_t block, unsigned long count)
 {
 	struct buffer_head *bitmap_bh = NULL;
@@ -4685,15 +4685,24 @@ void ext4_group_add_blocks(handle_t *handle, struct super_block *sb,
 	 * Check to see if we are freeing blocks across a group
 	 * boundary.
 	 */
-	if (bit + count > EXT4_BLOCKS_PER_GROUP(sb))
+	if (bit + count > EXT4_BLOCKS_PER_GROUP(sb)) {
+		ext4_warning(sb, "too much blocks added to group %u\n",
+			     block_group);
+		err = -EINVAL;
 		goto error_return;
+	}
 
 	bitmap_bh = ext4_read_block_bitmap(sb, block_group);
-	if (!bitmap_bh)
+	if (!bitmap_bh) {
+		err = -EIO;
 		goto error_return;
+	}
+
 	desc = ext4_get_group_desc(sb, block_group, &gd_bh);
-	if (!desc)
+	if (!desc) {
+		err = -EIO;
 		goto error_return;
+	}
 
 	if (in_range(ext4_block_bitmap(sb, desc), block, count) ||
 	    in_range(ext4_inode_bitmap(sb, desc), block, count) ||
@@ -4703,6 +4712,7 @@ void ext4_group_add_blocks(handle_t *handle, struct super_block *sb,
 		ext4_error(sb, "Adding blocks in system zones - "
 			   "Block = %llu, count = %lu",
 			   block, count);
+		err = -EINVAL;
 		goto error_return;
 	}
 
@@ -4771,7 +4781,7 @@ void ext4_group_add_blocks(handle_t *handle, struct super_block *sb,
 error_return:
 	brelse(bitmap_bh);
 	ext4_std_error(sb, err);
-	return;
+	return err;
 }
 
 /**
diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c
index d241ecb..4c041e3 100644
--- a/fs/ext4/resize.c
+++ b/fs/ext4/resize.c
@@ -980,7 +980,7 @@ int ext4_group_extend(struct super_block *sb, struct ext4_super_block *es,
 	ext4_grpblk_t add;
 	struct buffer_head *bh;
 	handle_t *handle;
-	int err;
+	int err, err2;
 	ext4_group_t group;
 
 	o_blocks_count = ext4_blocks_count(es);
@@ -1056,11 +1056,15 @@ int ext4_group_extend(struct super_block *sb, struct ext4_super_block *es,
 	ext4_debug("freeing blocks %llu through %llu\n", o_blocks_count,
 		   o_blocks_count + add);
 	/* We add the blocks to the bitmap and set the group need init bit */
-	ext4_group_add_blocks(handle, sb, o_blocks_count, add);
+	err = ext4_group_add_blocks(handle, sb, o_blocks_count, add);
 	ext4_handle_dirty_super(handle, sb);
 	ext4_debug("freed blocks %llu through %llu\n", o_blocks_count,
 		   o_blocks_count + add);
-	if ((err = ext4_journal_stop(handle)))
+	err2 = ext4_journal_stop(handle);
+	if (!err && err2)
+		err = err2;
+
+	if (err)
 		goto exit_put;
 
 	if (test_opt(sb, DEBUG))
-- 
1.7.5.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH v2 05/11] ext4: let ext4_group_add_blocks() handle 0 blocks quickly
  2011-07-19  4:02 ext4: prevent parallel resizers and fix some error handling in resize Yongqiang Yang
                   ` (3 preceding siblings ...)
  2011-07-19  4:02 ` [PATCH v2 04/11] ext4: let ext4_group_add_blocks() return an error code Yongqiang Yang
@ 2011-07-19  4:02 ` Yongqiang Yang
  2011-07-27  1:52   ` Ted Ts'o
  2011-07-19  4:02 ` [PATCH v2 06/11] ext4: fix a typo in ext4_group_extend() Yongqiang Yang
                   ` (5 subsequent siblings)
  10 siblings, 1 reply; 22+ messages in thread
From: Yongqiang Yang @ 2011-07-19  4:02 UTC (permalink / raw)
  To: linux-ext4; +Cc: adilger, amir73il, tm, Yongqiang Yang

If ext4_group_add_blocks() is called with 0 block, it just return 0.

Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>
---
 fs/ext4/mballoc.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

 v1->v2:
    nothing changed.
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index 48784eb..397e27c 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -4680,6 +4680,9 @@ int ext4_group_add_blocks(handle_t *handle, struct super_block *sb,
 
 	ext4_debug("Adding block(s) %llu-%llu\n", block, block + count - 1);
 
+	if (count == 0)
+		return 0;
+
 	ext4_get_group_no_and_offset(sb, block, &block_group, &bit);
 	/*
 	 * Check to see if we are freeing blocks across a group
-- 
1.7.5.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH v2 06/11] ext4: fix a typo in ext4_group_extend()
  2011-07-19  4:02 ext4: prevent parallel resizers and fix some error handling in resize Yongqiang Yang
                   ` (4 preceding siblings ...)
  2011-07-19  4:02 ` [PATCH v2 05/11] ext4: let ext4_group_add_blocks() handle 0 blocks quickly Yongqiang Yang
@ 2011-07-19  4:02 ` Yongqiang Yang
  2011-07-27  1:54   ` Ted Ts'o
  2011-07-19  4:02 ` [PATCH v2 07/11] ext4: let setup_new_group_blocks() set multi-bits each time Yongqiang Yang
                   ` (4 subsequent siblings)
  10 siblings, 1 reply; 22+ messages in thread
From: Yongqiang Yang @ 2011-07-19  4:02 UTC (permalink / raw)
  To: linux-ext4; +Cc: adilger, amir73il, tm, Yongqiang Yang

This patch fixed a typo in ext4_group_extend().

Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>
---
 fs/ext4/resize.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

 v1->v2:
   nothing changed.
diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c
index 4c041e3..5f0aefd 100644
--- a/fs/ext4/resize.c
+++ b/fs/ext4/resize.c
@@ -986,7 +986,7 @@ int ext4_group_extend(struct super_block *sb, struct ext4_super_block *es,
 	o_blocks_count = ext4_blocks_count(es);
 
 	if (test_opt(sb, DEBUG))
-		printk(KERN_DEBUG "EXT4-fs: extending last group from %llu uto %llu blocks\n",
+		printk(KERN_DEBUG "EXT4-fs: extending last group from %llu to %llu blocks\n",
 		       o_blocks_count, n_blocks_count);
 
 	if (n_blocks_count == 0 || n_blocks_count == o_blocks_count)
-- 
1.7.5.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH v2 07/11] ext4: let setup_new_group_blocks() set multi-bits each time
  2011-07-19  4:02 ext4: prevent parallel resizers and fix some error handling in resize Yongqiang Yang
                   ` (5 preceding siblings ...)
  2011-07-19  4:02 ` [PATCH v2 06/11] ext4: fix a typo in ext4_group_extend() Yongqiang Yang
@ 2011-07-19  4:02 ` Yongqiang Yang
  2011-07-27  2:15   ` [PATCH] ext4: let setup_new_group_blocks() set multiple bits at a time Theodore Ts'o
  2011-07-19  4:02 ` [PATCH v2 08/11] ext4: simplify journal handling in setup_new_group_blocks() Yongqiang Yang
                   ` (3 subsequent siblings)
  10 siblings, 1 reply; 22+ messages in thread
From: Yongqiang Yang @ 2011-07-19  4:02 UTC (permalink / raw)
  To: linux-ext4; +Cc: adilger, amir73il, tm, Yongqiang Yang

This patch adds a function - ext4_set_btis() which can set multi-bits
each time, and lets setup_new_group_blocks() use ext4_set_bits().

Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>
---
 fs/ext4/ext4.h    |    1 +
 fs/ext4/mballoc.c |    5 +++++
 fs/ext4/resize.c  |   18 +++++++-----------
 3 files changed, 13 insertions(+), 11 deletions(-)

 v1->v2:
    nothing changed.
    
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index da7ab48..43e7448 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -940,6 +940,7 @@ struct ext4_inode_info {
 #define ext4_find_next_zero_bit		find_next_zero_bit_le
 #define ext4_find_next_bit		find_next_bit_le
 
+extern void ext4_set_bits(void *bm, int cur, int len);
 /*
  * Maximal mount counts between two filesystem checks
  */
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index 397e27c..1efbfea 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -1299,6 +1299,11 @@ static void mb_set_bits(void *bm, int cur, int len)
 	}
 }
 
+void ext4_set_bits(void *bm, int cur, int len)
+{
+	mb_set_bits(bm, cur, len);
+}
+
 static void mb_free_blocks(struct inode *inode, struct ext4_buddy *e4b,
 			  int first, int count)
 {
diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c
index 5f0aefd..178fb2f 100644
--- a/fs/ext4/resize.c
+++ b/fs/ext4/resize.c
@@ -217,11 +217,6 @@ static int setup_new_group_blocks(struct super_block *sb,
 		goto exit_journal;
 	}
 
-	if (ext4_bg_has_super(sb, input->group)) {
-		ext4_debug("mark backup superblock %#04llx (+0)\n", start);
-		ext4_set_bit(0, bh->b_data);
-	}
-
 	/* Copy all of the GDT blocks into the backup in this group */
 	for (i = 0, bit = 1, block = start + 1;
 	     i < gdblocks; i++, block++, bit++) {
@@ -250,7 +245,6 @@ static int setup_new_group_blocks(struct super_block *sb,
 			brelse(gdb);
 			goto exit_bh;
 		}
-		ext4_set_bit(bit, bh->b_data);
 		brelse(gdb);
 	}
 
@@ -261,8 +255,11 @@ static int setup_new_group_blocks(struct super_block *sb,
 			       GFP_NOFS);
 	if (err)
 		goto exit_bh;
-	for (i = 0, bit = gdblocks + 1; i < reserved_gdb; i++, bit++)
-		ext4_set_bit(bit, bh->b_data);
+
+	if (ext4_bg_has_super(sb, input->group)) {
+		ext4_debug("mark backup group tables %#04llx (+0)\n", start);
+		ext4_set_bits(bh->b_data, 0, gdblocks + reserved_gdb + 1);
+	}
 
 	ext4_debug("mark block bitmap %#04llx (+%llu)\n", input->block_bitmap,
 		   input->block_bitmap - start);
@@ -278,9 +275,8 @@ static int setup_new_group_blocks(struct super_block *sb,
 	err = sb_issue_zeroout(sb, block, sbi->s_itb_per_group, GFP_NOFS);
 	if (err)
 		goto exit_bh;
-	for (i = 0, bit = input->inode_table - start;
-	     i < sbi->s_itb_per_group; i++, bit++)
-		ext4_set_bit(bit, bh->b_data);
+	ext4_set_bits(bh->b_data, input->inode_table - start,
+		      sbi->s_itb_per_group);
 
 	if ((err = extend_or_restart_transaction(handle, 2, bh)))
 		goto exit_bh;
-- 
1.7.5.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH v2 08/11] ext4: simplify journal handling in setup_new_group_blocks()
  2011-07-19  4:02 ext4: prevent parallel resizers and fix some error handling in resize Yongqiang Yang
                   ` (6 preceding siblings ...)
  2011-07-19  4:02 ` [PATCH v2 07/11] ext4: let setup_new_group_blocks() set multi-bits each time Yongqiang Yang
@ 2011-07-19  4:02 ` Yongqiang Yang
  2011-07-27  2:23   ` Ted Ts'o
  2011-07-19  4:02 ` [PATCH v2 09/11] ext4: remove lock_buffer in bclean() and setup_new_group_blocks() Yongqiang Yang
                   ` (2 subsequent siblings)
  10 siblings, 1 reply; 22+ messages in thread
From: Yongqiang Yang @ 2011-07-19  4:02 UTC (permalink / raw)
  To: linux-ext4; +Cc: adilger, amir73il, tm, Yongqiang Yang

This patch simplifies journal handling in setup_new_group_blocks().

In previous code, block bitmap is modified everywhere in
setup_new_group_blocks(), ext4_get_write_access() in
extend_or_restart_transaction() is used to guarantee that the block bitmap
stays in the new handle, this makes things complicated.

In this patch the modifications on the block bitmap are batched and done
by ext4_set_bits() after reqesting a handle from extend_or_restart_transaction()
with enough credits.  So ext4_get_write_access() can be removed from
extend_or_restart_transaction().

Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>
---
 fs/ext4/resize.c |   39 ++++++++++++++++++++-------------------
 1 files changed, 20 insertions(+), 19 deletions(-)

 v1->v2:
    add commit log explainning it is safe to remove
    ext4_get_write_access() from extend_or_restart_transaction().

diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c
index 178fb2f..5b423f8 100644
--- a/fs/ext4/resize.c
+++ b/fs/ext4/resize.c
@@ -161,8 +161,7 @@ static struct buffer_head *bclean(handle_t *handle, struct super_block *sb,
  * If that fails, restart the transaction & regain write access for the
  * buffer head which is used for block_bitmap modifications.
  */
-static int extend_or_restart_transaction(handle_t *handle, int thresh,
-					 struct buffer_head *bh)
+static int extend_or_restart_transaction(handle_t *handle, int thresh)
 {
 	int err;
 
@@ -173,9 +172,8 @@ static int extend_or_restart_transaction(handle_t *handle, int thresh,
 	if (err < 0)
 		return err;
 	if (err) {
-		if ((err = ext4_journal_restart(handle, EXT4_MAX_TRANS_DATA)))
-			return err;
-		if ((err = ext4_journal_get_write_access(handle, bh)))
+		err = ext4_journal_restart(handle, EXT4_MAX_TRANS_DATA);
+		if (err)
 			return err;
 	}
 
@@ -212,29 +210,24 @@ static int setup_new_group_blocks(struct super_block *sb,
 
 	BUG_ON(input->group != sbi->s_groups_count);
 
-	if (IS_ERR(bh = bclean(handle, sb, input->block_bitmap))) {
-		err = PTR_ERR(bh);
-		goto exit_journal;
-	}
-
 	/* Copy all of the GDT blocks into the backup in this group */
 	for (i = 0, bit = 1, block = start + 1;
 	     i < gdblocks; i++, block++, bit++) {
 		struct buffer_head *gdb;
 
 		ext4_debug("update backup group %#04llx (+%d)\n", block, bit);
-
-		if ((err = extend_or_restart_transaction(handle, 1, bh)))
-			goto exit_bh;
+		err = extend_or_restart_transaction(handle, 1);
+		if (err)
+			goto exit_journal;
 
 		gdb = sb_getblk(sb, block);
 		if (!gdb) {
 			err = -EIO;
-			goto exit_bh;
+			goto exit_journal;
 		}
 		if ((err = ext4_journal_get_write_access(handle, gdb))) {
 			brelse(gdb);
-			goto exit_bh;
+			goto exit_journal;
 		}
 		lock_buffer(gdb);
 		memcpy(gdb->b_data, sbi->s_group_desc[i]->b_data, gdb->b_size);
@@ -243,7 +236,7 @@ static int setup_new_group_blocks(struct super_block *sb,
 		err = ext4_handle_dirty_metadata(handle, NULL, gdb);
 		if (unlikely(err)) {
 			brelse(gdb);
-			goto exit_bh;
+			goto exit_journal;
 		}
 		brelse(gdb);
 	}
@@ -254,7 +247,17 @@ static int setup_new_group_blocks(struct super_block *sb,
 	err = sb_issue_zeroout(sb, gdblocks + start + 1, reserved_gdb,
 			       GFP_NOFS);
 	if (err)
-		goto exit_bh;
+		goto exit_journal;
+
+	err = extend_or_restart_transaction(handle, 2);
+	if (err)
+		goto exit_journal;
+
+	bh = bclean(handle, sb, input->block_bitmap);
+	if (IS_ERR(bh)) {
+		err = PTR_ERR(bh);
+		goto exit_journal;
+	}
 
 	if (ext4_bg_has_super(sb, input->group)) {
 		ext4_debug("mark backup group tables %#04llx (+0)\n", start);
@@ -278,8 +281,6 @@ static int setup_new_group_blocks(struct super_block *sb,
 	ext4_set_bits(bh->b_data, input->inode_table - start,
 		      sbi->s_itb_per_group);
 
-	if ((err = extend_or_restart_transaction(handle, 2, bh)))
-		goto exit_bh;
 
 	ext4_mark_bitmap_end(input->blocks_count, sb->s_blocksize * 8,
 			     bh->b_data);
-- 
1.7.5.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH v2 09/11] ext4: remove lock_buffer in bclean() and setup_new_group_blocks()
  2011-07-19  4:02 ext4: prevent parallel resizers and fix some error handling in resize Yongqiang Yang
                   ` (7 preceding siblings ...)
  2011-07-19  4:02 ` [PATCH v2 08/11] ext4: simplify journal handling in setup_new_group_blocks() Yongqiang Yang
@ 2011-07-19  4:02 ` Yongqiang Yang
  2011-07-28  0:45   ` Ted Ts'o
  2011-07-19  4:02 ` [PATCH v2 10/11] ext4: simplify parameters of add_new_gdb() Yongqiang Yang
  2011-07-19  4:02 ` [PATCH v2 11/11] ext4: simplify parameters of reserve_backup_gdb() Yongqiang Yang
  10 siblings, 1 reply; 22+ messages in thread
From: Yongqiang Yang @ 2011-07-19  4:02 UTC (permalink / raw)
  To: linux-ext4; +Cc: adilger, amir73il, tm, Yongqiang Yang

Nobody touchs blocks beyond the filesystem, there is no need to lock
the buffers.

Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>
---
 fs/ext4/resize.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

 v1->v2:
   nothing changed.

diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c
index 5b423f8..65e5cb6 100644
--- a/fs/ext4/resize.c
+++ b/fs/ext4/resize.c
@@ -147,10 +147,8 @@ static struct buffer_head *bclean(handle_t *handle, struct super_block *sb,
 		brelse(bh);
 		bh = ERR_PTR(err);
 	} else {
-		lock_buffer(bh);
 		memset(bh->b_data, 0, sb->s_blocksize);
 		set_buffer_uptodate(bh);
-		unlock_buffer(bh);
 	}
 
 	return bh;
@@ -229,10 +227,8 @@ static int setup_new_group_blocks(struct super_block *sb,
 			brelse(gdb);
 			goto exit_journal;
 		}
-		lock_buffer(gdb);
 		memcpy(gdb->b_data, sbi->s_group_desc[i]->b_data, gdb->b_size);
 		set_buffer_uptodate(gdb);
-		unlock_buffer(gdb);
 		err = ext4_handle_dirty_metadata(handle, NULL, gdb);
 		if (unlikely(err)) {
 			brelse(gdb);
-- 
1.7.5.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH v2 10/11] ext4: simplify parameters of add_new_gdb()
  2011-07-19  4:02 ext4: prevent parallel resizers and fix some error handling in resize Yongqiang Yang
                   ` (8 preceding siblings ...)
  2011-07-19  4:02 ` [PATCH v2 09/11] ext4: remove lock_buffer in bclean() and setup_new_group_blocks() Yongqiang Yang
@ 2011-07-19  4:02 ` Yongqiang Yang
  2011-07-28  1:21   ` [PATCH -v3] " Theodore Ts'o
  2011-07-19  4:02 ` [PATCH v2 11/11] ext4: simplify parameters of reserve_backup_gdb() Yongqiang Yang
  10 siblings, 1 reply; 22+ messages in thread
From: Yongqiang Yang @ 2011-07-19  4:02 UTC (permalink / raw)
  To: linux-ext4; +Cc: adilger, amir73il, tm, Yongqiang Yang

add_new_gdb() only needs the no. of a group, there is no need to pass
a pointer to struct ext4_new_group_data to add_new_gdb().  There was a
pointer to struct buffer_head passed to add_new_gdb() to get group descriptor
buffer, actually, add_new_gdb() stores buffer pointer for new group descriptor
block in s_group_desc, thus we can get it from s_group_desc after add_new_gdb()
returns.

Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>
---
 fs/ext4/resize.c |   37 +++++++++++++++++++++++--------------
 1 files changed, 23 insertions(+), 14 deletions(-)

 v1->v2:
    add commit log and comments explaning why primary can be removed.

diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c
index 65e5cb6..7964ed9 100644
--- a/fs/ext4/resize.c
+++ b/fs/ext4/resize.c
@@ -394,15 +394,15 @@ static int verify_reserved_gdb(struct super_block *sb,
  * fail once we start modifying the data on disk, because JBD has no rollback.
  */
 static int add_new_gdb(handle_t *handle, struct inode *inode,
-		       struct ext4_new_group_data *input,
-		       struct buffer_head **primary)
+		       ext4_group_t group)
 {
 	struct super_block *sb = inode->i_sb;
 	struct ext4_super_block *es = EXT4_SB(sb)->s_es;
-	unsigned long gdb_num = input->group / EXT4_DESC_PER_BLOCK(sb);
+	unsigned long gdb_num = group / EXT4_DESC_PER_BLOCK(sb);
 	ext4_fsblk_t gdblock = EXT4_SB(sb)->s_sbh->b_blocknr + 1 + gdb_num;
 	struct buffer_head **o_group_desc, **n_group_desc;
 	struct buffer_head *dind;
+	struct buffer_head *gdb_bh;
 	int gdbackups;
 	struct ext4_iloc iloc;
 	__le32 *data;
@@ -425,11 +425,12 @@ static int add_new_gdb(handle_t *handle, struct inode *inode,
 		return -EPERM;
 	}
 
-	*primary = sb_bread(sb, gdblock);
-	if (!*primary)
+	gdb_bh = sb_bread(sb, gdblock);
+	if (!gdb_bh)
 		return -EIO;
 
-	if ((gdbackups = verify_reserved_gdb(sb, *primary)) < 0) {
+	gdbackups = verify_reserved_gdb(sb, gdb_bh);
+	if (gdbackups < 0) {
 		err = gdbackups;
 		goto exit_bh;
 	}
@@ -444,7 +445,7 @@ static int add_new_gdb(handle_t *handle, struct inode *inode,
 	data = (__le32 *)dind->b_data;
 	if (le32_to_cpu(data[gdb_num % EXT4_ADDR_PER_BLOCK(sb)]) != gdblock) {
 		ext4_warning(sb, "new group %u GDT block %llu not reserved",
-			     input->group, gdblock);
+			     group, gdblock);
 		err = -EINVAL;
 		goto exit_dind;
 	}
@@ -453,7 +454,7 @@ static int add_new_gdb(handle_t *handle, struct inode *inode,
 	if (unlikely(err))
 		goto exit_dind;
 
-	err = ext4_journal_get_write_access(handle, *primary);
+	err = ext4_journal_get_write_access(handle, gdb_bh);
 	if (unlikely(err))
 		goto exit_sbh;
 
@@ -492,8 +493,8 @@ static int add_new_gdb(handle_t *handle, struct inode *inode,
 	}
 	inode->i_blocks -= (gdbackups + 1) * sb->s_blocksize >> 9;
 	ext4_mark_iloc_dirty(handle, inode, &iloc);
-	memset((*primary)->b_data, 0, sb->s_blocksize);
-	err = ext4_handle_dirty_metadata(handle, NULL, *primary);
+	memset(gdb_bh->b_data, 0, sb->s_blocksize);
+	err = ext4_handle_dirty_metadata(handle, NULL, gdb_bh);
 	if (unlikely(err)) {
 		ext4_std_error(sb, err);
 		goto exit_inode;
@@ -503,7 +504,7 @@ static int add_new_gdb(handle_t *handle, struct inode *inode,
 	o_group_desc = EXT4_SB(sb)->s_group_desc;
 	memcpy(n_group_desc, o_group_desc,
 	       EXT4_SB(sb)->s_gdb_count * sizeof(struct buffer_head *));
-	n_group_desc[gdb_num] = *primary;
+	n_group_desc[gdb_num] = gdb_bh;
 	EXT4_SB(sb)->s_group_desc = n_group_desc;
 	EXT4_SB(sb)->s_gdb_count++;
 	kfree(o_group_desc);
@@ -525,7 +526,7 @@ exit_sbh:
 exit_dind:
 	brelse(dind);
 exit_bh:
-	brelse(*primary);
+	brelse(gdb_bh);
 
 	ext4_debug("leaving with error %d\n", err);
 	return err;
@@ -833,8 +834,16 @@ int ext4_group_add(struct super_block *sb, struct ext4_new_group_data *input)
 		if (reserved_gdb && ext4_bg_num_gdb(sb, input->group) &&
 		    (err = reserve_backup_gdb(handle, inode, input)))
 			goto exit_journal;
-	} else if ((err = add_new_gdb(handle, inode, input, &primary)))
-		goto exit_journal;
+	} else {
+		/*
+		 * Note that we can access new group descriptor block safely
+		 * only if add_new_gdb() succeeds.
+		 */
+		err = add_new_gdb(handle, inode, input->group);
+		if (err)
+			goto exit_journal;
+		primary = sbi->s_group_desc[gdb_num];
+	}
 
         /*
          * OK, now we've set up the new group.  Time to make it active.
-- 
1.7.5.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH v2 11/11] ext4: simplify parameters of reserve_backup_gdb()
  2011-07-19  4:02 ext4: prevent parallel resizers and fix some error handling in resize Yongqiang Yang
                   ` (9 preceding siblings ...)
  2011-07-19  4:02 ` [PATCH v2 10/11] ext4: simplify parameters of add_new_gdb() Yongqiang Yang
@ 2011-07-19  4:02 ` Yongqiang Yang
  10 siblings, 0 replies; 22+ messages in thread
From: Yongqiang Yang @ 2011-07-19  4:02 UTC (permalink / raw)
  To: linux-ext4; +Cc: adilger, amir73il, tm, Yongqiang Yang

reserve_backup_gdb() only needs the no. of a group, there is no need to pass
a pointer to struct ext4_new_group_data to it.

Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>
---
 fs/ext4/resize.c |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

 v1->v2:
    nothing changed.

diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c
index 7964ed9..19c217e 100644
--- a/fs/ext4/resize.c
+++ b/fs/ext4/resize.c
@@ -546,7 +546,7 @@ exit_bh:
  * backup GDT blocks are stored in their reserved primary GDT block.
  */
 static int reserve_backup_gdb(handle_t *handle, struct inode *inode,
-			      struct ext4_new_group_data *input)
+			      ext4_group_t group)
 {
 	struct super_block *sb = inode->i_sb;
 	int reserved_gdb =le16_to_cpu(EXT4_SB(sb)->s_es->s_reserved_gdt_blocks);
@@ -617,7 +617,7 @@ static int reserve_backup_gdb(handle_t *handle, struct inode *inode,
 	 * Finally we can add each of the reserved backup GDT blocks from
 	 * the new group to its reserved primary GDT block.
 	 */
-	blk = input->group * EXT4_BLOCKS_PER_GROUP(sb);
+	blk = group * EXT4_BLOCKS_PER_GROUP(sb);
 	for (i = 0; i < reserved_gdb; i++) {
 		int err2;
 		data = (__le32 *)primary[i]->b_data;
@@ -831,9 +831,11 @@ int ext4_group_add(struct super_block *sb, struct ext4_new_group_data *input)
 		if ((err = ext4_journal_get_write_access(handle, primary)))
 			goto exit_journal;
 
-		if (reserved_gdb && ext4_bg_num_gdb(sb, input->group) &&
-		    (err = reserve_backup_gdb(handle, inode, input)))
-			goto exit_journal;
+		if (reserved_gdb && ext4_bg_num_gdb(sb, input->group)) {
+			err = reserve_backup_gdb(handle, inode, input->group);
+			if (err)
+				goto exit_journal;
+		}
 	} else {
 		/*
 		 * Note that we can access new group descriptor block safely
-- 
1.7.5.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* Re: [PATCH v2 01/11] ext4: prevent parallel resizers by atomic bit ops
  2011-07-19  4:02 ` [PATCH v2 01/11] ext4: prevent parallel resizers by atomic bit ops Yongqiang Yang
@ 2011-07-27  1:38   ` Ted Ts'o
  0 siblings, 0 replies; 22+ messages in thread
From: Ted Ts'o @ 2011-07-27  1:38 UTC (permalink / raw)
  To: Yongqiang Yang; +Cc: linux-ext4, adilger, amir73il, tm

On Tue, Jul 19, 2011 at 12:02:07PM +0800, Yongqiang Yang wrote:
> Before this patch, parallel resizers are allowed and protected by a mutex lock,
> actually, there is no need to support parallel resizer, so this patch prevents
> parallel resizers by atmoic bit ops, like lock_page() and unlock_page() do.
> 
> To do this, the patch removed the mutex lock s_resize_lock from struct ext4_sb_info
> and added a unsigned long field named s_resize_flags which inidicates if there is
> a resizer.
> 
> Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>

Thanks, added to the ext4 patch.

					- Ted

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v2 02/11] ext4: prevent a fs with errors from being resized
  2011-07-19  4:02 ` [PATCH v2 02/11] ext4: prevent a fs with errors from being resized Yongqiang Yang
@ 2011-07-27  1:42   ` Ted Ts'o
  0 siblings, 0 replies; 22+ messages in thread
From: Ted Ts'o @ 2011-07-27  1:42 UTC (permalink / raw)
  To: Yongqiang Yang; +Cc: linux-ext4, adilger, amir73il, tm

On Tue, Jul 19, 2011 at 12:02:08PM +0800, Yongqiang Yang wrote:
> A filesystem with errors is not allowed to being resized, otherwise, it is
> easy to destroy the filesystem.
> 
> Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>

Thanks, added to the ext4 tree.

					- Ted

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v2 03/11] ext4: rename ext4_add_groupblocks() to ext4_group_add_blocks()
  2011-07-19  4:02 ` [PATCH v2 03/11] ext4: rename ext4_add_groupblocks() to ext4_group_add_blocks() Yongqiang Yang
@ 2011-07-27  1:45   ` Ted Ts'o
  0 siblings, 0 replies; 22+ messages in thread
From: Ted Ts'o @ 2011-07-27  1:45 UTC (permalink / raw)
  To: Yongqiang Yang; +Cc: linux-ext4, adilger, amir73il, tm

On Tue, Jul 19, 2011 at 12:02:09PM +0800, Yongqiang Yang wrote:
> This patch renamed ext4_add_groupblocks() to ext4_group_add_blocks().
> 
> Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>

Added to the ext4 patch tree, thanks.

					- Ted

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v2 04/11] ext4: let ext4_group_add_blocks() return an error code
  2011-07-19  4:02 ` [PATCH v2 04/11] ext4: let ext4_group_add_blocks() return an error code Yongqiang Yang
@ 2011-07-27  1:49   ` Ted Ts'o
  0 siblings, 0 replies; 22+ messages in thread
From: Ted Ts'o @ 2011-07-27  1:49 UTC (permalink / raw)
  To: Yongqiang Yang; +Cc: linux-ext4, adilger, amir73il, tm

On Tue, Jul 19, 2011 at 12:02:10PM +0800, Yongqiang Yang wrote:
> This patch lets ext4_group_add_blocks() return an error code if it fails,
> so that upper functions can handle error correctly.
> 
> Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>

Thanks, added to the ext4 tree.

					- Ted

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v2 05/11] ext4: let ext4_group_add_blocks() handle 0 blocks quickly
  2011-07-19  4:02 ` [PATCH v2 05/11] ext4: let ext4_group_add_blocks() handle 0 blocks quickly Yongqiang Yang
@ 2011-07-27  1:52   ` Ted Ts'o
  0 siblings, 0 replies; 22+ messages in thread
From: Ted Ts'o @ 2011-07-27  1:52 UTC (permalink / raw)
  To: Yongqiang Yang; +Cc: linux-ext4, adilger, amir73il, tm

On Tue, Jul 19, 2011 at 12:02:11PM +0800, Yongqiang Yang wrote:
> If ext4_group_add_blocks() is called with 0 block, it just return 0.
> 
> Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>

Thanks, added to the ext4 tree.

						- Ted

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v2 06/11] ext4: fix a typo in ext4_group_extend()
  2011-07-19  4:02 ` [PATCH v2 06/11] ext4: fix a typo in ext4_group_extend() Yongqiang Yang
@ 2011-07-27  1:54   ` Ted Ts'o
  0 siblings, 0 replies; 22+ messages in thread
From: Ted Ts'o @ 2011-07-27  1:54 UTC (permalink / raw)
  To: Yongqiang Yang; +Cc: linux-ext4, adilger, amir73il, tm

On Tue, Jul 19, 2011 at 12:02:12PM +0800, Yongqiang Yang wrote:
> This patch fixed a typo in ext4_group_extend().
> 
> Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>

Thanks, added to the ext4 tree.

					- Ted

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH] ext4: let setup_new_group_blocks() set multiple bits at a time
  2011-07-19  4:02 ` [PATCH v2 07/11] ext4: let setup_new_group_blocks() set multi-bits each time Yongqiang Yang
@ 2011-07-27  2:15   ` Theodore Ts'o
  0 siblings, 0 replies; 22+ messages in thread
From: Theodore Ts'o @ 2011-07-27  2:15 UTC (permalink / raw)
  To: Ext4 Developers List; +Cc: Yongqiang Yang, Theodore Ts'o

From: Yongqiang Yang <xiaoqiangnk@gmail.com>

Rename mb_set_bits() to ext4_set_bits() and make it a global function
so that setup_new_group_blocks() can use it.

Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
---

I used this instead of your "[PATCH v2 07/11] ext4: let
setup_new_group_blocks() set multi-bits each time"; I renamed
mb_set_bits() instead of making ext4_set_bits() call mb_set_bits(), to
avoid the redundancy.

 fs/ext4/ext4.h    |    2 ++
 fs/ext4/mballoc.c |   15 ++++++++-------
 fs/ext4/resize.c  |   18 +++++++-----------
 3 files changed, 17 insertions(+), 18 deletions(-)

diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index da7ab48..ba2009b 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -940,6 +940,8 @@ struct ext4_inode_info {
 #define ext4_find_next_zero_bit		find_next_zero_bit_le
 #define ext4_find_next_bit		find_next_bit_le
 
+extern void ext4_set_bits(void *bm, int cur, int len);
+
 /*
  * Maximal mount counts between two filesystem checks
  */
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index b6ef4da..fa716c9 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -1282,7 +1282,7 @@ static void mb_clear_bits(void *bm, int cur, int len)
 	}
 }
 
-static void mb_set_bits(void *bm, int cur, int len)
+void ext4_set_bits(void *bm, int cur, int len)
 {
 	__u32 *addr;
 
@@ -1511,7 +1511,7 @@ static int mb_mark_used(struct ext4_buddy *e4b, struct ext4_free_extent *ex)
 	}
 	mb_set_largest_free_order(e4b->bd_sb, e4b->bd_info);
 
-	mb_set_bits(EXT4_MB_BITMAP(e4b), ex->fe_start, len0);
+	ext4_set_bits(EXT4_MB_BITMAP(e4b), ex->fe_start, len0);
 	mb_check_buddy(e4b);
 
 	return ret;
@@ -2795,8 +2795,8 @@ ext4_mb_mark_diskspace_used(struct ext4_allocation_context *ac,
 		 * We leak some of the blocks here.
 		 */
 		ext4_lock_group(sb, ac->ac_b_ex.fe_group);
-		mb_set_bits(bitmap_bh->b_data, ac->ac_b_ex.fe_start,
-			    ac->ac_b_ex.fe_len);
+		ext4_set_bits(bitmap_bh->b_data, ac->ac_b_ex.fe_start,
+			      ac->ac_b_ex.fe_len);
 		ext4_unlock_group(sb, ac->ac_b_ex.fe_group);
 		err = ext4_handle_dirty_metadata(handle, NULL, bitmap_bh);
 		if (!err)
@@ -2814,7 +2814,8 @@ ext4_mb_mark_diskspace_used(struct ext4_allocation_context *ac,
 		}
 	}
 #endif
-	mb_set_bits(bitmap_bh->b_data, ac->ac_b_ex.fe_start,ac->ac_b_ex.fe_len);
+	ext4_set_bits(bitmap_bh->b_data, ac->ac_b_ex.fe_start,
+		      ac->ac_b_ex.fe_len);
 	if (gdp->bg_flags & cpu_to_le16(EXT4_BG_BLOCK_UNINIT)) {
 		gdp->bg_flags &= cpu_to_le16(~EXT4_BG_BLOCK_UNINIT);
 		ext4_free_blks_set(sb, gdp,
@@ -3284,7 +3285,7 @@ static void ext4_mb_generate_from_freelist(struct super_block *sb, void *bitmap,
 
 	while (n) {
 		entry = rb_entry(n, struct ext4_free_data, node);
-		mb_set_bits(bitmap, entry->start_blk, entry->count);
+		ext4_set_bits(bitmap, entry->start_blk, entry->count);
 		n = rb_next(n);
 	}
 	return;
@@ -3326,7 +3327,7 @@ void ext4_mb_generate_from_pa(struct super_block *sb, void *bitmap,
 		if (unlikely(len == 0))
 			continue;
 		BUG_ON(groupnr != group);
-		mb_set_bits(bitmap, start, len);
+		ext4_set_bits(bitmap, start, len);
 		preallocated += len;
 		count++;
 	}
diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c
index 5f0aefd..178fb2f 100644
--- a/fs/ext4/resize.c
+++ b/fs/ext4/resize.c
@@ -217,11 +217,6 @@ static int setup_new_group_blocks(struct super_block *sb,
 		goto exit_journal;
 	}
 
-	if (ext4_bg_has_super(sb, input->group)) {
-		ext4_debug("mark backup superblock %#04llx (+0)\n", start);
-		ext4_set_bit(0, bh->b_data);
-	}
-
 	/* Copy all of the GDT blocks into the backup in this group */
 	for (i = 0, bit = 1, block = start + 1;
 	     i < gdblocks; i++, block++, bit++) {
@@ -250,7 +245,6 @@ static int setup_new_group_blocks(struct super_block *sb,
 			brelse(gdb);
 			goto exit_bh;
 		}
-		ext4_set_bit(bit, bh->b_data);
 		brelse(gdb);
 	}
 
@@ -261,8 +255,11 @@ static int setup_new_group_blocks(struct super_block *sb,
 			       GFP_NOFS);
 	if (err)
 		goto exit_bh;
-	for (i = 0, bit = gdblocks + 1; i < reserved_gdb; i++, bit++)
-		ext4_set_bit(bit, bh->b_data);
+
+	if (ext4_bg_has_super(sb, input->group)) {
+		ext4_debug("mark backup group tables %#04llx (+0)\n", start);
+		ext4_set_bits(bh->b_data, 0, gdblocks + reserved_gdb + 1);
+	}
 
 	ext4_debug("mark block bitmap %#04llx (+%llu)\n", input->block_bitmap,
 		   input->block_bitmap - start);
@@ -278,9 +275,8 @@ static int setup_new_group_blocks(struct super_block *sb,
 	err = sb_issue_zeroout(sb, block, sbi->s_itb_per_group, GFP_NOFS);
 	if (err)
 		goto exit_bh;
-	for (i = 0, bit = input->inode_table - start;
-	     i < sbi->s_itb_per_group; i++, bit++)
-		ext4_set_bit(bit, bh->b_data);
+	ext4_set_bits(bh->b_data, input->inode_table - start,
+		      sbi->s_itb_per_group);
 
 	if ((err = extend_or_restart_transaction(handle, 2, bh)))
 		goto exit_bh;
-- 
1.7.4.1.22.gec8e1.dirty


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* Re: [PATCH v2 08/11] ext4: simplify journal handling in setup_new_group_blocks()
  2011-07-19  4:02 ` [PATCH v2 08/11] ext4: simplify journal handling in setup_new_group_blocks() Yongqiang Yang
@ 2011-07-27  2:23   ` Ted Ts'o
  0 siblings, 0 replies; 22+ messages in thread
From: Ted Ts'o @ 2011-07-27  2:23 UTC (permalink / raw)
  To: Yongqiang Yang; +Cc: linux-ext4, adilger, amir73il, tm

On Tue, Jul 19, 2011 at 12:02:14PM +0800, Yongqiang Yang wrote:
> This patch simplifies journal handling in setup_new_group_blocks().
> 
> In previous code, block bitmap is modified everywhere in
> setup_new_group_blocks(), ext4_get_write_access() in
> extend_or_restart_transaction() is used to guarantee that the block bitmap
> stays in the new handle, this makes things complicated.
> 
> In this patch the modifications on the block bitmap are batched and done
> by ext4_set_bits() after reqesting a handle from extend_or_restart_transaction()
> with enough credits.  So ext4_get_write_access() can be removed from
> extend_or_restart_transaction().
> 
> Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>

Applied, thanks.

						- Ted

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v2 09/11] ext4: remove lock_buffer in bclean() and setup_new_group_blocks()
  2011-07-19  4:02 ` [PATCH v2 09/11] ext4: remove lock_buffer in bclean() and setup_new_group_blocks() Yongqiang Yang
@ 2011-07-28  0:45   ` Ted Ts'o
  0 siblings, 0 replies; 22+ messages in thread
From: Ted Ts'o @ 2011-07-28  0:45 UTC (permalink / raw)
  To: Yongqiang Yang; +Cc: linux-ext4, adilger, amir73il, tm

On Tue, Jul 19, 2011 at 12:02:15PM +0800, Yongqiang Yang wrote:
> Nobody touchs blocks beyond the filesystem, there is no need to lock
> the buffers.
> 
> Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>

Added to the ext4 tree, thanks.

						- Ted

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH -v3] ext4: simplify parameters of add_new_gdb()
  2011-07-19  4:02 ` [PATCH v2 10/11] ext4: simplify parameters of add_new_gdb() Yongqiang Yang
@ 2011-07-28  1:21   ` Theodore Ts'o
  0 siblings, 0 replies; 22+ messages in thread
From: Theodore Ts'o @ 2011-07-28  1:21 UTC (permalink / raw)
  To: Ext4 Developers List; +Cc: Yongqiang Yang, Theodore Ts'o

From: Yongqiang Yang <xiaoqiangnk@gmail.com>

add_new_gdb() only needs the block group number; there is no need to
pass a pointer to struct ext4_new_group_data to add_new_gdb().
Instead of filling in a pointer the struct buffer_head in
add_new_gdb(), it's simpler to have the caller fetch it from the
s_group_desc[] array.

[Fixed error path to handle the case where struct buffer_head *primary
 hasn't been set yet. -- Ted]

Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
---

Applied to the ext4 tree, with a bug fix to prevent a null pointer
dereference if add_new_gdb() returns an error.

 fs/ext4/resize.c |   39 ++++++++++++++++++++++++---------------
 1 files changed, 24 insertions(+), 15 deletions(-)

diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c
index 65e5cb6..9e45355 100644
--- a/fs/ext4/resize.c
+++ b/fs/ext4/resize.c
@@ -394,15 +394,15 @@ static int verify_reserved_gdb(struct super_block *sb,
  * fail once we start modifying the data on disk, because JBD has no rollback.
  */
 static int add_new_gdb(handle_t *handle, struct inode *inode,
-		       struct ext4_new_group_data *input,
-		       struct buffer_head **primary)
+		       ext4_group_t group)
 {
 	struct super_block *sb = inode->i_sb;
 	struct ext4_super_block *es = EXT4_SB(sb)->s_es;
-	unsigned long gdb_num = input->group / EXT4_DESC_PER_BLOCK(sb);
+	unsigned long gdb_num = group / EXT4_DESC_PER_BLOCK(sb);
 	ext4_fsblk_t gdblock = EXT4_SB(sb)->s_sbh->b_blocknr + 1 + gdb_num;
 	struct buffer_head **o_group_desc, **n_group_desc;
 	struct buffer_head *dind;
+	struct buffer_head *gdb_bh;
 	int gdbackups;
 	struct ext4_iloc iloc;
 	__le32 *data;
@@ -425,11 +425,12 @@ static int add_new_gdb(handle_t *handle, struct inode *inode,
 		return -EPERM;
 	}
 
-	*primary = sb_bread(sb, gdblock);
-	if (!*primary)
+	gdb_bh = sb_bread(sb, gdblock);
+	if (!gdb_bh)
 		return -EIO;
 
-	if ((gdbackups = verify_reserved_gdb(sb, *primary)) < 0) {
+	gdbackups = verify_reserved_gdb(sb, gdb_bh);
+	if (gdbackups < 0) {
 		err = gdbackups;
 		goto exit_bh;
 	}
@@ -444,7 +445,7 @@ static int add_new_gdb(handle_t *handle, struct inode *inode,
 	data = (__le32 *)dind->b_data;
 	if (le32_to_cpu(data[gdb_num % EXT4_ADDR_PER_BLOCK(sb)]) != gdblock) {
 		ext4_warning(sb, "new group %u GDT block %llu not reserved",
-			     input->group, gdblock);
+			     group, gdblock);
 		err = -EINVAL;
 		goto exit_dind;
 	}
@@ -453,7 +454,7 @@ static int add_new_gdb(handle_t *handle, struct inode *inode,
 	if (unlikely(err))
 		goto exit_dind;
 
-	err = ext4_journal_get_write_access(handle, *primary);
+	err = ext4_journal_get_write_access(handle, gdb_bh);
 	if (unlikely(err))
 		goto exit_sbh;
 
@@ -492,8 +493,8 @@ static int add_new_gdb(handle_t *handle, struct inode *inode,
 	}
 	inode->i_blocks -= (gdbackups + 1) * sb->s_blocksize >> 9;
 	ext4_mark_iloc_dirty(handle, inode, &iloc);
-	memset((*primary)->b_data, 0, sb->s_blocksize);
-	err = ext4_handle_dirty_metadata(handle, NULL, *primary);
+	memset(gdb_bh->b_data, 0, sb->s_blocksize);
+	err = ext4_handle_dirty_metadata(handle, NULL, gdb_bh);
 	if (unlikely(err)) {
 		ext4_std_error(sb, err);
 		goto exit_inode;
@@ -503,7 +504,7 @@ static int add_new_gdb(handle_t *handle, struct inode *inode,
 	o_group_desc = EXT4_SB(sb)->s_group_desc;
 	memcpy(n_group_desc, o_group_desc,
 	       EXT4_SB(sb)->s_gdb_count * sizeof(struct buffer_head *));
-	n_group_desc[gdb_num] = *primary;
+	n_group_desc[gdb_num] = gdb_bh;
 	EXT4_SB(sb)->s_group_desc = n_group_desc;
 	EXT4_SB(sb)->s_gdb_count++;
 	kfree(o_group_desc);
@@ -525,7 +526,7 @@ exit_sbh:
 exit_dind:
 	brelse(dind);
 exit_bh:
-	brelse(*primary);
+	brelse(gdb_bh);
 
 	ext4_debug("leaving with error %d\n", err);
 	return err;
@@ -833,8 +834,16 @@ int ext4_group_add(struct super_block *sb, struct ext4_new_group_data *input)
 		if (reserved_gdb && ext4_bg_num_gdb(sb, input->group) &&
 		    (err = reserve_backup_gdb(handle, inode, input)))
 			goto exit_journal;
-	} else if ((err = add_new_gdb(handle, inode, input, &primary)))
-		goto exit_journal;
+	} else {
+		/*
+		 * Note that we can access new group descriptor block safely
+		 * only if add_new_gdb() succeeds.
+		 */
+		err = add_new_gdb(handle, inode, input->group);
+		if (err)
+			goto exit_journal;
+		primary = sbi->s_group_desc[gdb_num];
+	}
 
         /*
          * OK, now we've set up the new group.  Time to make it active.
@@ -944,7 +953,7 @@ int ext4_group_add(struct super_block *sb, struct ext4_new_group_data *input)
 exit_journal:
 	if ((err2 = ext4_journal_stop(handle)) && !err)
 		err = err2;
-	if (!err) {
+	if (!err && primary) {
 		update_backups(sb, sbi->s_sbh->b_blocknr, (char *)es,
 			       sizeof(struct ext4_super_block));
 		update_backups(sb, primary->b_blocknr, primary->b_data,
-- 
1.7.4.1.22.gec8e1.dirty


^ permalink raw reply related	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2011-07-28  1:21 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-19  4:02 ext4: prevent parallel resizers and fix some error handling in resize Yongqiang Yang
2011-07-19  4:02 ` [PATCH v2 01/11] ext4: prevent parallel resizers by atomic bit ops Yongqiang Yang
2011-07-27  1:38   ` Ted Ts'o
2011-07-19  4:02 ` [PATCH v2 02/11] ext4: prevent a fs with errors from being resized Yongqiang Yang
2011-07-27  1:42   ` Ted Ts'o
2011-07-19  4:02 ` [PATCH v2 03/11] ext4: rename ext4_add_groupblocks() to ext4_group_add_blocks() Yongqiang Yang
2011-07-27  1:45   ` Ted Ts'o
2011-07-19  4:02 ` [PATCH v2 04/11] ext4: let ext4_group_add_blocks() return an error code Yongqiang Yang
2011-07-27  1:49   ` Ted Ts'o
2011-07-19  4:02 ` [PATCH v2 05/11] ext4: let ext4_group_add_blocks() handle 0 blocks quickly Yongqiang Yang
2011-07-27  1:52   ` Ted Ts'o
2011-07-19  4:02 ` [PATCH v2 06/11] ext4: fix a typo in ext4_group_extend() Yongqiang Yang
2011-07-27  1:54   ` Ted Ts'o
2011-07-19  4:02 ` [PATCH v2 07/11] ext4: let setup_new_group_blocks() set multi-bits each time Yongqiang Yang
2011-07-27  2:15   ` [PATCH] ext4: let setup_new_group_blocks() set multiple bits at a time Theodore Ts'o
2011-07-19  4:02 ` [PATCH v2 08/11] ext4: simplify journal handling in setup_new_group_blocks() Yongqiang Yang
2011-07-27  2:23   ` Ted Ts'o
2011-07-19  4:02 ` [PATCH v2 09/11] ext4: remove lock_buffer in bclean() and setup_new_group_blocks() Yongqiang Yang
2011-07-28  0:45   ` Ted Ts'o
2011-07-19  4:02 ` [PATCH v2 10/11] ext4: simplify parameters of add_new_gdb() Yongqiang Yang
2011-07-28  1:21   ` [PATCH -v3] " Theodore Ts'o
2011-07-19  4:02 ` [PATCH v2 11/11] ext4: simplify parameters of reserve_backup_gdb() Yongqiang Yang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.