1. 18 Jul, 2007 12 commits
    • Kalpak Shah's avatar
      ext4: Add nanosecond timestamps · ef7f3835
      Kalpak Shah authored
      This patch adds nanosecond timestamps for ext4. This involves adding
      *time_extra fields to the ext4_inode to extend the timestamps to
      64-bits.  Creation time is also added by this patch.
      
      These extended fields will fit into an inode if the filesystem was
      formatted with large inodes (-I 256 or larger) and there are currently
      no EAs consuming all of the available space. For new inodes we always
      reserve enough space for the kernel's known extended fields, but for
      inodes created with an old kernel this might not have been the case. So
      this patch also adds the EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE feature
      flag(ro-compat so that older kernels can't create inodes with a smaller
      extra_isize). which indicates if the fields fitting inside
      s_min_extra_isize are available or not.  If the expansion of inodes if
      unsuccessful then this feature will be disabled.  This feature is only
      enabled if requested by the sysadmin.
      
      None of the extended inode fields is critical for correct filesystem
      operation.
      Signed-off-by: default avatarAndreas Dilger <adilger@clusterfs.com>
      Signed-off-by: default avatarKalpak Shah <kalpak@clusterfs.com>
      Signed-off-by: default avatarEric Sandeen <sandeen@redhat.com>
      Signed-off-by: default avatarDave Kleikamp <shaggy@linux.vnet.ibm.com>
      Signed-off-by: default avatarMingming Cao <cmm@us.ibm.com>
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      ef7f3835
    • Jose R. Santos's avatar
      jbd2: Move jbd2-debug file to debugfs · 0f49d5d0
      Jose R. Santos authored
      The jbd2-debug file used to be located in /proc/sys/fs/jbd2-debug, but it
      incorrectly used create_proc_entry() instead of the sysctl routines, and
      no proc entry was ever created.
      
      Instead of fixing this we might as well move the jbd2-debug file to
      debugfs which would be the preferred location for this kind of tunable.
      The new location is now /sys/kernel/debug/jbd2/jbd2-debug.
      Signed-off-by: default avatarJose R. Santos <jrs@us.ibm.com>
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      0f49d5d0
    • Jose R. Santos's avatar
      jbd2: Fix CONFIG_JBD_DEBUG ifdef to be CONFIG_JBD2_DEBUG · e23291b9
      Jose R. Santos authored
      When the JBD code was forked to create the new JBD2 code base, the
      references to CONFIG_JBD_DEBUG where never changed to
      CONFIG_JBD2_DEBUG.  This patch fixes that.
      Signed-off-by: default avatarJose R. Santos <jrs@us.ibm.com>
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      e23291b9
    • Jose R. Santos's avatar
      ext4: Set the journal JBD2_FEATURE_INCOMPAT_64BIT on large devices · eb40a09c
      Jose R. Santos authored
      Set the journals JBD2_FEATURE_INCOMPAT_64BIT on devices with more
      than 32bit block sizes during mount time.  This ensure proper record
      lenth when writing to the journal.
      Signed-off-by: default avatarJose R. Santos <jrs@us.ibm.com>
      Signed-off-by: default avatarAndreas Dilger <adilger@clusterfs.com>
      Signed-off-by: default avatarMingming Cao <cmm@us.ibm.com>
      Signed-off-by: default avatarLaurent Vivier <Laurent.Vivier@bull.net>
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      eb40a09c
    • Alex Tomas's avatar
      ext4: Make extents code sanely handle on-disk corruption · c29c0ae7
      Alex Tomas authored
      Add more run-time checking of extent header fields and remove BUG_ON
      checks so we don't panic the kernel just because the on-disk filesystem
      is corrupted.
      Signed-off-by: default avatarAlex Tomas <alex@clusterfs.com>
      Signed-off-by: default avatarMingming Cao <cmm@us.ibm.com>
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      c29c0ae7
    • Jan Kara's avatar
      ext4: copy i_flags to inode flags on write · ff9ddf7e
      Jan Kara authored
          
      Propagate flags such as S_APPEND, S_IMMUTABLE, etc. from i_flags into
      ext4-specific i_flags.  Quota code changes these flags on quota files
      (to make it harder for sysadmin to screw himself) and these changes were
      not correctly propagated into the filesystem.
      
      (This is a forward port patch from ext3)
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      Signed-off-by: default avatarMingming Cao <cmm@us.ibm.com>
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      ff9ddf7e
    • Mingming Cao's avatar
      ext4: Enable extents by default · 1e2462f9
      Mingming Cao authored
      Turn on extents feature by default in ext4 filesystem, to get wider
      testing of extents feature in ext4dev.  This can be disabled using 
      -o noextents.  
      Signed-off-by: default avatarMingming Cao <cmm@us.ibm.com>
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      1e2462f9
    • Amit Arora's avatar
      Change on-disk format to support 2^15 uninitialized extents · 749269fa
      Amit Arora authored
      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 possible to have
      initialized extents with 2^15 blocks (earlier the max blocks we could have
      was 2^15 - 1). This way we can have better extent-to-block alignment.
      Now, maximum number of blocks we can have in an initialized extent is 2^15
      and in an uninitialized extent is 2^15 - 1.
      Signed-off-by: default avatarAmit Arora <aarora@in.ibm.com>
      749269fa
    • Amit Arora's avatar
      write support for preallocated blocks · 56055d3a
      Amit Arora authored
      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 split extents with neighbouring ones, if possible.
      Signed-off-by: default avatarAmit Arora <aarora@in.ibm.com>
      56055d3a
    • Amit Arora's avatar
      fallocate support in ext4 · a2df2a63
      Amit Arora authored
      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 regular files (directories not supported as of date)
      with extent maps. This patch does not support block-mapped files currently.
      Only FALLOC_ALLOCATE and FALLOC_RESV_SPACE modes are being supported as of
      now.
      Signed-off-by: default avatarAmit Arora <aarora@in.ibm.com>
      a2df2a63
    • Amit Arora's avatar
      sys_fallocate() implementation on i386, x86_64 and powerpc · 97ac7350
      Amit Arora authored
      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 will need
      to support an inode operation called ->fallocate().
      Applications can use this feature to avoid fragmentation to certain
      level and thus get faster access speed. With preallocation, applications
      also get a guarantee of space for particular file(s) - even if later the
      the system becomes full.
      
      Currently, glibc provides an interface called posix_fallocate() which
      can be used for similar cause. Though this has the advantage of working
      on all file systems, but it is quite slow (since it writes zeroes to
      each block that has to be preallocated). Without a doubt, file systems
      can do this more efficiently within the kernel, by implementing
      the proposed fallocate() system call. It is expected that
      posix_fallocate() will be modified to call this new system call first
      and incase the kernel/filesystem does not implement it, it should fall
      back to the current implementation of writing zeroes to the new blocks.
      ToDos:
      1. Implementation on other architectures (other than i386, x86_64,
         and ppc). Patches for s390(x) and ia64 are already available from
         previous posts, but it was decided that they should be added later
         once fallocate is in the mainline. Hence not including those patches
         in this take.
      2. Changes to glibc,
         a) to support fallocate() system call
         b) to make posix_fallocate() and posix_fallocate64() call fallocate()
      Signed-off-by: default avatarAmit Arora <aarora@in.ibm.com>
      97ac7350
    • Paul Mundt's avatar
      slob: Kill off duplicate kzalloc() definition. · cb32da04
      Paul Mundt authored
      With the slab zeroing allocations cleanups Christoph stubbed in a generic
      kzalloc(), which was missed on SLOB. Follow the SLAB/SLUB changes and
      kill off the __kzalloc() wrapper that SLOB was using.
      Reported-by: default avatarJan Engelhardt <jengelh@computergmbh.de>
      Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      cb32da04
  2. 17 Jul, 2007 28 commits