linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso@mit.edu>
To: linux-kernel@vger.kernel.org
Cc: linux-ext4@vger.kernel.org, "Jose R. Santos" <jrs@us.ibm.com>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: [PATCH] This feature relaxes check restrictions on where each block groups meta
Date: Thu,  4 Oct 2007 01:50:46 -0400	[thread overview]
Message-ID: <1191477059-5357-12-git-send-email-tytso@mit.edu> (raw)
In-Reply-To: <1191477059-5357-11-git-send-email-tytso@mit.edu>

From: Jose R. Santos <jrs@us.ibm.com>

data is located within the storage media.  This allows for the allocation
of bitmaps or inode tables outside the block group boundaries in cases
where bad blocks forces us to look for new blocks which the owning block
group can not satisfy.  This will also allow for new meta-data allocation
schemes to improve performance and scalability.

Signed-off-by: Jose R. Santos <jrs@us.ibm.com>
Cc: <linux-ext4@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
 fs/ext4/super.c         |    9 +++++++--
 include/linux/ext4_fs.h |    4 +++-
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index b59610d..619db84 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -1287,13 +1287,17 @@ static int ext4_check_descriptors (struct super_block * sb)
 	ext4_fsblk_t inode_table;
 	struct ext4_group_desc * gdp = NULL;
 	int desc_block = 0;
+	int flexbg_flag = 0;
 	int i;
 
+	if (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_FLEX_BG))
+		flexbg_flag = 1;
+
 	ext4_debug ("Checking group descriptors");
 
 	for (i = 0; i < sbi->s_groups_count; i++)
 	{
-		if (i == sbi->s_groups_count - 1)
+		if (i == sbi->s_groups_count - 1 || flexbg_flag)
 			last_block = ext4_blocks_count(sbi->s_es) - 1;
 		else
 			last_block = first_block +
@@ -1338,7 +1342,8 @@ static int ext4_check_descriptors (struct super_block * sb)
 				   le16_to_cpu(gdp->bg_checksum));
 			return 0;
 		}
-		first_block += EXT4_BLOCKS_PER_GROUP(sb);
+		if (!flexbg_flag)
+			first_block += EXT4_BLOCKS_PER_GROUP(sb);
 		gdp = (struct ext4_group_desc *)
 			((__u8 *)gdp + EXT4_DESC_SIZE(sb));
 	}
diff --git a/include/linux/ext4_fs.h b/include/linux/ext4_fs.h
index 722d4ef..46b304d 100644
--- a/include/linux/ext4_fs.h
+++ b/include/linux/ext4_fs.h
@@ -682,13 +682,15 @@ static inline int ext4_valid_inum(struct super_block *sb, unsigned long ino)
 #define EXT4_FEATURE_INCOMPAT_META_BG		0x0010
 #define EXT4_FEATURE_INCOMPAT_EXTENTS		0x0040 /* extents support */
 #define EXT4_FEATURE_INCOMPAT_64BIT		0x0080
+#define EXT4_FEATURE_INCOMPAT_FLEX_BG		0x0200
 
 #define EXT4_FEATURE_COMPAT_SUPP	EXT2_FEATURE_COMPAT_EXT_ATTR
 #define EXT4_FEATURE_INCOMPAT_SUPP	(EXT4_FEATURE_INCOMPAT_FILETYPE| \
 					 EXT4_FEATURE_INCOMPAT_RECOVER| \
 					 EXT4_FEATURE_INCOMPAT_META_BG| \
 					 EXT4_FEATURE_INCOMPAT_EXTENTS| \
-					 EXT4_FEATURE_INCOMPAT_64BIT)
+					 EXT4_FEATURE_INCOMPAT_64BIT| \
+					 EXT4_FEATURE_INCOMPAT_FLEX_BG)
 #define EXT4_FEATURE_RO_COMPAT_SUPP	(EXT4_FEATURE_RO_COMPAT_SPARSE_SUPER| \
 					 EXT4_FEATURE_RO_COMPAT_LARGE_FILE| \
 					 EXT4_FEATURE_RO_COMPAT_GDT_CSUM| \
-- 
1.5.3.2.81.g17ed

  reply	other threads:[~2007-10-04  5:51 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-04  5:50 [PATCH, RFC] Ext4 patches planned for submission upstream Theodore Ts'o
2007-10-04  5:50 ` [PATCH] jbd/jbd2: JBD memory allocation cleanups Theodore Ts'o
2007-10-04  5:50   ` [PATCH] jbd/jbd2: Journal initialization doesn't need __GFP_NOFAIL Theodore Ts'o
2007-10-04  5:50     ` [PATCH] JBD2/Ext4: Convert kmalloc to kzalloc in jbd2/ext4 Theodore Ts'o
     [not found]       ` <1191477059-5357-5-git-send-email-tytso@mit.edu>
2007-10-04  5:50         ` [PATCH] jbd2: fix commit code to properly abort journal Theodore Ts'o
2007-10-04  5:50           ` [PATCH] JBD2: debug code cleanup Theodore Ts'o
2007-10-04  5:50             ` [PATCH] Once ext4 will not implement fragment, it is believed it will never be Theodore Ts'o
2007-10-04  5:50               ` [PATCH] ext4: remove #ifdef CONFIG_EXT4_INDEX Theodore Ts'o
2007-10-04  5:50                 ` [PATCH] Ext4: Uninitialized Block Groups Theodore Ts'o
2007-10-04  5:50                   ` [PATCH] ext4: Fix sparse warnings Theodore Ts'o
2007-10-04  5:50                     ` Theodore Ts'o [this message]
2007-10-04  5:50                       ` [PATCH] Support large blocksize up to PAGESIZE (max 64KB) for ext4 Theodore Ts'o
2007-10-04  5:50                         ` [PATCH] ext4: Avoid rec_len overflow with 64KB block size Theodore Ts'o
2007-10-04  5:50                           ` [PATCH] Support large blocksize up to PAGESIZE (max 64KB) for ext2 Theodore Ts'o
2007-10-04  5:50                             ` [PATCH] Support large blocksize up to PAGESIZE (max 64KB) for ext3 Theodore Ts'o
2007-10-04  5:50                               ` [PATCH] ext2: Avoid rec_len overflow with 64KB block size Theodore Ts'o
2007-10-04  5:50                                 ` [PATCH] ext3: " Theodore Ts'o
2007-10-04  5:50                                   ` [PATCH] ext4: Convert bg_block_bitmap to bg_block_bitmap_lo Theodore Ts'o
2007-10-04  5:50                                     ` [PATCH] ext4: Convert bg_inode_bitmap and bg_inode_table Theodore Ts'o
2007-10-04  5:50                                       ` [PATCH] ext4: Convert s_blocks_count to s_blocks_count_lo Theodore Ts'o
2007-10-04  5:50                                         ` [PATCH] ext4: Convert s_r_blocks_count and s_free_blocks_count Theodore Ts'o
2007-10-04  5:50                                           ` [PATCH] ext4: Convert ext4_extent.ee_start to ext4_extent.ee_start_lo Theodore Ts'o
2007-10-04  5:50                                             ` [PATCH] ext4: Convert ext4_extent_idx.ei_leaf to ext4_extent_idx.ei_leaf_lo Theodore Ts'o
2007-10-04  5:50                                               ` [PATCH] ext4: sparse fixes Theodore Ts'o
2007-10-04  6:52   ` [PATCH] jbd/jbd2: JBD memory allocation cleanups Christoph Hellwig
2007-10-05 22:33     ` Mingming Cao
2007-10-05 22:35     ` [PATCH] jbd: JBD slab " Mingming Cao
2007-10-05 22:36     ` [PATCH] jbd2: JBD2 " Mingming Cao
2007-10-05 22:38     ` [PATCH] jbd: JBD replace jbd_kmalloc with kmalloc Mingming Cao
2007-10-08 17:46       ` Christoph Lameter
2007-10-08 18:26         ` Mingming Cao
2007-10-08 18:34           ` Christoph Lameter
2007-10-05 22:39     ` [PATCH] jbd2: JBD replace jbd2_kmalloc " Mingming Cao
2007-10-08 18:37       ` Christoph Lameter

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=1191477059-5357-12-git-send-email-tytso@mit.edu \
    --to=tytso@mit.edu \
    --cc=akpm@linux-foundation.org \
    --cc=jrs@us.ibm.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@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).