Re: [PATCH 4/5] ext4: fallocate support in ext4

2007-05-08 Thread Amit K. Arora
On Mon, May 07, 2007 at 10:24:37AM -0500, Dave Kleikamp wrote: On Mon, 2007-05-07 at 17:37 +0530, Amit K. Arora wrote: On Thu, May 03, 2007 at 09:31:33PM -0700, Andrew Morton wrote: On Thu, 26 Apr 2007 23:43:32 +0530 Amit K. Arora [EMAIL PROTECTED] wrote: +int ext4_fallocate(struct

Re: [PATCH 4/5] ext4: fallocate support in ext4

2007-05-08 Thread Dave Kleikamp
On Tue, 2007-05-08 at 16:22 +0530, Amit K. Arora wrote: On Mon, May 07, 2007 at 10:24:37AM -0500, Dave Kleikamp wrote: On Mon, 2007-05-07 at 17:37 +0530, Amit K. Arora wrote: On Thu, May 03, 2007 at 09:31:33PM -0700, Andrew Morton wrote: So we don't implement fallocate on bitmap-based

Re: [PATCH 4/5] ext4: fallocate support in ext4

2007-05-08 Thread Mingming Cao
On Mon, 2007-05-07 at 21:43 -0400, Theodore Tso wrote: On Mon, May 07, 2007 at 05:41:39PM -0700, Mingming Cao wrote: We could check the total number of fs free blocks account before preallocation happens, if there isn't enough space left, there is no need to bother preallocating.

Re: [PATCH 4/5] ext4: fallocate support in ext4

2007-05-07 Thread Amit K. Arora
On Thu, May 03, 2007 at 09:31:33PM -0700, Andrew Morton wrote: On Thu, 26 Apr 2007 23:43:32 +0530 Amit K. Arora [EMAIL PROTECTED] wrote: This patch has the ext4 implemtation of fallocate system call. ... + /* ext4_can_extents_be_merged should have checked that either +

Re: [PATCH 4/5] ext4: fallocate support in ext4

2007-05-07 Thread Dave Kleikamp
On Mon, 2007-05-07 at 17:37 +0530, Amit K. Arora wrote: On Thu, May 03, 2007 at 09:31:33PM -0700, Andrew Morton wrote: On Thu, 26 Apr 2007 23:43:32 +0530 Amit K. Arora [EMAIL PROTECTED] wrote: +int ext4_fallocate(struct inode *inode, int mode, loff_t offset, loff_t len) +{ +

Re: [PATCH 4/5] ext4: fallocate support in ext4

2007-05-07 Thread Andreas Dilger
On May 03, 2007 21:31 -0700, Andrew Morton wrote: On Thu, 26 Apr 2007 23:43:32 +0530 Amit K. Arora [EMAIL PROTECTED] wrote: + * ext4_fallocate: + * preallocate space for a file + * mode is for future use, e.g. for unallocating preallocated blocks etc. + */ This description is rather

Re: [PATCH 4/5] ext4: fallocate support in ext4

2007-05-07 Thread Andrew Morton
On Mon, 7 May 2007 05:37:54 -0600 Andreas Dilger [EMAIL PROTECTED] wrote: + block = offset blkbits; + max_blocks = (EXT4_BLOCK_ALIGN(len + offset, blkbits) blkbits) + - block; + mutex_lock(EXT4_I(inode)-truncate_mutex); + credits =

Re: [PATCH 4/5] ext4: fallocate support in ext4

2007-05-07 Thread Andrew Morton
On Mon, 7 May 2007 15:21:04 -0700 Andreas Dilger [EMAIL PROTECTED] wrote: On May 07, 2007 13:58 -0700, Andrew Morton wrote: Final point: it's fairly disappointing that the present implementation is ext4-only, and extent-only. I do think we should be aiming at an ext4 bitmap-based

Re: [PATCH 4/5] ext4: fallocate support in ext4

2007-05-07 Thread Theodore Tso
On Mon, May 07, 2007 at 03:38:56PM -0700, Andrew Morton wrote: Actually, this is a non-issue. The reason that it is handled for extent-only is that this is the only way to allocate space in the filesystem without doing the explicit zeroing. For other filesystems (including ext3 and

Re: [PATCH 4/5] ext4: fallocate support in ext4

2007-05-07 Thread Theodore Tso
On Mon, May 07, 2007 at 07:02:32PM -0400, Jeff Garzik wrote: Andreas Dilger wrote: On May 07, 2007 13:58 -0700, Andrew Morton wrote: Final point: it's fairly disappointing that the present implementation is ext4-only, and extent-only. I do think we should be aiming at an ext4 bitmap-based

Re: [PATCH 4/5] ext4: fallocate support in ext4

2007-05-07 Thread Mingming Cao
On Mon, 2007-05-07 at 13:58 -0700, Andrew Morton wrote: On Mon, 7 May 2007 05:37:54 -0600 Andreas Dilger [EMAIL PROTECTED] wrote: + block = offset blkbits; + max_blocks = (EXT4_BLOCK_ALIGN(len + offset, blkbits) blkbits) +- block; +

Re: [PATCH 4/5] ext4: fallocate support in ext4

2007-05-07 Thread Andrew Morton
On Mon, 07 May 2007 17:00:24 -0700 Mingming Cao [EMAIL PROTECTED] wrote: + while (ret = 0 ret max_blocks) { + block = block + ret; + max_blocks = max_blocks - ret; + ret = ext4_ext_get_blocks(handle, inode, block, +

Re: [PATCH 4/5] ext4: fallocate support in ext4

2007-05-07 Thread Mingming Cao
On Mon, 2007-05-07 at 16:31 -0700, Andrew Morton wrote: On Mon, 7 May 2007 19:14:42 -0400 Theodore Tso [EMAIL PROTECTED] wrote: On Mon, May 07, 2007 at 03:38:56PM -0700, Andrew Morton wrote: Actually, this is a non-issue. The reason that it is handled for extent-only is that

Re: [PATCH 4/5] ext4: fallocate support in ext4

2007-05-07 Thread Mingming Cao
On Mon, 2007-05-07 at 17:15 -0700, Andrew Morton wrote: On Mon, 07 May 2007 17:00:24 -0700 Mingming Cao [EMAIL PROTECTED] wrote: + while (ret = 0 ret max_blocks) { + block = block + ret; + max_blocks = max_blocks - ret; + ret =

Re: [PATCH 4/5] ext4: fallocate support in ext4

2007-05-07 Thread Andreas Dilger
On May 07, 2007 19:02 -0400, Jeff Garzik wrote: Andreas Dilger wrote: Actually, this is a non-issue. The reason that it is handled for extent-only is that this is the only way to allocate space in the filesystem without doing the explicit zeroing. Precisely /how/ do you avoid the zeroing

[PATCH 4/5] ext4: fallocate support in ext4

2007-04-26 Thread Amit K. Arora
This patch has the ext4 implemtation of fallocate system call. Signed-off-by: Amit Arora [EMAIL PROTECTED] --- fs/ext4/extents.c | 201 +++- fs/ext4/file.c |1 include/linux/ext4_fs.h |7 +