Re: Interface for the new fallocate() system call

2007-04-05 Thread Randy Dunlap
On Thu, 5 Apr 2007 16:56:19 +0530 Amit K. Arora wrote:

> On Fri, Mar 30, 2007 at 02:14:17AM -0500, Jakub Jelinek wrote:
> > Wouldn't
> > int fallocate(loff_t offset, loff_t len, int fd, int mode)
> > work on both s390 and ppc/arm?  glibc will certainly wrap it and
> > reorder the arguments as needed, so there is no need to keep fd first.
>  
> This should work on all the platforms. The only concern I can think of
> here is the convention being followed till now, where all the entities on
> which the action has to be performed by the kernel (say fd, file/device
> name, pid etc.) is the first argument of the system call. If we can live
> with the small exception here, fine.
> 
> Or else, we may have to implement the 
> 
>   int fd, int mode, loff_t offset, loff_t len
> 
> as the layout of arguments here. I think only s390 will have a problem
> with this, and we can think of a workaround for it (may be similar to
> what ARM did to implement sync_file_range() system call)   :
> 
> asmlinkage long sys_s390_fallocate(int fd, loff_t offset, loff_t len, int 
> mode)
> {
> return sys_fallocate(fd, offset, len, mode);
> }
> 
> 
> To me both the approaches look slightly unconventional. But, we need to
> compromise somewhere to make things work on all the platforms.
> 
> Any thoughts on which one of the above should we finalize on ?
> 
> Thanks!

If s390 can work around the calling order that easily, I certainly
prefer the more conventional ordering of:

>   int fd, int mode, loff_t offset, loff_t len

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
-
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


[PATCH -mm] ext4: use NULL for pointers

2007-03-21 Thread Randy Dunlap
From: Randy Dunlap <[EMAIL PROTECTED]>

Use NULL instead of 0 for pointers:
fs/ext4/writeback.c:874:24: warning: Using plain integer as NULL pointer
fs/ext4/writeback.c:1105:23: warning: Using plain integer as NULL pointer

Signed-off-by: Randy Dunlap <[EMAIL PROTECTED]>
---
 fs/ext4/writeback.c |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--- linux-2.6.21-rc4-mm1.orig/fs/ext4/writeback.c
+++ linux-2.6.21-rc4-mm1/fs/ext4/writeback.c
@@ -41,6 +41,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -871,7 +872,7 @@ int ext4_wb_prepare_write(struct file *f
wb_debug("read block %u\n",
(unsigned) bhw->b_blocknr);
set_bh_page(bhw, page, 0);
-   bhw->b_this_page = 0;
+   bhw->b_this_page = NULL;
bhw->b_size = 1 << inode->i_blkbits;
atomic_set(&bhw->b_count, 1);
ll_rw_block(READ, 1, &bhw);
@@ -1102,7 +1103,7 @@ int ext4_wb_block_truncate_page(handle_t
wb_debug("read block %u for part.trunc on %lu\n",
(unsigned) bhw->b_blocknr, page->index);
set_bh_page(bhw, page, 0);
-   bhw->b_this_page = 0;
+   bhw->b_this_page = NULL;
bhw->b_size = 1 << inode->i_blkbits;
atomic_set(&bhw->b_count, 1);
ll_rw_block(READ, 1, &bhw);
-
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: Ext4 devel interlock meeting minutes (March 14, 2007)

2007-03-16 Thread Randy Dunlap
On Wed, 14 Mar 2007 15:49:39 -0700 Avantika Mathur wrote:

> Ext4 Developer Interlock Call: 03/14/2007 Meeting Minutes
> 
> Attendees: Mingming Cao, Eric Sandeen, Ted Ts'o, Dave Kleikamp, Suparna 
> Bhattacharya, Takashi Sato, Avantika Mathur
> 
> Minutes can be accessed at: 
> http://ext4.wiki.kernel.org/index.php/Ext4_Developer%27s_Conference_Call 
> 
> 
> Ext4 git Tree:
> 
> - Shaggy and Eric fixed the recent problems with the nanosecond timestamps in 
> the git tree
> 
> - There is a general problem that the git tree is not updated frequently
> 
>   - Ted feels there is not enough testing done to feel comfortable 
> updating to a new release
> 
> -- Many of the patches added to the tree are not tested properly.  
>   -- It would be helpful if people could pick up the tree and test it, 
> and make sure all upstream merging criteria is met by ext4 developers.
> 
> - Currently looking at methods of automating testing of each new git tree 
> release on different architectures and benchmarks.
> 
> - Slow code review is also slowing down ext4.
> 
> - Ted suggested maintaining a git tree that tracks the patch queue, so there 
> can be multiple people working on the patch queue. 
>   - When patches are stable, update the central git tree that can then be 
> pushed upstream.
> 
> - Ted will start a second git tree, and initially put Shaggy and Mingming as 
> additional users who can access the tree. 

Hi,
What's the purpose of this second git tree, please?

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
-
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: data=journal busted

2007-02-16 Thread Randy Dunlap
On Thu, 15 Feb 2007 20:44:45 -0800 Andrew Morton wrote:

> 
> I have a report from a google person who just did some basic
> power-it-off-during-a-write testing on 2.6.20's ext3.  ordered-data is OK,
> but data=journal came back with crap in the file data.
> 
> Is anyone doing any formal recovery stress-testing?
> 
> I suspect we should resurrect and formalise my old
> make-the-disk-stop-accepting-writes-when-a-timer-goes-off thing.  It was
> very useful for stress-testing recovery.

Where is your make-troubles patch, please sir?

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
-
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: ext3 data=journal hangs

2007-01-10 Thread Randy Dunlap
On Tue, 9 Jan 2007 15:11:23 -0800 Randy Dunlap wrote:

> Hi,
> 
> (2.6.20-rc4, x86_64 1-proc on SMP kernel, 1 GB RAM)
> 
> I'm running fsx-linux (akpm ext3-tools version) on an ext3 fs
> with data=journal and fs blocksize=2048.  I've been trying to
> get some kind of kernel messages from it but I can't get any
> debug IO done successfully.
> 
> It has hung on me 3 times in a row today.  I'm using this command:
> fsx-linux -l 100M -N 5 -S 0 fsxtestfile
> 
> This is run in a new partition on a IDE drive (/dev/hda7,
> using legacy IDE drivers).
> 
> Any suggestions for debug output?  I can see SysRq output on-screen
> (sometimes) but it doesn't make it to my serial console.
> 
> Any patches to test?  :)

More notes:
Fails (hangs) with fs blocksize of 1024, 2048, or 4096.
On data=journal mode hangs.  writeback and ordered run fine.

After several runs (hangs), I was able to get some sysrq output
to the serial console.

kernel config:  http://oss.oracle.com/~rdunlap/configs/config-2620-rc4-hangs
message log:http://oss.oracle.com/~rdunlap/logs/fsx-capture.txt

Can anyone see what fsx-linux is waiting on there?

Thanks,
---
~Randy
-
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 data=journal hangs

2007-01-09 Thread Randy Dunlap
Hi,

(2.6.20-rc4, x86_64 1-proc on SMP kernel, 1 GB RAM)

I'm running fsx-linux (akpm ext3-tools version) on an ext3 fs
with data=journal and fs blocksize=2048.  I've been trying to
get some kind of kernel messages from it but I can't get any
debug IO done successfully.

It has hung on me 3 times in a row today.  I'm using this command:
fsx-linux -l 100M -N 5 -S 0 fsxtestfile

This is run in a new partition on a IDE drive (/dev/hda7,
using legacy IDE drivers).

Any suggestions for debug output?  I can see SysRq output on-screen
(sometimes) but it doesn't make it to my serial console.

Any patches to test?  :)

Thanks,
---
~Randy
-
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] ext2: skip pages past number of blocks in ext2_find_entry

2006-12-21 Thread Randy Dunlap
On Thu, 21 Dec 2006 13:11:01 -0600 Eric Sandeen wrote:

> Randy Dunlap wrote:
> 
> > Please don't hide the goto; un-indent 1 tab stop.
> Whoops, thanks Randy - it wasn't intentional. :)

Yeah, I didn't think it was.  Sorry if it sounded like that.

---
~Randy
-
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] ext2: skip pages past number of blocks in ext2_find_entry

2006-12-21 Thread Randy Dunlap
On Thu, 21 Dec 2006 12:58:28 -0600 Eric Sandeen wrote:

> This one was pointed out on the MOKB site:
> http://kernelfun.blogspot.com/2006/11/mokb-09-11-2006-linux-26x-ext2checkpage.html
> 
> If a directory's i_size is corrupted, ext2_find_entry() will keep processing
> pages until the i_size is reached, even if there are no more blocks associated
> with the directory inode.  This patch puts in some minimal sanity-checking
> so that we don't keep checking pages (and issuing errors) if we know there
> can be no more data to read, based on the block count of the directory inode.
> 
> This is somewhat similar in approach to the ext3 patch I sent earlier this
> year.
> 
> Thanks,
> 
> -Eric
> 
> Signed-off-by: Eric Sandeen <[EMAIL PROTECTED]>
> 
> Index: linux-2.6.19/fs/ext2/dir.c
> ===
> --- linux-2.6.19.orig/fs/ext2/dir.c
> +++ linux-2.6.19/fs/ext2/dir.c
> @@ -368,6 +368,14 @@ struct ext2_dir_entry_2 * ext2_find_entr
>   }
>   if (++n >= npages)
>   n = 0;
> + /* next page is past the blocks we've got */
> + if (unlikely(n > (dir->i_blocks >> (PAGE_CACHE_SHIFT - 9 {
> + ext2_error(dir->i_sb, __FUNCTION__,
> + "dir %lu size %lld exceeds block count %llu",
> + dir->i_ino, dir->i_size,
> + (unsigned long long)dir->i_blocks);
> + goto out;

Please don't hide the goto; un-indent 1 tab stop.

> + }
>   } while (n != start);
>  out:
>   return NULL;


---
~Randy
-
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


[PATCH] ext4 calls journal_stop

2006-12-07 Thread Randy Dunlap
From: Randy Dunlap <[EMAIL PROTECTED]>

journal_stop() is not defined for ext4; change to ext4_journal_stop().

Signed-off-by: Randy Dunlap <[EMAIL PROTECTED]>
---
 fs/ext4/inode.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-2.6.19-git11.orig/fs/ext4/inode.c
+++ linux-2.6.19-git11/fs/ext4/inode.c
@@ -1232,7 +1232,7 @@ retry:
from, to, NULL, do_journal_get_write_access);
if (ret)
/* fatal error, just put the handle and return */
-   journal_stop(handle);
+   ext4_journal_stop(handle);
}
return ret;
 


---
-
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


[PATCH] ext4: fix printk format warnings

2006-10-22 Thread Randy Dunlap
From: Randy Dunlap <[EMAIL PROTECTED]>

Fix ext4 printk format warnings:
fs/ext4/resize.c:72: warning: long long unsigned int format, __u64 arg (arg 4)
fs/ext4/resize.c:76: warning: long long unsigned int format, __u64 arg (arg 4)
fs/ext4/resize.c:81: warning: long long unsigned int format, __u64 arg (arg 4)
fs/ext4/resize.c:85: warning: long long unsigned int format, __u64 arg (arg 4)
fs/ext4/resize.c:89: warning: long long unsigned int format, __u64 arg (arg 4)
fs/ext4/resize.c:89: warning: long long unsigned int format, __u64 arg (arg 5)
fs/ext4/resize.c:93: warning: long long unsigned int format, __u64 arg (arg 4)
fs/ext4/resize.c:93: warning: long long unsigned int format, __u64 arg (arg 5)
fs/ext4/resize.c:98: warning: long long unsigned int format, __u64 arg (arg 4)
fs/ext4/resize.c:103: warning: long long unsigned int format, __u64 arg (arg 4)
fs/ext4/resize.c:109: warning: long long unsigned int format, __u64 arg (arg 4)

Signed-off-by: Randy Dunlap <[EMAIL PROTECTED]>
---

 fs/ext4/resize.c |   23 ++-
 1 files changed, 14 insertions(+), 9 deletions(-)

diff -Naurp linux-2619-rc2g4/fs/ext4/resize.c~ext4_printk 
linux-2619-rc2g4/fs/ext4/resize.c
--- linux-2619-rc2g4/fs/ext4/resize.c~ext4_printk   2006-10-20 
17:38:30.834843000 -0700
+++ linux-2619-rc2g4/fs/ext4/resize.c   2006-10-22 20:17:37.490397000 -0700
@@ -69,44 +69,49 @@ static int verify_group_input(struct sup
else if (outside(input->block_bitmap, start, end))
ext4_warning(sb, __FUNCTION__,
 "Block bitmap not in group (block %llu)",
-input->block_bitmap);
+(unsigned long long)input->block_bitmap);
else if (outside(input->inode_bitmap, start, end))
ext4_warning(sb, __FUNCTION__,
 "Inode bitmap not in group (block %llu)",
-input->inode_bitmap);
+(unsigned long long)input->inode_bitmap);
else if (outside(input->inode_table, start, end) ||
 outside(itend - 1, start, end))
ext4_warning(sb, __FUNCTION__,
 "Inode table not in group (blocks %llu-%llu)",
-input->inode_table, itend - 1);
+(unsigned long long)input->inode_table, itend - 1);
else if (input->inode_bitmap == input->block_bitmap)
ext4_warning(sb, __FUNCTION__,
 "Block bitmap same as inode bitmap (%llu)",
-input->block_bitmap);
+(unsigned long long)input->block_bitmap);
else if (inside(input->block_bitmap, input->inode_table, itend))
ext4_warning(sb, __FUNCTION__,
 "Block bitmap (%llu) in inode table (%llu-%llu)",
-input->block_bitmap, input->inode_table, itend-1);
+(unsigned long long)input->block_bitmap,
+(unsigned long long)input->inode_table, itend - 1);
else if (inside(input->inode_bitmap, input->inode_table, itend))
ext4_warning(sb, __FUNCTION__,
 "Inode bitmap (%llu) in inode table (%llu-%llu)",
-input->inode_bitmap, input->inode_table, itend-1);
+(unsigned long long)input->inode_bitmap,
+(unsigned long long)input->inode_table, itend - 1);
else if (inside(input->block_bitmap, start, metaend))
ext4_warning(sb, __FUNCTION__,
 "Block bitmap (%llu) in GDT table"
 " (%llu-%llu)",
-input->block_bitmap, start, metaend - 1);
+(unsigned long long)input->block_bitmap,
+start, metaend - 1);
else if (inside(input->inode_bitmap, start, metaend))
ext4_warning(sb, __FUNCTION__,
 "Inode bitmap (%llu) in GDT table"
 " (%llu-%llu)",
-input->inode_bitmap, start, metaend - 1);
+(unsigned long long)input->inode_bitmap,
+start, metaend - 1);
else if (inside(input->inode_table, start, metaend) ||
 inside(itend - 1, start, metaend))
ext4_warning(sb, __FUNCTION__,
 "Inode table (%llu-%llu) overlaps"
 "GDT table (%llu-%llu)",
-input->inode_table, itend - 1, start, metaend - 1);
+   

Re: Updated ext4/jbd2 patches based on 2.6.19-rc1

2006-10-05 Thread Randy Dunlap
On Thu, 5 Oct 2006 20:55:26 -0700 Andrew Morton wrote:

> On Thu, 05 Oct 2006 13:23:30 -0500
> Dave Kleikamp <[EMAIL PROTECTED]> wrote:
> 
> > I have rebuilt the ext4/jbd2 patches against linux-2.6.19-rc1.  The
> > patch set is located at
> > ftp://kernel.org/pub/linux/kernel/people/shaggy/ext4/2.6.19-rc1/ext4-patches-2.6.19-rc1.tar.gz
> > 
> 
> So let me see if I have this right.
> 
> You grab Alexandre's kit from http://www.bullopensource.org/ext4/20060926/
> and a plain old `mke2fs -j' gives a filesystem which will mount as ext3 or
> ext4.
> 
> If you then mount this filesystem with `-t ext4dev -o extents', it becomes
> incompatible with the ext3 driver.  Yes?

I thought we s/ext4dev/ext4/ ??

> What else aren't we being told? ;)

---
~Randy
-
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: + ext4-enable.patch added to -mm tree

2006-10-05 Thread Randy Dunlap
On Thu, 05 Oct 2006 17:36:11 -0700 [EMAIL PROTECTED] wrote:

> Subject: ext4: enable building of ext4
> From: Mingming Cao<[EMAIL PROTECTED]>
> 
> Originally part of a patch from Mingming Cao and Randy Dunlap.  Reorganized
> by Shaggy.
> ---
> 
>  fs/Kconfig|   75 +---
>  fs/Makefile   |1 
>  include/linux/magic.h |1 
>  3 files changed, 73 insertions(+), 4 deletions(-)
> 
> diff -puN fs/Kconfig~ext4-enable fs/Kconfig
> --- a/fs/Kconfig~ext4-enable
> +++ a/fs/Kconfig
> @@ -140,6 +140,73 @@ config EXT3_FS_SECURITY
> If you are not using a security module that requires using
> extended attributes for file security labels, say N.
>  
> +config EXT4DEV_FS
> + tristate "Ext4dev/ext4 extended fs support development (EXPERIMENTAL)"
> + depends on EXPERIMENTAL
> +select JBD
> +help

ugh, I'm getting seasick from looking at that indentation.
I don't have an ext4 patchset ATM, but I'll fix that if no one
else does.

> +   Ext4dev is a predecessor filesystem of the next generation
> +   extended fs ext4, based on ext3 filesystem code. It will be
> +   renamed ext4 fs later, once ext4dev is mature and stabilized.
> +
> +  Unlike the change from ext2 filesystem to ext3 filesystem,
> +  the on-disk format of ext4dev is not the same as ext3 any more:
> +   it is based on extent maps and it supports 48-bit physical block
> +  numbers. These combined on-disk format changes will allow
> +   ext4dev/ext4 to handle more than 16 TB filesystem volumes --
> +   a hard limit that ext3 cannot overcome without changing the
> +  on-disk format.
> +
> +   Other than extent maps and 48-bit block numbers, ext4dev also is
> +  likely to have other new features such as persistent preallocation,
> +   high resolution time stamps, and larger file support etc.  These
> +  features will be added to ext4dev gradually.
> +
> +   To compile this file system support as a module, choose M here. The
> +   module will be called ext4dev.  Be aware, however, that the filesystem
> +   of your root partition (the one containing the directory /) cannot
> +   be compiled as a module, and so this could be dangerous.
> +
> +   If unsure, say N.

---
~Randy
-
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