Re: What's cooking in e2fsprogs.git (topics)

2008-02-25 Thread Aneesh Kumar K.V
extent format for symlink. From: Aneesh Kumar K.V [EMAIL PROTECTED] This patch enable extent format for normal symlink. Extent format enables to refere file system blocks 32 bits. Enabling extent format for symlink enables to have symlink block beyond 2**32 blocks. We still don't enable extent

[PATCH] ext4: Convert uninitialized extent to initialized extent in case of file system full

2008-02-22 Thread Aneesh Kumar K.V
to the extent to prevent wrong data reaching userspace. Signed-off-by: Aneesh Kumar K.V [EMAIL PROTECTED] --- fs/ext4/extents.c | 151 ++--- 1 files changed, 144 insertions(+), 7 deletions(-) diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c

[PATCH] ext4: Fix fallocate error path.

2008-02-22 Thread Aneesh Kumar K.V
Put the old extent details back if we fail to split the uninitialized extent. Signed-off-by: Aneesh Kumar K.V [EMAIL PROTECTED] --- fs/ext4/extents.c | 26 -- 1 files changed, 24 insertions(+), 2 deletions(-) diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index

Re: [PATCH] ext4: Convert uninitialized extent to initialized extent in case of file system full

2008-02-22 Thread Aneesh Kumar K.V
Test results for the patch. mmaptest simply maps a range and write to it. The length of the extent indicate whether it is initialized or not. There is no space in the file system for another block. So the uninitialized extent have to be converted to initialized extent. [EMAIL PROTECTED]:/ext4#

Re: [RFC][PATCH] ext4: Convert uninitialized extent to initialized extent in case of file system full

2008-02-22 Thread Aneesh Kumar K.V
On Fri, Feb 22, 2008 at 08:01:28PM +0530, Aneesh Kumar K.V wrote: + + /* Now write all the buffer_heads in the page */ + do { + set_buffer_uptodate(bh); + if (ext4_should_journal_data(inode)) { + err

Re: [PATCH] ext4: Use page_mkwrite vma_operations to get mmap write notification.

2008-02-22 Thread Aneesh Kumar K.V
On Fri, Feb 22, 2008 at 10:10:48AM -0800, Mingming Cao wrote: On Fri, 2008-02-22 at 20:09 +0530, Aneesh Kumar K.V wrote: . + ext4_journal_stop(handle); + goto out_unlock; + } + if (!ret ext4_should_order_data(inode)) { + ret = walk_page_buffers

[RFC][PATCH] ext4: Convert uninitialized extent to initialized extent in case of file system full

2008-02-21 Thread Aneesh Kumar K.V
. But that is another patch. From 6a73edd4dbb32344e6a83ebdc07edd0e96d376bd Mon Sep 17 00:00:00 2001 From: Aneesh Kumar K.V [EMAIL PROTECTED] Date: Thu, 21 Feb 2008 23:57:38 +0530 Subject: [PATCH] ext4: Convert uninitialized extent to initialized extent in case of file system full A write to prealloc

Re: [PATCH -v2] ext4: Use page_mkwrite vma_operations to get mmap write notification.

2008-02-21 Thread Aneesh Kumar K.V
On Thu, Feb 21, 2008 at 09:39:20AM -0800, Mingming Cao wrote: On Tue, 2008-02-19 at 09:13 +0530, Aneesh Kumar K.V wrote: We would like to get notified when we are doing a write on mmap section. This is needed with respect to preallocated area. We split the preallocated area into initialzed

[PATCH] ext4: ext4_find_next_zero_bit needs an aligned address on some arch

2008-02-20 Thread Aneesh Kumar K.V
-by: Aneesh Kumar K.V [EMAIL PROTECTED] CC:Eric Sandeen [EMAIL PROTECTED] --- fs/ext4/mballoc.c | 62 ++-- 1 files changed, 40 insertions(+), 22 deletions(-) diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index 89772b9..ccddd21 100644 --- a/fs/ext4

Re: [PATCH] fs/ext4/mballoc.c: Convert to list_for_each_entry_rcu()

2008-02-19 Thread Aneesh Kumar K.V
changes attached. ext4: Convert list_for_each_rcu() to list_for_each_entry_rcu() From: Aneesh Kumar K.V [EMAIL PROTECTED] The list_for_each_entry_rcu() primitive should be used instead of list_for_each_rcu(), as the former is easier to use and provides better type safety. http://groups.google.com

Error with the latest stable series of the patch queue.

2008-02-19 Thread Aneesh Kumar K.V
Hi all, I am seeing the below error in the console. But the tests are reported as success. EXT4-fs: mballoc enabled EXT4-fs error (device sda7): ext4_ext_find_extent: bad header in inode #204044: invalid magic - magic 0, entries 0, max 0(0), depth 0(0) EXT4-fs error (device sda7):

Re: [PATCH] clear extents flag on inodes created in ext4_mknod

2008-02-19 Thread Aneesh Kumar K.V
On Tue, Feb 19, 2008 at 10:19:44PM +0530, Aneesh Kumar K.V wrote: On Tue, Feb 19, 2008 at 10:39:52AM -0600, Eric Sandeen wrote: Eric Sandeen wrote: e2fsck doesn't expect to find char, block, fifo, or socket files with the extent flag set, so clear that in ext4_mknod. Signed-off

Re: Error with the latest stable series of the patch queue.

2008-02-19 Thread Aneesh Kumar K.V
On Tue, Feb 19, 2008 at 06:15:01PM +0100, Valerie Clement wrote: Aneesh Kumar K.V wrote: Hi all, I am seeing the below error in the console. But the tests are reported as success. EXT4-fs: mballoc enabled EXT4-fs error (device sda7): ext4_ext_find_extent: bad header in inode #204044

Re: Error with the latest stable series of the patch queue.

2008-02-19 Thread Aneesh Kumar K.V
On Tue, Feb 19, 2008 at 06:15:01PM +0100, Valerie Clement wrote: Aneesh Kumar K.V wrote: Hi all, I am seeing the below error in the console. But the tests are reported as success. EXT4-fs: mballoc enabled EXT4-fs error (device sda7): ext4_ext_find_extent: bad header in inode #204044

Re: [PATCH] clear extents flag on inodes created in ext4_mknod

2008-02-19 Thread Aneesh Kumar K.V
On Tue, Feb 19, 2008 at 10:39:52AM -0600, Eric Sandeen wrote: Eric Sandeen wrote: e2fsck doesn't expect to find char, block, fifo, or socket files with the extent flag set, so clear that in ext4_mknod. Signed-off-by: Eric Sandeen [EMAIL PROTECTED] --- Index:

[PATCH] ext4: set EXT4_EXTENTS_FL only for directory and regular files

2008-02-19 Thread Aneesh Kumar K.V
error later when we are verifying the extent header Also we don't want to set extent flag for symlinks, char, block, fifo or socket Signed-off-by: Aneesh Kumar K.V [EMAIL PROTECTED] --- fs/ext4/ialloc.c | 22 +++--- fs/ext4/namei.c |1 - 2 files changed, 15 insertions(+), 8

Re: [PATCH] ext4: set EXT4_EXTENTS_FL only for directory and regular files

2008-02-19 Thread Aneesh Kumar K.V
Mingming, On Wed, Feb 20, 2008 at 01:19:05AM +0530, Aneesh Kumar K.V wrote: Also don't inherit EXT4_EXTENTS_FL from parent directory. If we have a directory with extent flag set and later mount the file system with -o noextents, the files created in that directory will also have extent flag

[PATCH] ext4: Use page_mkwrite vma_operations to get mmap write notification.

2008-02-18 Thread Aneesh Kumar K.V
and that would result in data loss. Signed-off-by: Aneesh Kumar K.V [EMAIL PROTECTED] --- fs/ext4/file.c | 19 ++- fs/ext4/inode.c |6 ++ include/linux/ext4_fs.h |1 + 3 files changed, 25 insertions(+), 1 deletions(-) diff --git a/fs/ext4/file.c b/fs

[PATCH] ext4: Don't mark the filesystem with errors if we fail to fallocate.

2008-02-18 Thread Aneesh Kumar K.V
IF we fail fallocate don't call ext4_error. Also don't hide errors from ext4_get_blocks_wrap Signed-off-by: Aneesh Kumar K.V [EMAIL PROTECTED] --- fs/ext4/extents.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 5b22f71

Re: [PATCH] ext4: When reading from fallocated blocks make sure we return zero.

2008-02-18 Thread Aneesh Kumar K.V
On Mon, Feb 18, 2008 at 04:14:34PM -0800, Mingming Cao wrote: On Sat, 2008-02-16 at 08:53 +0530, Aneesh Kumar K.V wrote: How about the following patch? Regards, Mingming ext4: ext4_get_blocks_wrap fix for writing to preallocated From: Mingming Cao [EMAIL PROTECTED] This patch fixed

[PATCH -v2] ext4: Use page_mkwrite vma_operations to get mmap write notification.

2008-02-18 Thread Aneesh Kumar K.V
and that would result in data loss. The changes are also needed to handle ENOSPC when writing to an mmap section of files with holes. Signed-off-by: Aneesh Kumar K.V [EMAIL PROTECTED] --- fs/ext4/file.c | 19 ++- fs/ext4/inode.c |6 ++ include/linux/ext4_fs.h

Re: [PATCH] ext4: When reading from fallocated blocks make sure we return zero.

2008-02-17 Thread Aneesh Kumar K.V
On Sat, Feb 16, 2008 at 08:53:34AM +0530, Aneesh Kumar K.V wrote: On Fri, Feb 15, 2008 at 11:43:04AM -0800, Mingming Cao wrote: On Fri, 2008-02-15 at 23:46 +0530, Aneesh Kumar K.V wrote: fallocate blocks are considered as sparse area and read from them should return zero

[PATCH] ext4: When reading from fallocated blocks make sure we return zero.

2008-02-15 Thread Aneesh Kumar K.V
fallocate blocks are considered as sparse area and read from them should return zero. ext4_ext_get_blocks should return zero for read request. Signed-off-by: Aneesh Kumar K.V [EMAIL PROTECTED] --- fs/ext4/extents.c |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git

[RFC/PATCH] ext4: Fix the memory leak and buffer head leak with respect to ext4_ext_path

2008-02-14 Thread Aneesh Kumar K.V
The path variable returned via ext4_ext_find_extent is a kmalloc variable and need to be freeded. It also contain refrences to buffer_head which need to be dropped. Signed-off-by: Aneesh Kumar K.V [EMAIL PROTECTED] --- fs/ext4/extents.c |6 +++--- fs/ext4/migrate.c

[RFC/PATCH] ext4: Request for journal write access early.

2008-02-14 Thread Aneesh Kumar K.V
In ext4_ext_convert_to_initialized before we need to request for journal write access before we even modify the extent length. Signed-off-by: Aneesh Kumar K.V [EMAIL PROTECTED] --- fs/ext4/extents.c | 11 --- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/fs/ext4

[PATCH] ext4: Set directory link count to zero if we fail to create the directory.

2008-02-12 Thread Aneesh Kumar K.V
. Clear? yes Inode 1120 is a zero-length directory. Clear? yes Inode 1121 is a zero-length directory. Clear? yes Fix the same by dropping the inode link count using drop_nlink Signed-off-by: Aneesh Kumar K.V [EMAIL PROTECTED] --- fs/ext4/namei.c |2 +- 1 files changed, 1 insertions(+), 1

EXT4_FEATURE_RO_COMPAT_DIR_NLINK and the directory size.

2008-02-12 Thread Aneesh Kumar K.V
Steps: [root]# more /root/largedir i=65000 mkdir /mnt/tmp/test/ cd /mnt/tmp/test/ while [ $i -gt 0 ] do mkdir $i i=$(expr $i - 1) done # /root/largedir # cd /mnt/tmp/test # rm -rf * # cd .. # ls -al drwxr-xr-x 1 root root 1380352 Feb 12 07:15 test # e2fsck -fv /dev/sda7 # ls

Re: [PATCH][0/28] Lustre e2fsprogs patch series

2008-02-11 Thread Aneesh Kumar K.V
On Sun, Feb 10, 2008 at 11:19:12PM -0500, Theodore Tso wrote: On Sat, Feb 02, 2008 at 12:59:43AM -0700, Andreas Dilger wrote: The following series of emails will contain the large part of the e2fsprogs patch series that is used for Lustre. It will not contain the regression tests for

Re: [PATCH] ext4: Don't claim block from group which has corrupt bitmap

2008-02-11 Thread Aneesh Kumar K.V
On Mon, Feb 11, 2008 at 05:00:18PM +0530, Aneesh Kumar K.V wrote: In ext4_mb_complex_scan_group, if the extent length of the newly found extentet is greater than than the total free blocks counted in group info, break without claiming the block. Document different ext4_error usage

Re: BUG_ON at mballoc.c:3752

2008-02-07 Thread Aneesh Kumar K.V
other issues. Eric , can you run the test with below patch and see if this makes any difference ?. I know we are not fixing any bugs in the below patch. ext4: Don't panic in case of corrupt bitmap From: Aneesh Kumar K.V [EMAIL PROTECTED] Multiblock allocator was calling BUG_ON in many case

[PATCH] ext4: Fix circular locking dependency with migrate and rm.

2008-02-06 Thread Aneesh Kumar K.V
[c01e200c] ext4_unlink+0x6e/0x1a4 [c017449e] vfs_unlink+0x49/0x89 [c0175f02] do_unlinkat+0x96/0x12c [c0175fa8] sys_unlink+0x10/0x12 [c0104f8a] sysenter_past_esp+0x5f/0xa5 Signed-off-by: Aneesh Kumar K.V [EMAIL PROTECTED] --- fs/ext4/migrate.c | 117

Re: jbd2_handle and i_data_sem circular locking dependency detected

2008-02-05 Thread Aneesh Kumar K.V
On Mon, Feb 04, 2008 at 05:31:56PM +0100, Jan Kara wrote: Hi, On Mon 04-02-08 15:42:28, Aneesh Kumar K.V wrote: This is with the new ext3 - ext4 migrate code added. The recently added lockdep for jbd2 helped to find this out. We want to hold the i_data_sem on the ext3 inode during

Re: jbd2_handle and i_data_sem circular locking dependency detected

2008-02-05 Thread Aneesh Kumar K.V
On Tue, Feb 05, 2008 at 02:42:28PM +0100, Jan Kara wrote: On Tue 05-02-08 17:53:42, Aneesh Kumar K.V wrote: How about the patch below. I did the below testing a) migrate a file b) run fs_inode fsstres fsx_linux. The intention was to find out whether the new locking is breaking any

Re: jbd2_handle and i_data_sem circular locking dependency detected

2008-02-05 Thread Aneesh Kumar K.V
On Tue, Feb 05, 2008 at 05:34:04PM +0100, Jan Kara wrote: On Tue 05-02-08 21:57:03, Aneesh Kumar K.V wrote: I have a FIXME at migrate.c:524 documenting exactly that. The difficult question was by how much we should extent the journal. ? But in reality we might have accumulated enough

Re: [PATCH] Fix ext4 bitops

2008-02-04 Thread Aneesh Kumar K.V
On Mon, Feb 04, 2008 at 10:24:36AM +0100, Heiko Carstens wrote: | fs/ext4/mballoc.c: In function 'ext4_mb_generate_buddy': | fs/ext4/mballoc.c:954: error: implicit declaration of function 'generic_find_next_le_bit' The s390 specific bitops uses parts of the generic

Re: Fw: [Bugme-new] [Bug 9849] New: NULL pointer deref in journal_wait_on_commit_record

2008-02-04 Thread Aneesh Kumar K.V
can add the below diff to the same. The change was suggested by Girish. Before journal checksum changes sync_dirty_buffer did the get_bh. Signed-off-by: Aneesh Kumar K.V [EMAIL PROTECTED] diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c index da8d0eb..2b88ab0 100644 --- a/fs/jbd2/commit.c +++ b/fs

jbd2_handle and i_data_sem circular locking dependency detected

2008-02-04 Thread Aneesh Kumar K.V
Hi, This is with the new ext3 - ext4 migrate code added. The recently added lockdep for jbd2 helped to find this out. We want to hold the i_data_sem on the ext3 inode during migration to prevent walking the ext3 inode when it is being converted to ext4 format. Also we want to avoid file

Re: jbd2_handle and i_data_sem circular locking dependency detected

2008-02-04 Thread Aneesh Kumar K.V
On Mon, Feb 04, 2008 at 05:31:56PM +0100, Jan Kara wrote: Hi, On Mon 04-02-08 15:42:28, Aneesh Kumar K.V wrote: This is with the new ext3 - ext4 migrate code added. The recently added lockdep for jbd2 helped to find this out. We want to hold the i_data_sem on the ext3 inode during

[PATCH] ext4: Fix reference counting on buffer head.

2008-02-04 Thread Aneesh Kumar K.V
With journal checksum patch we added asyn commit of journal commit headers. During the conversion we missed to take a reference on buffer head. Before the change sync_dirty_buffer did the get_bh(). The associative put_bh is done by journal_wait_on_commit_record() Signed-off-by: Aneesh Kumar K.V

Re: jbd2_handle and i_data_sem circular locking dependency detected

2008-02-04 Thread Aneesh Kumar K.V
On Mon, Feb 04, 2008 at 10:23:16AM -0500, Josef Bacik wrote: On Monday 04 February 2008 5:12:28 am Aneesh Kumar K.V wrote: Hi, This is with the new ext3 - ext4 migrate code added. The recently added lockdep for jbd2 helped to find this out. We want to hold the i_data_sem on the ext3

Re: [PATCH] Fix ext4 bitops

2008-02-03 Thread Aneesh Kumar K.V
On Sun, Feb 03, 2008 at 01:39:02PM +0100, Geert Uytterhoeven wrote: On Sun, 3 Feb 2008, Heiko Carstens wrote: On Fri, Feb 01, 2008 at 10:04:04PM +0100, Bastian Blank wrote: On Fri, Feb 01, 2008 at 12:22:57PM -0800, Andrew Morton wrote: On Fri, 1 Feb 2008 21:02:08 +0100 Bastian Blank

Re: BUG_ON at mballoc.c:3752

2008-02-03 Thread Aneesh Kumar K.V
On Thu, Jan 31, 2008 at 04:42:07PM +0100, Eric Sesterhenn wrote: * Eric Sesterhenn ([EMAIL PROTECTED]) wrote: hi, while running a modified version of fsfuzzer i triggered the BUG() in ext4_mb_release_inode_pa(). Sadly I am not able to reproduce this using the generated image, but

[PATCH] ext4: Fix Null dereference.

2008-02-03 Thread Aneesh Kumar K.V
); ... Signed-off-by: Aneesh Kumar K.V [EMAIL PROTECTED] --- fs/ext4/mballoc.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index 76e5fed..06d1f52 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c @@ -3069,7 +3069,7 @@ static int

Re: [PATCH 36/49] ext4: Add EXT4_IOC_MIGRATE ioctl

2008-01-26 Thread Aneesh Kumar K.V
On Fri, Jan 25, 2008 at 11:15:00PM -0500, Theodore Tso wrote: On Thu, Jan 24, 2008 at 11:25:32AM +0530, Aneesh Kumar K.V wrote: +static int free_ext_idx(handle_t *handle, struct inode *inode, + struct ext4_extent_idx *ix) +{ + int i, retval = 0

Re: [PATCH 41/49] ext4: Add multi block allocator for ext4

2008-01-24 Thread Aneesh Kumar K.V
updated patch. Waiting for the test results. I am only attaching the diff. Mballoc patch is really large. -aneesh diff --git a/Documentation/filesystems/ext4.txt b/Documentation/filesystems/ext4.txt index 4f329af..ec7d349 100644 --- a/Documentation/filesystems/ext4.txt +++

Patch queue update

2008-01-24 Thread Aneesh Kumar K.V
I have updated patches based on the review feedback from Andrew. I have tested this on 128(64p) ppc64 sles 4(2p)ppc64 debian 4(2p)x86_64 ubuntu-gutsy Updated patches are at http://www.radian.org/~kvaneesh/ext4/jan-24-2008/ http://www.radian.org/~kvaneesh/ext4/jan-24-2008/patches.tar

Re: [PATCH 41/49] ext4: Add multi block allocator for ext4

2008-01-24 Thread Aneesh Kumar K.V
On Thu, Jan 24, 2008 at 01:26:14PM +0530, Aneesh Kumar K.V wrote: +/* find most significant bit */ +static int fmsb(unsigned short word) +{ + int order; + + if (word 255) { + order = 7; + word = 8; + } else { + order = -1

GFP_ usage in kmalloc with mballoc

2008-01-24 Thread Aneesh Kumar K.V
Hi, I looked at the GFP flag usage in mballoc. I think the below change make sense with respect to mballoc. First hunk is memory allocation during ext4_mb_init which is called during mount time. I guess it is ok to convert that to GFP_KERNEL. Second hunk is during ext4_mb_free_metadata. I

Re: [PATCH 23/49] Add buffer head related helper functions

2008-01-23 Thread Aneesh Kumar K.V
70d4ca32604e0935a8b9a49c5ac8b9c64c810693 Author: Aneesh Kumar K.V [EMAIL PROTECTED] Date: Thu Jan 24 10:50:24 2008 +0530 Add buffer head related helper functions Add buffer head related helper function bh_uptodate_or_lock and bh_submit_read which can be used by file system Signed-off

Re: [PATCH 41/49] ext4: Add multi block allocator for ext4

2008-01-23 Thread Aneesh Kumar K.V
-by: Aneesh Kumar K.V [EMAIL PROTECTED] Signed-off-by: Eric Sandeen [EMAIL PROTECTED] Signed-off-by: Theodore Ts'o [EMAIL PROTECTED] ... +#if BITS_PER_LONG == 64 +#define mb_correct_addr_and_bit(bit, addr) \ +{ \ + bit

Re: [PATCH] Fix oops in mballoc caused by a variable overflow

2008-01-17 Thread Aneesh Kumar K.V
On Thu, Jan 17, 2008 at 10:43:40AM +0100, Valerie Clement wrote: Aneesh Kumar K.V wrote: What about this ? I guess we will overflow start = start bsbits; Hi Aneesh, your patch below doesn't fix the issue, because as start_off is also loff_t, start_off = ac-ac_o_ex.fe_logical bsbits

Re: [PATCH] Fix oops in mballoc caused by a variable overflow

2008-01-17 Thread Aneesh Kumar K.V
On Thu, Jan 17, 2008 at 10:43:40AM +0100, Valerie Clement wrote: Aneesh Kumar K.V wrote: What about this ? I guess we will overflow start = start bsbits; Hi Aneesh, your patch below doesn't fix the issue, because as start_off is also loff_t, start_off = ac-ac_o_ex.fe_logical bsbits

Re: [PATCH] Fix oops in mballoc caused by a variable overflow

2008-01-17 Thread Aneesh Kumar K.V
On Thu, Jan 17, 2008 at 02:09:41PM +0100, Valerie Clement wrote: Aneesh Kumar K.V wrote: On Thu, Jan 17, 2008 at 10:43:40AM +0100, Valerie Clement wrote: Aneesh Kumar K.V wrote: What about this ? I guess we will overflow start = start bsbits; Hi Aneesh, your patch below doesn't fix

Re: [PATCH] Fix oops in mballoc caused by a variable overflow

2008-01-16 Thread Aneesh Kumar K.V
in ext4_mb_normalize_request From: Aneesh Kumar K.V [EMAIL PROTECTED] kernel BUG at fs/ext4/mballoc.c:3148! The BUG_ON is: BUG_ON(size = 0 || size = EXT4_BLOCKS_PER_GROUP(ac-ac_sb)); where the value of size is 4293920768. This is due to the overflow of the variable start in the ext4_mb_normalize_request() function

Re: checkpatch.pl warnings

2008-01-15 Thread Aneesh Kumar K.V
On Mon, Jan 14, 2008 at 12:49:27PM -0800, Mingming Cao wrote: Hi Guys, Could you check the checkpatch.pl warnings and see if it make sense to fix them? Thanks! [EMAIL PROTECTED]:~/fs/ext4/stylecheck$ grep has style problems * linux-2.6.24-rc7-48-bit-i_blocks.patch.out:Your patch has

Re: [PATCH] ext4: use ext4_ext_get_actual_len instead of directly using ext4_extent.ee_len

2008-01-14 Thread Aneesh Kumar K.V
On Sat, Jan 12, 2008 at 11:44:00PM +0530, Aneesh Kumar K.V wrote: fs/ext4/extents.c | 26 ++ 1 files changed, 14 insertions(+), 12 deletions(-) diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 81bce98..4269cc6 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4

[PATCH] ext4: use ext4_ext_get_actual_len instead of directly using ext4_extent.ee_len

2008-01-12 Thread Aneesh Kumar K.V
] lock_release_holdtime+0x27/0x49 [81056480] __lock_acquire+0x4e7/0xc4d [81053c91] lock_release_holdtime+0x27/0x49 [810a8de7] sys_fallocate+0xe4/0x10d [8100c043] tracesys+0xd5/0xda Signed-off-by: Aneesh Kumar K.V [EMAIL PROTECTED] --- fs/ext4/extents.c | 26

Re: Problems with mballoc and uninit_groups option

2008-01-11 Thread Aneesh Kumar K.V
On Fri, Jan 11, 2008 at 03:04:08PM +0100, Valerie Clement wrote: Hi, I've got problems with mballoc when I create the ext4 filesystem with the uninit_groups option enabled. First, I do a single test on a filesystem created without the uninit_groups option and mounted with the defaults

patch queue update

2008-01-10 Thread Aneesh Kumar K.V
Hi Mingming, New patches for patch queue can be found at http://www.radian.org/~kvaneesh/ext4/jan-10-2008-ver2/ The changes are a) mballoc patch got an explanation about regular allocator. b) mballoc regular allocator we changed the usage of ffs to fls. I guess it makes sense to use

Re: patch queue update

2008-01-10 Thread Aneesh Kumar K.V
On Thu, Jan 10, 2008 at 02:43:23PM -0700, Andreas Dilger wrote: On Jan 10, 2008 21:03 +0530, Aneesh Kumar K.V wrote: if (i = sbi-s_mb_order2_reqs) { - i--; - if ((ac-ac_g_ex.fe_len (~(1 i))) == 0) + /* +* This should tell if fe_len

Re: [PATCH] set s_raid_stride and s_raid_stripe_width

2008-01-09 Thread Aneesh Kumar K.V
[..snip...] + if (param-s_raid_stride + (param-s_raid_stripe_width % param-s_raid_stride) != 0) + fprintf(stderr, _(\nWarning: RAID stripe-width %u not an even + multiple of stride %u.\n\n), +

[PATCH] ext4: Use superblock s_raid_stripe_width as stripe size during block allocation.

2008-01-09 Thread Aneesh Kumar K.V
the super block. Signed-off-by: Aneesh Kumar K.V [EMAIL PROTECTED] --- fs/ext4/super.c | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/fs/ext4/super.c b/fs/ext4/super.c index db1edc8..10330eb 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -2136,6 +2136,16

[PATCH] ext4: Check for return value from sb_set_blocksize

2008-01-09 Thread Aneesh Kumar K.V
sb_set_blocksize validates whether the specfied block size can be used by the file system. Make sure we fail mounting the file system if the blocksize specfied cannot be used. Signed-off-by: Aneesh Kumar K.V [EMAIL PROTECTED] --- fs/ext4/super.c | 18 +++--- 1 files changed, 7

Should we enabling mballoc by default ?

2008-01-09 Thread Aneesh Kumar K.V
Hi, mballoc currently causes fragmentation of small size files. The behaviour can be observed by running parallel dd on ext4 file system. A sample test case can be found here. http://www.radian.org/~kvaneesh/ext4/mballoc-frag/fragmentation-analysis This is because for small size request/file

Re: [PATCH] ext4: Check for return value from sb_set_blocksize

2008-01-09 Thread Aneesh Kumar K.V
Updated patch. The earlier patch did multiple brelse() during failed mount case. ext4: Check for return value from sb_set_blocksize From: Aneesh Kumar K.V [EMAIL PROTECTED] sb_set_blocksize validates whether the specfied block size can be used by the file system. Make sure we fail mounting

Re: [PATCH] ext4: Fix the soft lockup with multi block allocator.

2008-01-09 Thread Aneesh Kumar K.V
On Wed, Jan 09, 2008 at 01:10:41PM +0100, Jan Kara wrote: With the multi block allocator when we don't have prealloc space we discard @@ -3790,7 +3782,9 @@ repeat: /* if we still need more blocks and some PAs were used, try again */ if (free needed busy) { + busy

Re: [PATCH] ext4: Fix the soft lockup with multi block allocator.

2008-01-09 Thread Aneesh Kumar K.V
On Wed, Jan 09, 2008 at 07:44:30PM +0100, Jan Kara wrote: On Wed 09-01-08 23:54:28, Aneesh Kumar K.V wrote: On Wed, Jan 09, 2008 at 01:10:41PM +0100, Jan Kara wrote: With the multi block allocator when we don't have prealloc space we discard @@ -3790,7 +3782,9 @@ repeat

Re: [PATCH] ext4: Use superblock s_raid_stripe_width as stripe size during block allocation.

2008-01-09 Thread Aneesh Kumar K.V
On Wed, Jan 09, 2008 at 04:36:27PM -0700, Andreas Dilger wrote: On Jan 09, 2008 22:37 +0530, Aneesh Kumar K.V wrote: The stipe size used during block allocation is calculated as below. a) if we specify a stripe=value option using mount time. Use that value. b) if not use the value

mballoc and inode prealloc space deletion

2008-01-08 Thread Aneesh Kumar K.V
Hi Alex, With the latest changes i see both group preallocation and inode preallocation being used by mballoc. Since the choice is now made with file size not just the request size. (None of the test were actually using inode prealloc previously). Now that the test are using inode prealloc i see

Re: [PATCH] mballoc update

2008-01-08 Thread Aneesh Kumar K.V
On Tue, Jan 08, 2008 at 12:01:14PM +0530, Aneesh Kumar K.V wrote: Hi, This is the update for mballoc patch. The changes are result of merging with the lustre cvs version of mballoc. I liked this patch better because it is simple. I also the updated the commit message. The update commit

[PATCH] mballoc changes from ldiskfs

2008-01-07 Thread Aneesh Kumar K.V
Hi, This patch is not even compile tested. I am sending it over to find out whether some of the changes are even needed and to make sure i didn't drop any bug fix in the merge. something I noticed. a) prealloc table is completely gone. b) ext4_mb_put_pa change. ( I guess that is a bug with

Re: [PATCH] mballoc changes from ldiskfs

2008-01-07 Thread Aneesh Kumar K.V
On Mon, Jan 07, 2008 at 11:58:00PM +0530, Aneesh Kumar K.V wrote: Hi, This patch is not even compile tested. I am sending it over to find out whether some of the changes are even needed and to make sure i didn't drop any bug fix in the merge. something I noticed. a) prealloc table

[PATCH] mballoc update

2008-01-07 Thread Aneesh Kumar K.V
Hi, This is the update for mballoc patch. The changes are result of merging with the lustre cvs version of mballoc. I liked this patch better because it is simple. I also the updated the commit message. The update commit message is also attached below. We only have one FIXME!! in the commit

[Updated PATCH] ext4: Use the correct block number when reading the super block.

2007-12-31 Thread Aneesh Kumar K.V
If the block device hard sector size is larger than EXT4_MIN_BLOCK_SIZE we end up with wrong block number when reading super block. Signed-off-by: Aneesh Kumar K.V [EMAIL PROTECTED] --- fs/ext4/super.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/ext4

Re: [Updated PATCH] ext4: Use the correct block number when reading the super block.

2007-12-31 Thread Aneesh Kumar K.V
On Mon, Dec 31, 2007 at 01:59:22PM +0530, Aneesh Kumar K.V wrote: If the block device hard sector size is larger than EXT4_MIN_BLOCK_SIZE we end up with wrong block number when reading super block. Ignore the patch. I got confused by the do_div syntax. The do_div already save the division

[PATCH] ext4: Use the correct block number when reading the super block.

2007-12-30 Thread Aneesh Kumar K.V
If the block device hard sector size is larger than EXT4_MIN_BLOCK_SIZE we end up with wrong block number when reading super block. Signed-off-by: Aneesh Kumar K.V [EMAIL PROTECTED] --- fs/ext4/super.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/ext4/super.c b

Patch queue update

2007-12-23 Thread Aneesh Kumar K.V
Hi Mingming, I have placed the updated patch queue at http://www.radian.org/~kvaneesh/ext4/dec-24-2007/ The .tar can be found at http://www.radian.org/~kvaneesh/ext4/dec-24-2007/patch-series.tar The changes involve the below attached diff. I also updated the commit message of mballoc core

[PATCH] ext4: Fix the soft lockup with multi block allocator.

2007-12-21 Thread Aneesh Kumar K.V
logic going on tight loop resulting in watchdog timer triggering soft lockup warning. Signed-off-by: Aneesh Kumar K.V [EMAIL PROTECTED] --- fs/ext4/mballoc.c | 12 +++- 1 files changed, 3 insertions(+), 9 deletions(-) diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index 844765c

Re: BUG: soft lockup - CPU#0 stuck for 11s! [fsstress:5534]

2007-12-21 Thread Aneesh Kumar K.V
On Thu, Dec 20, 2007 at 08:02:42PM +0530, Aneesh Kumar K.V wrote: I am seeing this with the patch queue. I can reproduce this on x86 and powerpc. I see the file system full when this happens. The same happens even without delalloc enabled. The below patch fix the same for me. One thing i

[RFC] truncate_mutex to read_write semaphore

2007-12-14 Thread Aneesh Kumar K.V
The series include the truncate_mutex to read write semaphore conversion. I am marking below some of the test results. For O_DIRECT workloads we won't see the contention on truncate mutex because we are doing a get_block under inode-i_mutex. For FIBMAP we won't see contention because the

[PATCH 1/3] ext4: Make ext4_get_blocks_wrap take the truncate_mutex early.

2007-12-14 Thread Aneesh Kumar K.V
Kumar K.V [EMAIL PROTECTED] --- fs/ext4/extents.c |9 -- fs/ext4/inode.c | 69 +- include/linux/ext4_fs.h | 12 ++-- 3 files changed, 23 insertions(+), 67 deletions(-) diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index

[RFC][PATCH 2/3] ext4: Convert truncate_mutex to read write semaphore.

2007-12-03 Thread Aneesh Kumar K.V
We are currently taking the truncate_mutex for every read. This would have performance impact on large CPU configuration. Convert the lock to read write semaphore and take read lock when we are trying to read the file. Signed-off-by: Aneesh Kumar K.V [EMAIL PROTECTED] --- fs/ext4/balloc.c

[RFC][PATCH 1/3] ext4: Make ext4_get_blocks_wrap take the truncate_mutex early.

2007-12-03 Thread Aneesh Kumar K.V
Kumar K.V [EMAIL PROTECTED] --- fs/ext4/extents.c |7 +++-- fs/ext4/inode.c | 69 +- include/linux/ext4_fs.h | 12 ++-- 3 files changed, 21 insertions(+), 67 deletions(-) diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index

[RFC] truncate_mutex read write semaphore conversion

2007-12-03 Thread Aneesh Kumar K.V
The below patchset is NOT for patch queue. I am posting it here to get feedback regarding the approach and what test I need to run to make sure we are not breaking any locking rules. I have run dbench, ffsb, fsstress, fs_di, fs_inode, fsx_linux . Bonnie didn't run completely. In the automated

[RFC][PATCH 3/3] ext4: Take read lock during overwrite case.

2007-12-03 Thread Aneesh Kumar K.V
When we are overwriting a file and not actually allocating new file system blocks we need to take only the read lock on i_data_sem. Signed-off-by: Aneesh Kumar K.V [EMAIL PROTECTED] --- fs/ext4/inode.c | 32 1 files changed, 24 insertions(+), 8 deletions

[PATCH] ext4: Check for the correct error return from ext4_ext_get_blocks

2007-12-03 Thread Aneesh Kumar K.V
ext4_ext_get_blocks returns negative values on error. We should check for = 0 Signed-off-by: Aneesh Kumar K.V [EMAIL PROTECTED] --- fs/ext4/extents.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index a2475d4..ce57245 100644

Understanding mballoc

2007-12-03 Thread Aneesh Kumar K.V
Alex, This is my attempt at understanding multi block allocator. I have few questions marked as FIXME below. Can you help answering them. Most of this data is already in the patch queue as commit message. I have updated some details regarding preallocation. Once we understand the details i will

circular locking dependency detected

2007-11-29 Thread Aneesh Kumar K.V
=== [ INFO: possible circular locking dependency detected ] 2.6.24-rc3 #6 --- bash/2294 is trying to acquire lock: (journal-j_list_lock){--..}, at: [c01eee2f]

Re: ext4 still broken on arm (at least)

2007-11-27 Thread Aneesh Kumar K.V
actually sent in a patch which changes asking for review to linux-arch. I haven't got the response yet. Attaching the patch below Introduce ext4_find_next_bit From: Aneesh Kumar K.V [EMAIL PROTECTED] This gets used by the ext4 multi block allocator patches. Also add generic_find_next_le_bit Signed

blk bitmap validation test results

2007-11-22 Thread Aneesh Kumar K.V
Andreas suggested me to get the iozone results after multiple runs. I don't see any performance issue with the blk bitmap validation changes now. v2.6.24-rc3-35-g2e12044 File VM system latencies in microseconds - smaller is better

[Take 2] ext2/3/4 block bitmap validation patches

2007-11-19 Thread Aneesh Kumar K.V
This is the updated ext2/3/4 block bitmap validation patches Changes from the last post a) moved the bh_uptodate_or_lock and bh_submit_read to fs/buffer.c and added EXPORT_SYMBOL b) Updated bh_submit_read not to release buffer on failure. This handles one reference handling bug in the

[PATCH] ext2: add block bitmap validation

2007-11-19 Thread Aneesh Kumar K.V
When a new block bitmap is read from disk in read_block_bitmap() there are a few bits that should ALWAYS be set. In particular, the blocks given corresponding to block bitmap, inode bitmap and inode tables. Validate the block bitmap against these blocks. Signed-off-by: Aneesh Kumar K.V [EMAIL

[PATCH] ext3: add block bitmap validation

2007-11-19 Thread Aneesh Kumar K.V
When a new block bitmap is read from disk in read_block_bitmap() there are a few bits that should ALWAYS be set. In particular, the blocks given corresponding to block bitmap, inode bitmap and inode tables. Validate the block bitmap against these blocks. Signed-off-by: Aneesh Kumar K.V [EMAIL

[PATCH] ext4: add block bitmap validation

2007-11-19 Thread Aneesh Kumar K.V
When a new block bitmap is read from disk in read_block_bitmap() there are a few bits that should ALWAYS be set. In particular, the blocks given corresponding to block bitmap, inode bitmap and inode tables. Validate the block bitmap against these blocks. Signed-off-by: Aneesh Kumar K.V [EMAIL

[PATCH] Add buffer head related helper functions

2007-11-19 Thread Aneesh Kumar K.V
Add buffer head related helper function bh_uptodate_or_lock and bh_submit_read which can be used by file system Signed-off-by: Aneesh Kumar K.V [EMAIL PROTECTED] --- fs/buffer.c | 41 + include/linux/buffer_head.h |2 ++ 2 files

Re: [Take 2] ext2/3/4 block bitmap validation patches

2007-11-19 Thread Aneesh Kumar K.V
Aneesh Kumar K.V wrote: This is the updated ext2/3/4 block bitmap validation patches Changes from the last post a) moved the bh_uptodate_or_lock and bh_submit_read to fs/buffer.c and added EXPORT_SYMBOL b) Updated bh_submit_read not to release buffer on failure. This handles one

[PATCH 3/4] ext3: add block bitmap validation

2007-11-15 Thread Aneesh Kumar K.V
When a new block bitmap is read from disk in read_block_bitmap() there are a few bits that should ALWAYS be set. In particular, the blocks given corresponding to block bitmap, inode bitmap and inode tables. Validate the block bitmap against these blocks. Signed-off-by: Aneesh Kumar K.V [EMAIL

[PATCH 4/4] ext4: add block bitmap validation

2007-11-15 Thread Aneesh Kumar K.V
When a new block bitmap is read from disk in read_block_bitmap() there are a few bits that should ALWAYS be set. In particular, the blocks given corresponding to block bitmap, inode bitmap and inode tables. Validate the block bitmap against these blocks. Signed-off-by: Aneesh Kumar K.V [EMAIL

delalloc and reservation.

2007-10-29 Thread Aneesh Kumar K.V
Hi All, I looked at the delalloc and reservation differences that Valerie was observing. Below is my understanding. I am not sure whether the below will result in higher fragmentation that Eric Sandeen is observing. I guess it should not. Even though the reservation gets discarded during the

Re: delalloc and reservation

2007-10-29 Thread Aneesh Kumar K.V
I guess the list dropped this mail. Sending again. -aneesh ---BeginMessage--- Aneesh Kumar K.V wrote: Hi All, I looked at the delalloc and reservation differences that Valerie was observing. Below is my understanding. I am not sure whether the below will result in higher fragmentation

  1   2   3   >