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

2007-04-26 Thread Amit K. Arora
This patch adds write support for preallocated (using fallocate system call) blocks/extents. The preallocated extents in ext4 are marked "uninitialized", hence they need special handling especially while writing to them. This patch takes care of that. Signed-off-by: Amit Arora <[EMAIL PROTECTED]>

[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 + include/linux/ext4_f

[PATCH 3/5] ext4: Extent overlap bugfix

2007-04-26 Thread Amit K. Arora
This is a fix for an extent-overlap bug. The fallocate() implementation on ext4 depends on this bugfix. Though this fix had been posted earlier, but because it is still not part of mainline code, I have attached it here too. Signed-off-by: Amit Arora <[EMAIL PROTECTED]> --- fs/ext4/extents.c

[PATCH 2/5] fallocate() on s390

2007-04-26 Thread Amit K. Arora
This patch implements support of fallocate system call on s390(x) platform. A wrapper is added to address the issue which s390 ABI has with "preferred" ordering of arguments in this system call (i.e. int, int, loff_t, loff_t). I will request s390 experts to please review this code and verify if th

[PATCH 1/5] fallocate() implementation in i86, x86_64 and powerpc

2007-04-26 Thread Amit K. Arora
This patch implements the fallocate() system call and adds support for i386, x86_64 and powerpc. NOTE: It is based on 2.6.21 kernel version. Signed-off-by: Amit Arora <[EMAIL PROTECTED]> --- arch/i386/kernel/syscall_table.S |1 arch/powerpc/kernel/sys_ppc32.c |7 ++ arch/x86_64/ker

[PATCH 0/5] fallocate system call

2007-04-26 Thread Amit K. Arora
Based on the discussion, this new patchset uses following as the interface for fallocate() system call: asmlinkage long sys_fallocate(int fd, int mode, loff_t offset, loff_t len) It seems that only s390 architecture has a problem with such a layout of arguments in fallocate(). Thus for s390, we

[RFC][PATCH 2/4] Move the file data to the new blocks

2007-04-26 Thread Takashi Sato
Move the blocks on the temporary inode to the original inode by a page. 1. Read the file data from the old blocks to the page 2. Move the block on the temporary inode to the original inode 3. Write the file data on the page into the new blocks Signed-off-by: Takashi Sato <[EMAIL PROTECTED]> --- di

[RFC][PATCH 1/4] Allocate new contiguous blocks

2007-04-26 Thread Takashi Sato
Search contiguous free blocks with Alex's mutil-block allocation and allocate them for the temporary inode. This patch applies on top of Alex's patches. "[RFC] delayed allocation, mballoc, etc" http://marc.theaimsgroup.com/?l=linux-ext4&m=116493228301966&w=2 Signed-off-by: Takashi Sato <[EMAIL PR

ext4 online defrag (ver 0.4)

2007-04-26 Thread Takashi Sato
Hi all, I have made following changes to the previous online defrag patchset to improve it. Note that there is no functional change. 1. Change the handling of temporary inode. Now ext4_ext_defrag() calls ext4_new_inode()/iput() pair instead of new_inode()/delete_ext_defrag_inode(). Because

[RFC][PATCH 4/4] ext4_locality_group bug fix

2007-04-26 Thread Takashi Sato
Move lg_list to s_locality_dirty and mark lg as dirty if nr_to_write(total page count which has not written in disk yet) is 0 or less and lg_io is not empty in ext4_lg_sync_single_group(). This makes sure that inode is written to disk. Signed-off-by: Takashi Sato <[EMAIL PROTECTED]> --- diff -Nru

[RFC][PATCH 3/4] Online defrag command

2007-04-26 Thread Takashi Sato
The defrag command. Usage is as follows: o Put the multiple files closer together. # e4defrag -r directory-name o Defrag for a single file. # e4defrag file-name o Defrag for all files on ext4. # e4defrag device-name Signed-off-by: Takashi Sato <[EMAIL PROTECTED]> --- /* * e4defrag, ext4 fi