linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Valerie Clement <valerie.clement@bull.net>
To: Alex Tomas <alex@clusterfs.com>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [RFC] delayed allocation, mballoc, etc
Date: Thu, 07 Dec 2006 18:18:14 +0100	[thread overview]
Message-ID: <45784CD6.3090501@bull.net> (raw)
In-Reply-To: <m3irgwv59d.fsf@bzzz.home.net>

[-- Attachment #1: Type: text/plain, Size: 484 bytes --]

Alex Tomas wrote:
> Good day,
> 
> I'd like to ask the community to discuss and review few things
> I've been working on. we propose set of patches with intention
> to improve performance of ext4:
> 
>  * mballoc v4
> 
Hi Alex,
I retrieved the patches from your site and began to have a look at them.
I found some issues in the ext4-mballoc patch concerning the 48bit 
physical block number support.
The patch in attachment fixes the problem, if I'm not wrong.
Regards,

    Valérie


[-- Attachment #2: fix_48bit_support_in_mballoc.patch --]
[-- Type: text/plain, Size: 1772 bytes --]

Index: linux-2.6.19-rc6/fs/ext4/mballoc.c
===================================================================
--- linux-2.6.19-rc6.orig/fs/ext4/mballoc.c	2006-12-07 17:54:01.000000000 +0100
+++ linux-2.6.19-rc6/fs/ext4/mballoc.c	2006-12-07 19:19:11.000000000 +0100
@@ -745,7 +745,7 @@ static int ext4_mb_init_cache(struct pag
 			goto out;
 
 		err = -ENOMEM;
-		bh[i] = sb_getblk(sb, le32_to_cpu(desc->bg_block_bitmap));
+		bh[i] = sb_getblk(sb, ext4_block_bitmap(sb, desc));
 		if (bh[i] == NULL)
 			goto out;
 
@@ -2794,9 +2794,9 @@ int ext4_mb_mark_diskspace_used(struct e
 		+ ac->ac_b_ex.fe_start
 		+ le32_to_cpu(es->s_first_data_block);
 
-	if (block == le32_to_cpu(gdp->bg_block_bitmap) ||
-			block == le32_to_cpu(gdp->bg_inode_bitmap) ||
-			in_range(block, le32_to_cpu(gdp->bg_inode_table),
+	if (block == ext4_block_bitmap(sb, gdp) ||
+			block == ext4_inode_bitmap(sb, gdp) ||
+			in_range(block, ext4_inode_table(sb, gdp),
 				EXT4_SB(sb)->s_itb_per_group))
 		ext4_error(sb, "ext4_new_block",
 				"Allocating block in system zone - block = %lu",
@@ -3837,11 +3837,11 @@ do_more:
 	if (!gdp)
 		goto error_return;
 
-	if (in_range (le32_to_cpu(gdp->bg_block_bitmap), block, count) ||
-			in_range (le32_to_cpu(gdp->bg_inode_bitmap), block, count) ||
-			in_range (block, le32_to_cpu(gdp->bg_inode_table),
+	if (in_range (ext4_block_bitmap(sb, gdp), block, count) ||
+			in_range (ext4_inode_bitmap(sb, gdp), block, count) ||
+			in_range (block, ext4_inode_table(sb, gdp),
 				EXT4_SB(sb)->s_itb_per_group) ||
-			in_range (block + count - 1, le32_to_cpu(gdp->bg_inode_table),
+			in_range (block + count - 1, ext4_inode_table(sb, gdp),
 				EXT4_SB(sb)->s_itb_per_group))
 		ext4_error (sb, "ext4_free_blocks",
 				"Freeing blocks in system zones - "

  reply	other threads:[~2006-12-07 17:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-01  0:15 [RFC] delayed allocation, mballoc, etc Alex Tomas
2006-12-07 17:18 ` Valerie Clement [this message]
2006-12-07 17:26   ` Alex Tomas
  -- strict thread matches above, loose matches on Subject: below --
2006-12-27 11:09 sho
2006-12-27 11:16 ` Alex Tomas

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=45784CD6.3090501@bull.net \
    --to=valerie.clement@bull.net \
    --cc=alex@clusterfs.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).