Re: [EXT4 set 5][PATCH 1/1] expand inode i_extra_isize to support features in larger inode

2007-07-13 Thread Andreas Dilger
On Jul 13, 2007 02:05 -0700, Andrew Morton wrote: > On Tue, 10 Jul 2007 16:32:47 -0700 Andrew Morton <[EMAIL PROTECTED]> wrote: > > > > + brelse(bh); > > > + up_write(&EXT4_I(inode)->xattr_sem); > > > + return error; > > > +} > > > + > > > > We're doing GFP_KERNEL memory allocations while holdin

[PATCH] ext2 statfs improvement for block and inode free count

2007-07-13 Thread Badari Pulavarty
Andrew, Can you include it in -mm ? BTW, this patch is against mainline, won't apply cleanly to -mm, due to other statfs() improvements. Thanks, Badari More statfs() improvements for ext2. ext2 already maintains percpu counters for free blocks and inodes. Derive free block count and inode coun

Re: [EXT4 set 5][PATCH 1/1] expand inode i_extra_isize to support features in larger inode

2007-07-13 Thread Zach Brown
> I fear the consequences of this change :( I love it. In the past I've lost time by working with patches which didn't quite realize that ext3 holds a transaction open during ->direct_IO. > Oh well, please keep it alive, maybe beat on it a bit, resend it > later on? I can test the patch to make

Re: [EXT4 set 3][PATCH 1/1] ext4 nanosecond timestamp

2007-07-13 Thread Mingming Cao
On Fri, 2007-07-13 at 12:35 +0530, Kalpak Shah wrote: > On Fri, 2007-07-13 at 09:59 +0530, Aneesh Kumar K.V wrote: > > > > Kalpak Shah wrote: > > > On Tue, 2007-07-10 at 16:30 -0700, Andrew Morton wrote: > > >> On Sun, 01 Jul 2007 03:36:56 -0400 > > >> Mingming Cao <[EMAIL PROTECTED]> wrote: > > >

Re: [EXT4 set 5][PATCH 1/1] expand inode i_extra_isize to support features in larger inode

2007-07-13 Thread Andrew Morton
On Fri, 13 Jul 2007 15:33:41 +0200 Peter Zijlstra <[EMAIL PROTECTED]> wrote: > On Fri, 2007-07-13 at 02:05 -0700, Andrew Morton wrote: > > > Except lockdep doesn't know about journal_start(), which has ranking > > requirements similar to a semaphore. > > Something like so? Looks OK. > Or can

[PATCH 5/5][TAKE8] ext4: change for better extent-to-group alignment

2007-07-13 Thread Amit K. Arora
From: Amit Arora <[EMAIL PROTECTED]> Change on-disk format for extent to represent uninitialized/initialized extents This change was suggested by Andreas Dilger. This patch changes the EXT_MAX_LEN value and extent code which marks/checks uninitialized extents. With this change it will be possibl

[PATCH 4/5][TAKE8] ext4: write support for preallocated blocks

2007-07-13 Thread Amit K. Arora
From: Amit Arora <[EMAIL PROTECTED]> write support for preallocated blocks This patch adds write support to the uninitialized extents that get created when a preallocation is done using fallocate(). It takes care of splitting the extents into multiple (upto three) extents and merging the new spl

[PATCH 3/5][TAKE8] ext4: fallocate support in ext4

2007-07-13 Thread Amit K. Arora
From: Amit Arora <[EMAIL PROTECTED]> fallocate support in ext4 This patch implements ->fallocate() inode operation in ext4. With this patch users of ext4 file systems will be able to use fallocate() system call for persistent preallocation. Current implementation only supports preallocation for r

[PATCH 2/5][TAKE8] fallocate() implementation in i386, x86_64 and powerpc

2007-07-13 Thread Amit K. Arora
From: Amit Arora <[EMAIL PROTECTED]> sys_fallocate() implementation on i386, x86_64 and powerpc fallocate() is a new system call being proposed here which will allow applications to preallocate space to any file(s) in a file system. Each file system implementation that wants to use this feature w

[PATCH 1/5][TAKE8] manpage for fallocate

2007-07-13 Thread Amit K. Arora
Following is the modified version of the manpage originally submitted by David Chinner. Please use `nroff -man fallocate.2 | less` to view. Following changed from TAKE7: * Removed FALLOC_ALLOCATE and FALLOCATE_RESV_SPACE modes. * Described only single flag for mode, i.e. FALLOC_FL_KEEP_SIZE. * s/z

[PATCH 0/5][TAKE8] fallocate system call

2007-07-13 Thread Amit K. Arora
This is the latest fallocate patchset and is based on 2.6.22. * Following are the changes from TAKE7: 1) Updated the man page. 2) Merged "revalidate write permissions" patch with the main falloc patch. 3) Added linux/falloc.h and moved FALLOC_FL_KEEP_SIZE flag to it. Also removed the two modes

Re: [EXT4 set 7][PATCH 1/1]Remove 32000 subdirs limit.

2007-07-13 Thread Andrew Morton
On Fri, 13 Jul 2007 16:00:48 +0530 Kalpak Shah <[EMAIL PROTECTED]> wrote: > > > > > > - if (inode->i_nlink >= EXT4_LINK_MAX) > > > + if (EXT4_DIR_LINK_MAX(inode)) > > > return -EMLINK; > > > > argh. WHY_IS_EXT4_FULL_OF_UPPER_CASE_MACROS_WHICH_COULD_BE_IMPLEMENTED > > as_lower_case_in

-ENOSPC return from xattr functions

2007-07-13 Thread Andreas Dilger
Hello Andreas, I noticed in ext3_xattr_block_set() that if i->value_len > sb->s_blocksize it returns -ENOSPC. However, in ext3_xattr_set_handle() it returns -ERANGE when the name length is > 255. It seems a bit misleading to return -ENOSPC when the filesystem isn't actually out of space. I think

Re: [EXT4 set 5][PATCH 1/1] expand inode i_extra_isize to support features in larger inode

2007-07-13 Thread Andreas Dilger
On Jul 13, 2007 15:33 +0200, Peter Zijlstra wrote: > On Fri, 2007-07-13 at 02:05 -0700, Andrew Morton wrote: > Or can journal_stop() be done by a different task than the one that did > journal_start()? - in which case nothing much can be done :-/ The call to journal_stop() has to be in the same p

Re: [PATCH 2/6][TAKE7] fallocate() implementation in i386, x86_64 and powerpc

2007-07-13 Thread Christoph Hellwig
On Fri, Jul 13, 2007 at 07:48:58PM +0530, Amit K. Arora wrote: > Ok. Since we have only one flag (FALLOC_FL_KEEP_SIZE) and we do not want > to declare the default mode (FALLOC_ALLOCATE), we can _just_ have this > flag and remove the other mode too (FALLOC_RESV_SPACE). > Is this what you are suggest

Re: [PATCH 3/6][TAKE7] revalidate write permissions for fallocate

2007-07-13 Thread Amit K. Arora
On Fri, Jul 13, 2007 at 02:21:37PM +0100, Christoph Hellwig wrote: > On Fri, Jul 13, 2007 at 06:18:47PM +0530, Amit K. Arora wrote: > > From: David P. Quigley <[EMAIL PROTECTED]> > > > > Revalidate the write permissions for fallocate(2), in case security policy > > has > > changed since the files

Re: [PATCH 1/6][TAKE7] manpage for fallocate

2007-07-13 Thread Amit K. Arora
On Sat, Jul 14, 2007 at 12:06:51AM +1000, David Chinner wrote: > On Fri, Jul 13, 2007 at 06:16:01PM +0530, Amit K. Arora wrote: > > Following is the modified version of the manpage originally submitted by > > David Chinner. Please use `nroff -man fallocate.2 | less` to view. > > > > This includes

Re: [PATCH 2/6][TAKE7] fallocate() implementation in i386, x86_64 and powerpc

2007-07-13 Thread Amit K. Arora
On Fri, Jul 13, 2007 at 02:21:19PM +0100, Christoph Hellwig wrote: > On Fri, Jul 13, 2007 at 06:17:55PM +0530, Amit K. Arora wrote: > > /* > > + * sys_fallocate - preallocate blocks or free preallocated blocks > > + * @fd: the file descriptor > > + * @mode: mode specifies the behavior of allocatio

Re: [PATCH 1/6][TAKE7] manpage for fallocate

2007-07-13 Thread David Chinner
On Fri, Jul 13, 2007 at 06:16:01PM +0530, Amit K. Arora wrote: > Following is the modified version of the manpage originally submitted by > David Chinner. Please use `nroff -man fallocate.2 | less` to view. > > This includes changes suggested by Heikki Orsila and Barry Naujok. Can we get itemised

Re: [EXT4 set 5][PATCH 1/1] expand inode i_extra_isize to support features in larger inode

2007-07-13 Thread Peter Zijlstra
On Fri, 2007-07-13 at 02:05 -0700, Andrew Morton wrote: > Except lockdep doesn't know about journal_start(), which has ranking > requirements similar to a semaphore. Something like so? Or can journal_stop() be done by a different task than the one that did journal_start()? - in which case noth

Re: [PATCH 3/6][TAKE7] revalidate write permissions for fallocate

2007-07-13 Thread Christoph Hellwig
On Fri, Jul 13, 2007 at 06:18:47PM +0530, Amit K. Arora wrote: > From: David P. Quigley <[EMAIL PROTECTED]> > > Revalidate the write permissions for fallocate(2), in case security policy has > changed since the files were opened. > > Acked-by: James Morris <[EMAIL PROTECTED]> > Signed-off-by: Dav

Re: [PATCH 2/6][TAKE7] fallocate() implementation in i386, x86_64 and powerpc

2007-07-13 Thread Christoph Hellwig
On Fri, Jul 13, 2007 at 06:17:55PM +0530, Amit K. Arora wrote: > /* > + * sys_fallocate - preallocate blocks or free preallocated blocks > + * @fd: the file descriptor > + * @mode: mode specifies the behavior of allocation. > + * @offset: The offset within file, from where allocation is being > +

[PATCH 6/6][TAKE7] ext4: change for better extent-to-group alignment

2007-07-13 Thread Amit K. Arora
From: Amit Arora <[EMAIL PROTECTED]> Change on-disk format for extent to represent uninitialized/initialized extents This change was suggested by Andreas Dilger. This patch changes the EXT_MAX_LEN value and extent code which marks/checks uninitialized extents. With this change it will be possibl

[PATCH 5/6][TAKE7] ext4: write support for preallocated blocks

2007-07-13 Thread Amit K. Arora
From: Amit Arora <[EMAIL PROTECTED]> write support for preallocated blocks This patch adds write support to the uninitialized extents that get created when a preallocation is done using fallocate(). It takes care of splitting the extents into multiple (upto three) extents and merging the new spl

[PATCH 4/6][TAKE7] ext4: fallocate support in ext4

2007-07-13 Thread Amit K. Arora
From: Amit Arora <[EMAIL PROTECTED]> fallocate support in ext4 This patch implements ->fallocate() inode operation in ext4. With this patch users of ext4 file systems will be able to use fallocate() system call for persistent preallocation. Current implementation only supports preallocation for r

[PATCH 3/6][TAKE7] revalidate write permissions for fallocate

2007-07-13 Thread Amit K. Arora
From: David P. Quigley <[EMAIL PROTECTED]> Revalidate the write permissions for fallocate(2), in case security policy has changed since the files were opened. Acked-by: James Morris <[EMAIL PROTECTED]> Signed-off-by: David P. Quigley <[EMAIL PROTECTED]> --- fs/open.c |3 +++ 1 files changed

[PATCH 2/6][TAKE7] fallocate() implementation in i386, x86_64 and powerpc

2007-07-13 Thread Amit K. Arora
From: Amit Arora <[EMAIL PROTECTED]> sys_fallocate() implementation on i386, x86_64 and powerpc fallocate() is a new system call being proposed here which will allow applications to preallocate space to any file(s) in a file system. Each file system implementation that wants to use this feature w

[PATCH 1/6][TAKE7] manpage for fallocate

2007-07-13 Thread Amit K. Arora
Following is the modified version of the manpage originally submitted by David Chinner. Please use `nroff -man fallocate.2 | less` to view. This includes changes suggested by Heikki Orsila and Barry Naujok. .TH fallocate 2 .SH NAME fallocate \- allocate or remove file space .SH SYNOPSIS .nf .B #

[PATCH 0/6][TAKE7] fallocate system call

2007-07-13 Thread Amit K. Arora
This is the latest fallocate patchset and is based on 2.6.22. * Following are the changes from TAKE6: 1) We now just have two modes (and no deallocation modes). 2) Updated the man page 3) Added a new patch submitted by David P. Quigley (Patch 3/6). 4) Used EXT_INIT_MAX_LEN instead of 0x8000 in Pa

Re: [EXT4 set 7][PATCH 1/1]Remove 32000 subdirs limit.

2007-07-13 Thread Pekka Enberg
On 7/13/07, Kalpak Shah <[EMAIL PROTECTED]> wrote: > EXT4_DIR_LINK_MAX() is buggy: it evaluates its arg twice. #define EXT4_DIR_LINK_MAX(dir) (!is_dx(dir) && (dir)->i_nlink >= EXT4_LINK_MAX) [snip] Sorry, I didn't understand what is the problem with this macro? The expression represented b

Re: [EXT4 set 7][PATCH 1/1]Remove 32000 subdirs limit.

2007-07-13 Thread Kalpak Shah
The updated patch is attached. comments inline... On Tue, 2007-07-10 at 22:40 -0700, Andrew Morton wrote: > > If we exceed 65000 subdirectories in an htree directory it sets the > > inode link count to 1 and no longer counts subdirectories. The > > directory link count is not actually used when d

Re: [EXT4 set 5][PATCH 1/1] expand inode i_extra_isize to support features in larger inode

2007-07-13 Thread Andrew Morton
On Tue, 10 Jul 2007 16:32:47 -0700 Andrew Morton <[EMAIL PROTECTED]> wrote: > > + brelse(bh); > > + up_write(&EXT4_I(inode)->xattr_sem); > > + return error; > > +} > > + > > We're doing GFP_KERNEL memory allocations while holding xattr_sem. This > can cause the VM to reenter the filesystem

Re: Random corruption test for e2fsck

2007-07-13 Thread Kalpak Shah
On Fri, 2007-07-13 at 00:24 +0200, Andi Kleen wrote: > On Thu, Jul 12, 2007 at 04:16:24PM -0600, Andreas Dilger wrote: > > On Jul 12, 2007 13:09 +0200, Andi Kleen wrote: > > > > "dd if=/dev/urandom bs=1k ..." than to spin in a loop getting 16-bit > > > > random numbers from bash. We would also be

Re: [EXT4 set 3][PATCH 1/1] ext4 nanosecond timestamp

2007-07-13 Thread Kalpak Shah
On Fri, 2007-07-13 at 09:59 +0530, Aneesh Kumar K.V wrote: > > Kalpak Shah wrote: > > On Tue, 2007-07-10 at 16:30 -0700, Andrew Morton wrote: > >> On Sun, 01 Jul 2007 03:36:56 -0400 > >> Mingming Cao <[EMAIL PROTECTED]> wrote: > >> > >>> This patch is a spinoff of the old nanosecond patches. > >>