2006-09-20 15:56:46

by Dave Kleikamp

[permalink] [raw]
Subject: ext4 kernel patches against linux-2.6.18-rc7-mm1

I have ported the ext4 kernel patches to linux-2.6.18-rc7-mm1. They
have been compile-tested, but I haven't done any run-time testing yet.

I expect that the rc7-mm1 ext3 that these patches are based off will be
close to 2.6.19-rc1, which is the target for merging ext4 into the
mainline tree.

The patches can be found here:
ftp://kernel.org/pub/linux/kernel/people/shaggy/ext4

Here's the series file:

# These patches were build against linux-2.6.18-rc7-mm1
#
# These first 3 patches create a clone of ext3 into ext4
ext4-copy.patch
ext4-rename.patch
ext4-enable.patch
#
# These next 4 copy clone jdb2 from jbd and modify ext4 to use it
jbd2-copy.patch
jbd2-rename.patch
jbd2-enable.patch
# ext4_jbd.h is no longer used
jbd2-cleanup.patch
#
# Shaggy made some minor changes to fix whitespace, sparse errors, etc.
# in many of the following patches
#
# From Alex Tomas
ext4-extents.patch
#
# From Mingming Cao
ext4_fsblk_sector_t.patch
#
# From Alex Tomas
ext4-extents-48bit.patch
#
# From Suparna Bhattacharya
ext4-unitialized-extent-handling.patch
#
# From Randy Dunlap
extents_comment_fix.patch
#
# From Zach Brown and Badari Pulavarty
64bit_jbd2_core.patch
#
# From Mingming Cao
sector_t-jbd2.patch
#
# From Badari Pulavarty
ext4_48bit_i_file_acl.patch
#
# From Laurent Vivier
64bit-metadata.patch
#
# From Avantika Mathur
64bitmetadata_inline_funcs_fix.patch
#
# From Mingming Cao
ext4_blk_type_from_sector_t_to_ulonglong.patch
ext4_remove_sector_t_bits_check.patch
jbd2_blks_type_from_sector_t_to_ull.patch
#
# From Alexandre Ratchov
ext4_remove_relative_block_numbers.patch
ext4_allow_larger_descriptor_size.patch
ext4_move_block_number_hi_bits.patch
--
David Kleikamp
IBM Linux Technology Center



2006-09-20 16:32:30

by Eric Sandeen

[permalink] [raw]
Subject: Re: ext4 kernel patches against linux-2.6.18-rc7-mm1

Dave Kleikamp wrote:

> # From Mingming Cao
> sector_t-jbd2.patch

I think this one needs to address the first, last variables in
journal_fail_superblock():

static int journal_reset(journal_t *journal)
{
journal_superblock_t *sb = journal->j_superblock;
- unsigned int first, last;
+ sector_t first, last;

first = be32_to_cpu(sb->s_first);
last = be32_to_cpu(sb->s_maxlen);

(and then later change that back to unsigned long long, in the spirit of
the patch series)

-Eric

2006-09-20 17:38:50

by Eric Sandeen

[permalink] [raw]
Subject: Re: ext4 kernel patches against linux-2.6.18-rc7-mm1

Eric Sandeen wrote:
> Dave Kleikamp wrote:
>
>> # From Mingming Cao
>> sector_t-jbd2.patch
>
> I think this one needs to address the first, last variables in
> journal_fail_superblock():
>
> static int journal_reset(journal_t *journal)
> {
> journal_superblock_t *sb = journal->j_superblock;
> - unsigned int first, last;
> + sector_t first, last;
>
> first = be32_to_cpu(sb->s_first);
> last = be32_to_cpu(sb->s_maxlen);
>
> (and then later change that back to unsigned long long, in the spirit of
> the patch series)

Hm, and looking further, I think this change:

journal_t * jbd2_journal_init_dev(struct block_device *bdev,
struct block_device *fs_dev,
- int start, int len, int blocksize)
+ sector_t start, int len, int blocksize)

is unnecessary; this is initializing the journal on an external device,
and start is in the first few blocks of the disk:

sb_block = EXT3_MIN_BLOCK_SIZE / blocksize;
start = sb_block + 1;

and len is also constrained by the maximum log size.

-Eric

2006-09-21 15:15:25

by Johann Lombardi

[permalink] [raw]
Subject: Re: ext4 kernel patches against linux-2.6.18-rc7-mm1

On Wed, Sep 20, 2006 at 10:56:39AM -0500, Dave Kleikamp wrote:
> # These next 4 copy clone jdb2 from jbd and modify ext4 to use it
> jbd2-copy.patch
> jbd2-rename.patch

jbd and jbd2 currently use the same slab names which must be unique.
The patch below just renames jbd2's slabs.

Signed-off-by: Johann Lombardi <[email protected]>

Index: linux-2.6.18-rc7-mm1/fs/jbd2/journal.c
===================================================================
--- linux-2.6.18-rc7-mm1.orig/fs/jbd2/journal.c 2006-09-21 16:37:49.566959224 +0200
+++ linux-2.6.18-rc7-mm1/fs/jbd2/journal.c 2006-09-21 16:38:19.145462608 +0200
@@ -1643,7 +1643,7 @@

static kmem_cache_t *jbd_slab[JBD_MAX_SLABS];
static const char *jbd_slab_names[JBD_MAX_SLABS] = {
- "jbd_1k", "jbd_2k", "jbd_4k", NULL, "jbd_8k"
+ "jbd2_1k", "jbd2_2k", "jbd2_4k", NULL, "jbd2_8k"
};

static void jbd2_journal_destroy_jbd_slabs(void)
@@ -1714,7 +1714,7 @@
int retval;

J_ASSERT(jbd2_journal_head_cache == 0);
- jbd2_journal_head_cache = kmem_cache_create("journal_head",
+ jbd2_journal_head_cache = kmem_cache_create("jbd2_journal_head",
sizeof(struct journal_head),
0, /* offset */
0, /* flags */
@@ -2019,7 +2019,7 @@

static int __init journal_init_handle_cache(void)
{
- jbd2_handle_cache = kmem_cache_create("journal_handle",
+ jbd2_handle_cache = kmem_cache_create("jbd2_journal_handle",
sizeof(handle_t),
0, /* offset */
0, /* flags */
Index: linux-2.6.18-rc7-mm1/fs/jbd2/revoke.c
===================================================================
--- linux-2.6.18-rc7-mm1.orig/fs/jbd2/revoke.c 2006-09-21 16:38:28.044109808 +0200
+++ linux-2.6.18-rc7-mm1/fs/jbd2/revoke.c 2006-09-21 16:38:40.978143536 +0200
@@ -169,13 +169,13 @@

int __init jbd2_journal_init_revoke_caches(void)
{
- jbd2_revoke_record_cache = kmem_cache_create("revoke_record",
+ jbd2_revoke_record_cache = kmem_cache_create("jbd2_revoke_record",
sizeof(struct jbd2_revoke_record_s),
0, SLAB_HWCACHE_ALIGN, NULL, NULL);
if (jbd2_revoke_record_cache == 0)
return -ENOMEM;

- jbd2_revoke_table_cache = kmem_cache_create("revoke_table",
+ jbd2_revoke_table_cache = kmem_cache_create("jbd2_revoke_table",
sizeof(struct jbd2_revoke_table_s),
0, 0, NULL, NULL);
if (jbd2_revoke_table_cache == 0) {