Re: 2.6.23-rc9-ext4-1 patchset released (WAS: 2.6.23-rc8-ext4-1 patchset released)

2007-10-04 Thread Theodore Tso
On Thu, Oct 04, 2007 at 01:59:28AM -0400, Theodore Ts'o wrote:
 
 I've just released the 2.6.23-rc9-ext4-1.  

Whoops, I obviously screwed up the subject in my announcement e-mail.
Sorry about that!

- Ted
-
To unsubscribe from this list: send the line unsubscribe linux-ext4 in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] jbd/jbd2: JBD memory allocation cleanups

2007-10-04 Thread Christoph Hellwig
On Thu, Oct 04, 2007 at 01:50:36AM -0400, Theodore Ts'o wrote:
 From: Mingming Cao [EMAIL PROTECTED]
 
 JBD: Replace slab allocations with page cache allocations

It's page allocations, not page cache allocations.

 Also this patch cleans up jbd_kmalloc and replace it with kmalloc directly

That sounds like it should be a different patch..

-
To unsubscribe from this list: send the line unsubscribe linux-ext4 in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


+ ext3-lighten-up-resize-transaction-requirements.patch added to -mm tree

2007-10-04 Thread akpm

The patch titled
 ext3: lighten up resize transaction requirements
has been added to the -mm tree.  Its filename is
 ext3-lighten-up-resize-transaction-requirements.patch

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

--
Subject: ext3: lighten up resize transaction requirements
From: Eric Sandeen [EMAIL PROTECTED]

When resizing online, setup_new_group_blocks attempts to reserve a
potentially very large transaction, depending on the current filesystem
geometry.  For some journal sizes, there may not be enough room for this
transaction, and the online resize will fail.

The patch below resizes  restarts the transaction as necessary while
setting up the new group, and should work with even the smallest journal.

Tested with something like:

[EMAIL PROTECTED] ~]# dd if=/dev/zero of=fsfile bs=1024 count=32768
[EMAIL PROTECTED] ~]# mkfs.ext3 -b 1024 fsfile 16384
[EMAIL PROTECTED] ~]# mount -o loop fsfile mnt/
[EMAIL PROTECTED] ~]# resize2fs /dev/loop0
resize2fs 1.40.2 (12-Jul-2007)
Filesystem at /dev/loop0 is mounted on /root/mnt; on-line resizing required
old desc_blocks = 1, new_desc_blocks = 1
Performing an on-line resize of /dev/loop0 to 32768 (1k) blocks.
resize2fs: No space left on device While trying to add group #2
[EMAIL PROTECTED] ~]# dmesg | tail -n 1
JBD: resize2fs wants too many credits (258  256)
[EMAIL PROTECTED] ~]#

With the below change, it works.

Signed-off-by: Eric Sandeen [EMAIL PROTECTED]
Acked-by: Andreas Dilger [EMAIL PROTECTED]
Cc: linux-ext4@vger.kernel.org
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
---


diff -puN fs/ext3/resize.c~ext3-lighten-up-resize-transaction-requirements 
fs/ext3/resize.c
--- a/fs/ext3/resize.c~ext3-lighten-up-resize-transaction-requirements
+++ a/fs/ext3/resize.c
@@ -154,6 +154,32 @@ static void mark_bitmap_end(int start_bi
 }
 
 /*
+ * If we have fewer than thresh credits, extend by EXT3_MAX_TRANS_DATA.
+ * 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)
+{
+   int err;
+
+   if (handle-h_buffer_credits = thresh)
+   return 0;
+
+   err = ext3_journal_extend(handle, EXT3_MAX_TRANS_DATA);
+   if (err  0)
+   return err;
+   if (err) {
+   if ((err = ext3_journal_restart(handle, EXT3_MAX_TRANS_DATA)))
+   return err;
+   if ((err = ext3_journal_get_write_access(handle, bh)))
+   return err;
+}
+
+   return 0;
+}
+
+/*
  * Set up the block and inode bitmaps, and the inode table for the new group.
  * This doesn't need to be part of the main transaction, since we are only
  * changing blocks outside the actual filesystem.  We still do journaling to
@@ -175,8 +201,9 @@ static int setup_new_group_blocks(struct
int i;
int err = 0, err2;
 
-   handle = ext3_journal_start_sb(sb, reserved_gdb + gdblocks +
-  2 + sbi-s_itb_per_group);
+   /* This transaction may be extended/restarted along the way */
+   handle = ext3_journal_start_sb(sb, EXT3_MAX_TRANS_DATA);
+
if (IS_ERR(handle))
return PTR_ERR(handle);
 
@@ -203,6 +230,9 @@ static int setup_new_group_blocks(struct
 
ext3_debug(update backup group %#04lx (+%d)\n, block, bit);
 
+   if ((err = extend_or_restart_transaction(handle, 1, bh)))
+   goto exit_bh;
+
gdb = sb_getblk(sb, block);
if (!gdb) {
err = -EIO;
@@ -228,6 +258,9 @@ static int setup_new_group_blocks(struct
 
ext3_debug(clear reserved block %#04lx (+%d)\n, block, bit);
 
+   if ((err = extend_or_restart_transaction(handle, 1, bh)))
+   goto exit_bh;
+
if (IS_ERR(gdb = bclean(handle, sb, block))) {
err = PTR_ERR(bh);
goto exit_bh;
@@ -249,6 +282,10 @@ static int setup_new_group_blocks(struct
struct buffer_head *it;
 
ext3_debug(clear inode block %#04lx (+%d)\n, block, bit);
+
+   if ((err = extend_or_restart_transaction(handle, 1, bh)))
+   goto exit_bh;
+
if (IS_ERR(it = bclean(handle, sb, block))) {
err = PTR_ERR(it);
goto exit_bh;
@@ -257,6 +294,10 @@ static int setup_new_group_blocks(struct
brelse(it);
ext3_set_bit(bit, bh-b_data);
}
+
+   if ((err = extend_or_restart_transaction(handle, 2, bh)))
+   goto exit_bh;
+

+ ext3-lighten-up-resize-transaction-requirements-checkpatch-fixes.patch added to -mm tree

2007-10-04 Thread akpm

The patch titled
 ext3-lighten-up-resize-transaction-requirements-checkpatch-fixes
has been added to the -mm tree.  Its filename is
 ext3-lighten-up-resize-transaction-requirements-checkpatch-fixes.patch

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

--
Subject: ext3-lighten-up-resize-transaction-requirements-checkpatch-fixes
From: Andrew Morton [EMAIL PROTECTED]

ERROR: do not use assignment in if condition
#58: FILE: fs/ext3/resize.c:173:
+   if ((err = ext3_journal_restart(handle, EXT3_MAX_TRANS_DATA)))

ERROR: use tabs not spaces
#60: FILE: fs/ext3/resize.c:175:
+^I$

ERROR: do not use assignment in if condition
#60: FILE: fs/ext3/resize.c:175:
+   if ((err = ext3_journal_get_write_access(handle, bh)))

ERROR: use tabs not spaces
#62: FILE: fs/ext3/resize.c:177:
$

ERROR: do not use assignment in if condition
#87: FILE: fs/ext3/resize.c:233:
+   if ((err = extend_or_restart_transaction(handle, 1, bh)))

ERROR: do not use assignment in if condition
#97: FILE: fs/ext3/resize.c:261:
+   if ((err = extend_or_restart_transaction(handle, 1, bh)))

ERROR: do not use assignment in if condition
#108: FILE: fs/ext3/resize.c:286:
+   if ((err = extend_or_restart_transaction(handle, 1, bh)))

ERROR: do not use assignment in if condition
#119: FILE: fs/ext3/resize.c:298:
+   if ((err = extend_or_restart_transaction(handle, 2, bh)))

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

Cc: linux-ext4@vger.kernel.org
Cc: Andreas Dilger [EMAIL PROTECTED]
Cc: Eric Sandeen [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
---


diff -puN 
fs/ext3/resize.c~ext3-lighten-up-resize-transaction-requirements-checkpatch-fixes
 fs/ext3/resize.c
--- 
a/fs/ext3/resize.c~ext3-lighten-up-resize-transaction-requirements-checkpatch-fixes
+++ a/fs/ext3/resize.c
@@ -170,11 +170,13 @@ static int extend_or_restart_transaction
if (err  0)
return err;
if (err) {
-   if ((err = ext3_journal_restart(handle, EXT3_MAX_TRANS_DATA)))
+   err = ext3_journal_restart(handle, EXT3_MAX_TRANS_DATA);
+   if (err)
return err;
-   if ((err = ext3_journal_get_write_access(handle, bh)))
+   err = ext3_journal_get_write_access(handle, bh);
+   if (err)
return err;
-}
+   }
 
return 0;
 }
@@ -230,7 +232,8 @@ static int setup_new_group_blocks(struct
 
ext3_debug(update backup group %#04lx (+%d)\n, block, bit);
 
-   if ((err = extend_or_restart_transaction(handle, 1, bh)))
+   err = extend_or_restart_transaction(handle, 1, bh);
+   if (err)
goto exit_bh;
 
gdb = sb_getblk(sb, block);
@@ -258,7 +261,8 @@ static int setup_new_group_blocks(struct
 
ext3_debug(clear reserved block %#04lx (+%d)\n, block, bit);
 
-   if ((err = extend_or_restart_transaction(handle, 1, bh)))
+   err = extend_or_restart_transaction(handle, 1, bh);
+   if (err)
goto exit_bh;
 
if (IS_ERR(gdb = bclean(handle, sb, block))) {
@@ -283,7 +287,8 @@ static int setup_new_group_blocks(struct
 
ext3_debug(clear inode block %#04lx (+%d)\n, block, bit);
 
-   if ((err = extend_or_restart_transaction(handle, 1, bh)))
+   err = extend_or_restart_transaction(handle, 1, bh);
+   if (err)
goto exit_bh;
 
if (IS_ERR(it = bclean(handle, sb, block))) {
@@ -295,7 +300,8 @@ static int setup_new_group_blocks(struct
ext3_set_bit(bit, bh-b_data);
}
 
-   if ((err = extend_or_restart_transaction(handle, 2, bh)))
+   err = extend_or_restart_transaction(handle, 2, bh);
+   if (err)
goto exit_bh;
 
mark_bitmap_end(input-blocks_count, EXT3_BLOCKS_PER_GROUP(sb),
_

Patches currently in -mm which might be from [EMAIL PROTECTED] are

fix-timer_stats-printout-of-events-sec.patch
slow-down-printk-during-boot.patch
acpi-add-reboot-mechanism.patch
acpi-suppress-uninitialized-var-warning.patch
git-alsa.patch
working-3d-dri-intel-agpko-resume-for-i815-chip.patch
git-arm.patch
git-dvb.patch
git-hwmon-fixup.patch
git-infiniband.patch
infiniband-work-around-gcc-slub-problem.patch
git-input.patch
git-input-fixup.patch
adbhid-produce-all-capslock-key-events.patch
console-keyboard-events-and-accessibility.patch
first-stab-at-elantech-touchpad-driver-for-26226-testers.patch
git-jg-misc-fix.patch
git-jg-warning-fixes.patch
git-kbuild.patch
git-kbuild-fixup.patch

+ ext2-support-large-blocksize-up-to-pagesize.patch added to -mm tree

2007-10-04 Thread akpm

The patch titled
 ext2: support large blocksize up to PAGESIZE
has been added to the -mm tree.  Its filename is
 ext2-support-large-blocksize-up-to-pagesize.patch

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

--
Subject: ext2: support large blocksize up to PAGESIZE
From: Takashi Sato [EMAIL PROTECTED]

This patch set supports large block size(4k, =64k) in ext2, just
enlarging the block size limit.  But it is NOT possible to have 64kB
blocksize on ext2 without some changes to the directory handling code.  The
reason is that an empty 64kB directory block would have a rec_len ==
(__u16)2^16 == 0, and this would cause an error to be hit in the
filesystem.  The proposed solution is treat 64k rec_len with a an
impossible value like rec_len = 0x to handle this.

The Patch-set consists of the following 2 patches.
  [1/2]  ext2: enlarge blocksize
 - Allow blocksize up to pagesize

  [2/2]  ext2: fix rec_len overflow
 - prevent rec_len from overflow with 64KB blocksize

Now on 64k page ppc64 box runs with this patch set we could create a 64k
block size ext2, and able to handle empty directory block.

Signed-off-by: Takashi Sato [EMAIL PROTECTED]
Signed-off-by: Mingming Cao [EMAIL PROTECTED]
Acked-by: Christoph Lameter [EMAIL PROTECTED]
Cc: linux-ext4@vger.kernel.org
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
---


diff -puN fs/ext2/super.c~ext2-support-large-blocksize-up-to-pagesize 
fs/ext2/super.c
--- a/fs/ext2/super.c~ext2-support-large-blocksize-up-to-pagesize
+++ a/fs/ext2/super.c
@@ -852,7 +852,8 @@ static int ext2_fill_super(struct super_
brelse(bh);
 
if (!sb_set_blocksize(sb, blocksize)) {
-   printk(KERN_ERR EXT2-fs: blocksize too small for 
device.\n);
+   printk(KERN_ERR EXT2-fs: bad blocksize %d.\n,
+   blocksize);
goto failed_sbi;
}
 
diff -puN include/linux/ext2_fs.h~ext2-support-large-blocksize-up-to-pagesize 
include/linux/ext2_fs.h
--- a/include/linux/ext2_fs.h~ext2-support-large-blocksize-up-to-pagesize
+++ a/include/linux/ext2_fs.h
@@ -87,8 +87,8 @@ static inline struct ext2_sb_info *EXT2_
  * Macro-instructions used to manage several block sizes
  */
 #define EXT2_MIN_BLOCK_SIZE1024
-#defineEXT2_MAX_BLOCK_SIZE 4096
-#define EXT2_MIN_BLOCK_LOG_SIZE  10
+#define EXT2_MAX_BLOCK_SIZE65536
+#define EXT2_MIN_BLOCK_LOG_SIZE10
 #ifdef __KERNEL__
 # define EXT2_BLOCK_SIZE(s)((s)-s_blocksize)
 #else
_

Patches currently in -mm which might be from [EMAIL PROTECTED] are

ext2-support-large-blocksize-up-to-pagesize.patch

-
To unsubscribe from this list: send the line unsubscribe linux-ext4 in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/2] ext2: Avoid rec_len overflow with 64KB block size

2007-10-04 Thread Andrew Morton
On Mon, 01 Oct 2007 17:35:46 -0700
Mingming Cao [EMAIL PROTECTED] wrote:

 ext2: Avoid rec_len overflow with 64KB block size
 
 From: Jan Kara [EMAIL PROTECTED]
 
 With 64KB blocksize, a directory entry can have size 64KB which does not fit
 into 16 bits we have for entry lenght. So we store 0x instead and convert
 value when read from / written to disk.

This patch clashes in non-trivial ways with
ext2-convert-to-new-aops-fix.patch and perhaps other things which are
already queued for 2.6.24 inclusion, so I'll need to ask for an updated
patch, please.

Also, I'm planing on merging the ext2 reservations code into 2.6.24, so if
we're aiming for complete support of 64k blocksize in 2.6.24's ext2,
additional testing and checking will be needed.

-
To unsubscribe from this list: send the line unsubscribe linux-ext4 in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


- ext2-support-large-blocksize-up-to-pagesize.patch removed from -mm tree

2007-10-04 Thread akpm

The patch titled
 ext2: support large blocksize up to PAGESIZE
has been removed from the -mm tree.  Its filename was
 ext2-support-large-blocksize-up-to-pagesize.patch

This patch was dropped because an updated version will be merged

--
Subject: ext2: support large blocksize up to PAGESIZE
From: Takashi Sato [EMAIL PROTECTED]

This patch set supports large block size(4k, =64k) in ext2, just
enlarging the block size limit.  But it is NOT possible to have 64kB
blocksize on ext2 without some changes to the directory handling code.  The
reason is that an empty 64kB directory block would have a rec_len ==
(__u16)2^16 == 0, and this would cause an error to be hit in the
filesystem.  The proposed solution is treat 64k rec_len with a an
impossible value like rec_len = 0x to handle this.

The Patch-set consists of the following 2 patches.
  [1/2]  ext2: enlarge blocksize
 - Allow blocksize up to pagesize

  [2/2]  ext2: fix rec_len overflow
 - prevent rec_len from overflow with 64KB blocksize

Now on 64k page ppc64 box runs with this patch set we could create a 64k
block size ext2, and able to handle empty directory block.

Signed-off-by: Takashi Sato [EMAIL PROTECTED]
Signed-off-by: Mingming Cao [EMAIL PROTECTED]
Acked-by: Christoph Lameter [EMAIL PROTECTED]
Cc: linux-ext4@vger.kernel.org
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
---


diff -puN fs/ext2/super.c~ext2-support-large-blocksize-up-to-pagesize 
fs/ext2/super.c
--- a/fs/ext2/super.c~ext2-support-large-blocksize-up-to-pagesize
+++ a/fs/ext2/super.c
@@ -852,7 +852,8 @@ static int ext2_fill_super(struct super_
brelse(bh);
 
if (!sb_set_blocksize(sb, blocksize)) {
-   printk(KERN_ERR EXT2-fs: blocksize too small for 
device.\n);
+   printk(KERN_ERR EXT2-fs: bad blocksize %d.\n,
+   blocksize);
goto failed_sbi;
}
 
diff -puN include/linux/ext2_fs.h~ext2-support-large-blocksize-up-to-pagesize 
include/linux/ext2_fs.h
--- a/include/linux/ext2_fs.h~ext2-support-large-blocksize-up-to-pagesize
+++ a/include/linux/ext2_fs.h
@@ -87,8 +87,8 @@ static inline struct ext2_sb_info *EXT2_
  * Macro-instructions used to manage several block sizes
  */
 #define EXT2_MIN_BLOCK_SIZE1024
-#defineEXT2_MAX_BLOCK_SIZE 4096
-#define EXT2_MIN_BLOCK_LOG_SIZE  10
+#define EXT2_MAX_BLOCK_SIZE65536
+#define EXT2_MIN_BLOCK_LOG_SIZE10
 #ifdef __KERNEL__
 # define EXT2_BLOCK_SIZE(s)((s)-s_blocksize)
 #else
_

Patches currently in -mm which might be from [EMAIL PROTECTED] are

ext3-support-large-blocksize-up-to-pagesize.patch
ext2-support-large-blocksize-up-to-pagesize.patch

-
To unsubscribe from this list: send the line unsubscribe linux-ext4 in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/2] ext2: Avoid rec_len overflow with 64KB block size

2007-10-04 Thread Andrew Morton
On Thu, 4 Oct 2007 16:40:44 -0600
Andreas Dilger [EMAIL PROTECTED] wrote:

 On Oct 04, 2007  13:12 -0700, Andrew Morton wrote:
  On Mon, 01 Oct 2007 17:35:46 -0700
   ext2: Avoid rec_len overflow with 64KB block size
   
   into 16 bits we have for entry lenght. So we store 0x instead and
   convert value when read from / written to disk.
  
  This patch clashes in non-trivial ways with
  ext2-convert-to-new-aops-fix.patch and perhaps other things which are
  already queued for 2.6.24 inclusion, so I'll need to ask for an updated
  patch, please.
 
 If the rel_len overflow patch isn't going to make it, then we also need
 to revert the EXT*_MAX_BLOCK_SIZE change to 65536.  It would be possible
 to allow this to be up to 32768 w/o the rec_len overflow fix however.
 

Ok, thanks, I dropped ext3-support-large-blocksize-up-to-pagesize.patch and
ext2-support-large-blocksize-up-to-pagesize.patch.

-
To unsubscribe from this list: send the line unsubscribe linux-ext4 in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


- ext3-support-large-blocksize-up-to-pagesize.patch removed from -mm tree

2007-10-04 Thread akpm

The patch titled
 ext3: support large blocksize up to PAGESIZE
has been removed from the -mm tree.  Its filename was
 ext3-support-large-blocksize-up-to-pagesize.patch

This patch was dropped because an updated version will be merged

--
Subject: ext3: support large blocksize up to PAGESIZE
From: Takashi Sato [EMAIL PROTECTED]

This patch set supports large block size(4k, =64k) in ext3 just enlarging
the block size limit.  But it is NOT possible to have 64kB blocksize on
ext3 without some changes to the directory handling code.  The reason is
that an empty 64kB directory block would have a rec_len == (__u16)2^16 ==
0, and this would cause an error to be hit in the filesystem.  The proposed
solution is treat 64k rec_len with a an impossible value like rec_len =
0x to handle this.

The Patch-set consists of the following 2 patches.
  [1/2]  ext3: enlarge blocksize
 - Allow blocksize up to pagesize

  [2/2]  ext3: fix rec_len overflow
 - prevent rec_len from overflow with 64KB blocksize

Now on 64k page ppc64 box runs with this patch set we could create a 64k
block size ext3, and able to handle empty directory block.

Signed-off-by: Takashi Sato [EMAIL PROTECTED]
Signed-off-by: Mingming Cao [EMAIL PROTECTED]
Cc: linux-ext4@vger.kernel.org
Acked-by: Christoph Lameter [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
---


diff -puN fs/ext3/super.c~ext3-support-large-blocksize-up-to-pagesize 
fs/ext3/super.c
--- a/fs/ext3/super.c~ext3-support-large-blocksize-up-to-pagesize
+++ a/fs/ext3/super.c
@@ -1620,7 +1620,11 @@ static int ext3_fill_super (struct super
}
 
brelse (bh);
-   sb_set_blocksize(sb, blocksize);
+   if (!sb_set_blocksize(sb, blocksize)) {
+   printk(KERN_ERR EXT3-fs: bad blocksize %d.\n,
+   blocksize);
+   goto out_fail;
+   }
logic_sb_block = (sb_block * EXT3_MIN_BLOCK_SIZE) / blocksize;
offset = (sb_block * EXT3_MIN_BLOCK_SIZE) % blocksize;
bh = sb_bread(sb, logic_sb_block);
diff -puN include/linux/ext3_fs.h~ext3-support-large-blocksize-up-to-pagesize 
include/linux/ext3_fs.h
--- a/include/linux/ext3_fs.h~ext3-support-large-blocksize-up-to-pagesize
+++ a/include/linux/ext3_fs.h
@@ -72,8 +72,8 @@
  * Macro-instructions used to manage several block sizes
  */
 #define EXT3_MIN_BLOCK_SIZE1024
-#defineEXT3_MAX_BLOCK_SIZE 4096
-#define EXT3_MIN_BLOCK_LOG_SIZE  10
+#defineEXT3_MAX_BLOCK_SIZE 65536
+#define EXT3_MIN_BLOCK_LOG_SIZE10
 #ifdef __KERNEL__
 # define EXT3_BLOCK_SIZE(s)((s)-s_blocksize)
 #else
_

Patches currently in -mm which might be from [EMAIL PROTECTED] are

ext3-support-large-blocksize-up-to-pagesize.patch

-
To unsubscribe from this list: send the line unsubscribe linux-ext4 in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


powerpc BUG fix/workaround

2007-10-04 Thread Aneesh Kumar K.V



Aneesh Kumar K.V wrote:





115908 | fsstress--2.6.23-rc9--ppc64 | f | gekko-lp4 |
  http://abat.linux.ibm.com/abat-repo/logs/[EMAIL PROTECTED]



Same here
EXT4-fs: mballoc enabled
[ cut here ]
kernel BUG at fs/ext4/mballoc.c:1607!
cpu 0x0: Vector: 700 (Program Check) at [c0003e202c50]
   pc: c01a4ef4: .ext4_mb_new_blocks+0xe94/0x18f4
   lr: c01a4ed8: .ext4_mb_new_blocks+0xe78/0x18f4
   sp: c0003e202ed0
  msr: 80029032
 current = 0xc0002786a000
 paca= 0xc05b2580
   pid   = 10651, comm = fsstress
kernel BUG at fs/ext4/mballoc.c:1607!
enter ? for help
[c0003e202ed0] c01a4d28 .ext4_mb_new_blocks+0xcc8/0x18f4 
(unreliable)

[c0003e203160] c019c258 .ext4_ext_get_blocks+0x5a8/0x774
[c0003e2032b0] c0189d8c .ext4_da_get_block_write+0xd4/0x234
[c0003e203370] c01138b8 .mpage_da_map_blocks+0xc8/0x348
[c0003e203540] c0113dfc .mpage_da_writepages+0x80/0xa4
[c0003e203650] c0185218 .ext4_da_writepages+0x1c/0x34
[c0003e2036d0] c00a7598 .do_writepages+0x74/0xac
[c0003e203750] c009dcd4 .__filemap_fdatawrite_range+0x9c/0xd0
[c0003e2038a0] c009dd28 .filemap_fdatawrite+0x20/0x30
[c0003e203920] c009e2e4 .filemap_write_and_wait+0x2c/0x68
[c0003e2039b0] c00a0af4 .generic_file_direct_IO+0xc4/0x1b0
[c0003e203a70] c00a1400 .generic_file_aio_read+0xa8/0x1c4
[c0003e203b50] c00d7d68 .do_sync_read+0xd0/0x130
[c0003e203cf0] c00d7efc .vfs_read+0x134/0x1f8
[c0003e203d90] c00d8334 .sys_read+0x4c/0x8c
[c0003e203e30] c000852c syscall_exit+0x0/0x40





After some debugging i have a work around. The problem is in one of the 
test/clear/set APIs
I am yet to findout what is going wrong. 



The request for a block result in us looking at the order 11 buddy entry which 
ad bb_counter == 1
While initialzing the buddy the order 11 had 1st  bit in the buddy bitmap 
cleared.



The bb_counter for order 11 is 1
bit cleared is 1
the address of buddy is c000f9b82ffc
Cleared the bit 
Test bit pass 
ext4_find_next zero returned 0



3:mon dr c000f9b82ffc

3:mon
3:mon d c000f9b82ffc
c000f9b82ffc    ||
c000f9b8300c    ||
c000f9b8301c    ||
c000f9b8302c    ||
3:mon


But xmon shows it not cleared. But a subsequest ext4_test_bit passes. 

And when we fail we have 


The value of bb_counter is 1
The value of order  is 11
The value of k  is 16 and max is 16
The  bitmap addr is c000f9b82ffc


Since i was looking for a quick fix. I ported back the changes related the 
set/test/clear bits which i had
removed. With those changes the powerpc stands the fsx_linux, fs_inode and 
fsstress tests.

http://abat.linux.ibm.com/abat-repo/logs/[EMAIL PROTECTED]/

I would request to add the below attached patch to the patch queue 



We will keep it as a separate patch until we fix the  BUG.

# This series applies on GIT commit 3146b39c185f8a436d430132457e84fa1d8f8208
jbd_slab_cleanup.patch
jbd_GFP_NOFAIL_flag_cleanup.patch
jbd2-ext4-cleanups-convert-to-kzalloc.patch
jbd_to_jbd2_naming_cleanups.patch
jbd2-fix-commit-code-to-properly-abort-journal.patch
jbd2-debug-code-cleanup.patch
remove-obsolete-fragments.patch
remove-ifdef-config_ext4_index.patch
uninitialized-block-groups.patch
fix-sparse-warnings.patch
flex_bg-kernel-support-v2.patch
ext4_large_blocksize_support.patch
ext4_rec_len_overflow_with_64kblk_fix-v2.patch
ext2_large_blocksize_support.patch
ext3_large_blocksize_support.patch
ext2_rec_len_overflow_with_64kblk_fix-v2.patch
ext3_rec_len_overflow_with_64kblk_fix-v2.patch
ext4-convert_bg_block_bitmap_to_bg_block_bitmap_lo.patch
ext4-convert_bg_inode_bitmap_and_bg_inode_table.patch
ext4-convert_s_blocks_count_to_s_blocks_count_lo.patch
ext4-convert_s_r_blocks_count_and_s_free_blocks_count.patch
ext4-convert_ext4_extent.ee_start_to_ext4_extent.ee_start_lo.patch
ext4-convert_ext4_extent_idx.ei_leaf_to_ext4_extent_idx.ei_leaf_lo.patch
ext4-sparse-fix.patch
jbd-stats-through-procfs
ext4-journal_chksum-2.6.20.patch
ext4-journal-chksum-review-fix.patch
64-bit-i_version.patch
i_version_hi.patch
ext4_i_version_hi_2.patch
i_version_update_ext4.patch
delalloc-vfs.patch
delalloc-ext4.patch
ext-truncate-mutex.patch
ext3-4-migrate.patch
generic-find-next-le-bit
new-extent-function.patch
mballoc-core.patch
mballoc-bug-workaround.patch
jbd-blocks-reservation-fix-for-large-blk.patch
jbd2-blocks-reservation-fix-for-large-blk.patch
ext4_fix_setup_new_group_blocks_locking.patch
ext4_lighten_up_resize_transaction_requirements.patch


-

Workaround for