All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: Theodore Y Tso <theotso@us.ibm.com>, Mingming Cao <cmm@us.ibm.com>
Cc: "linux-ext4@vger.kernel.org" <linux-ext4@vger.kernel.org>
Subject: Patch for 2.6.25 queue
Date: Sat, 26 Jan 2008 17:08:49 +0530	[thread overview]
Message-ID: <20080126113849.GA18602@skywalker> (raw)

This diff contain mballoc fixes and update for ext3-4 migrate patch.

Testing:
ext3 to ext4 migration.

I will be putting the patch queue for abat test now.

-aneesh

diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index ebcd25e..99d16f5 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -62,7 +62,7 @@ static ext4_fsblk_t ext_pblock(struct ext4_extent *ex)
  * idx_pblock:
  * combine low and high parts of a leaf physical block number into ext4_fsblk_t
  */
-static ext4_fsblk_t idx_pblock(struct ext4_extent_idx *ix)
+ext4_fsblk_t idx_pblock(struct ext4_extent_idx *ix)
 {
 	ext4_fsblk_t block;
 
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index a60672c..9de0cdf 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -2723,7 +2723,7 @@ int ext4_mb_release(struct super_block *sb)
 #endif
 			ext4_lock_group(sb, i);
 			ext4_mb_cleanup_pa(grinfo);
-			ext4_lock_group(sb, i);
+			ext4_unlock_group(sb, i);
 			kfree(grinfo);
 		}
 		num_meta_group_infos = (sbi->s_groups_count +
@@ -4452,7 +4452,6 @@ do_more:
 		overflow = bit + count - EXT4_BLOCKS_PER_GROUP(sb);
 		count -= overflow;
 	}
-	put_bh(bitmap_bh);
 	bitmap_bh = read_block_bitmap(sb, block_group);
 	if (!bitmap_bh)
 		goto error_return;
diff --git a/fs/ext4/migrate.c b/fs/ext4/migrate.c
index 70a4d9c..3ebc233 100644
--- a/fs/ext4/migrate.c
+++ b/fs/ext4/migrate.c
@@ -342,16 +342,6 @@ err_out:
 	return retval;
 }
 
-/* Will go away */
-static ext4_fsblk_t idx_pblock(struct ext4_extent_idx *ix)
-{
-	ext4_fsblk_t block;
-
-	block = le32_to_cpu(ix->ei_leaf_lo);
-	block |= ((ext4_fsblk_t) le16_to_cpu(ix->ei_leaf_hi) << 31) << 1;
-	return block;
-}
-
 static int free_ext_idx(handle_t *handle, struct inode *inode,
 					struct ext4_extent_idx *ix)
 {
@@ -366,9 +356,7 @@ static int free_ext_idx(handle_t *handle, struct inode *inode,
 		return -EIO;
 
 	eh = (struct ext4_extent_header *)bh->b_data;
-	if (eh->eh_depth == 0)
-		ext4_free_blocks(handle, inode, block, 1, 1);
-	else {
+	if (eh->eh_depth != 0) {
 		ix = EXT_FIRST_INDEX(eh);
 		for (i = 0; i < le16_to_cpu(eh->eh_entries); i++, ix++) {
 			retval = free_ext_idx(handle, inode, ix);
@@ -377,6 +365,7 @@ static int free_ext_idx(handle_t *handle, struct inode *inode,
 		}
 	}
 	put_bh(bh);
+	ext4_free_blocks(handle, inode, block, 1, 1);
 	return retval;
 }
 
diff --git a/include/linux/ext4_fs_extents.h b/include/linux/ext4_fs_extents.h
index f536b2f..697da4b 100644
--- a/include/linux/ext4_fs_extents.h
+++ b/include/linux/ext4_fs_extents.h
@@ -212,6 +212,7 @@ static inline int ext4_ext_get_actual_len(struct ext4_extent *ext)
 		(le16_to_cpu(ext->ee_len) - EXT_INIT_MAX_LEN));
 }
 
+extern ext4_fsblk_t idx_pblock(struct ext4_extent_idx *);
 extern void ext4_ext_store_pblock(struct ext4_extent *, ext4_fsblk_t);
 extern int ext4_extent_tree_init(handle_t *, struct inode *);
 extern int ext4_ext_calc_credits_for_insert(struct inode *, struct ext4_ext_path *);

             reply	other threads:[~2008-01-26 11:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-26 11:38 Aneesh Kumar K.V [this message]
2008-01-26 17:03 ` Patch for 2.6.25 queue Theodore Tso
2008-01-26 17:14   ` Theodore Tso

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=20080126113849.GA18602@skywalker \
    --to=aneesh.kumar@linux.vnet.ibm.com \
    --cc=cmm@us.ibm.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=theotso@us.ibm.com \
    /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 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.