1. 29 9月, 2009 1 次提交
    • M
      ext4: Split uninitialized extents for direct I/O · 0031462b
      Mingming Cao 提交于
      When writing into an unitialized extent via direct I/O, and the direct
      I/O doesn't exactly cover the unitialized extent, split the extent
      into uninitialized and initialized extents before submitting the I/O.
      This avoids needing to deal with an ENOSPC error in the end_io
      callback that gets used for direct I/O.
      
      When the IO is complete, the written extent will be marked as initialized.
      
      Singed-Off-By: Mingming Cao <cmm@us.ibm.com> 
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      0031462b
  2. 17 9月, 2009 1 次提交
    • T
      ext4: store EXT4_EXT_MIGRATE in i_state instead of i_flags · 1b9c12f4
      Theodore Ts'o 提交于
      EXT4_EXT_MIGRATE is only intended to be used for an in-memory flag,
      and the hex value assigned to it collides with FS_DIRECTIO_FL (which
      is also stored in i_flags).  There's no reason for the
      EXT4_EXT_MIGRATE bit to be stored in i_flags, so we switch it to use
      i_state instead.
      
      Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      1b9c12f4
  3. 26 8月, 2009 1 次提交
    • A
      ext4: Add missing unlock_new_inode() call in extent migration code · a8526e84
      Aneesh Kumar K.V 提交于
      We need to unlock the new inode before iput.  This patch fixes the
      following warning when calling chattr +e to migrate a file to use
      extents.  It also fixes problems in when e4defrag attempts to
      defragment an inode.
      
      [  470.400044] ------------[ cut here ]------------
      [  470.400065] WARNING: at fs/inode.c:1210 generic_delete_inode+0x65/0x16a()
      [  470.400072] Hardware name: N/A
      .....
      ...
      [  470.400353] Pid: 4451, comm: chattr Not tainted 2.6.31-rc7-red-debug #4
      [  470.400359] Call Trace:
      [  470.400372]  [<ffffffff81037771>] warn_slowpath_common+0x77/0x8f
      [  470.400385]  [<ffffffff81037798>] warn_slowpath_null+0xf/0x11
      [  470.400395]  [<ffffffff810b7f28>] generic_delete_inode+0x65/0x16a
      [  470.400405]  [<ffffffff810b8044>] generic_drop_inode+0x17/0x1bd
      [  470.400413]  [<ffffffff810b7083>] iput+0x61/0x65
      [  470.400455]  [<ffffffffa003b229>] ext4_ext_migrate+0x5eb/0x66a [ext4]
      [  470.400492]  [<ffffffffa002b1f8>] ext4_ioctl+0x340/0x756 [ext4]
      [  470.400507]  [<ffffffff810b1a91>] vfs_ioctl+0x1d/0x82
      [  470.400517]  [<ffffffff810b1ff0>] do_vfs_ioctl+0x483/0x4c9
      [  470.400527]  [<ffffffff81059c30>] ? trace_hardirqs_on+0xd/0xf
      [  470.400537]  [<ffffffff810b2087>] sys_ioctl+0x51/0x74
      [  470.400549]  [<ffffffff8100ba6b>] system_call_fastpath+0x16/0x1b
      [  470.400557] ---[ end trace ab85723542352dac ]---
      Signed-off-by: NAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      a8526e84
  4. 13 6月, 2009 2 次提交
    • A
      ext4: teach the inode allocator to use a goal inode number · 11013911
      Andreas Dilger 提交于
      Enhance the inode allocator to take a goal inode number as a
      paremeter; if it is specified, it takes precedence over Orlov or
      parent directory inode allocation algorithms.
      
      The extents migration function uses the goal inode number so that the
      extent trees allocated the migration function use the correct flex_bg.
      In the future, the goal inode functionality will also be used to
      allocate an adjacent inode for the extended attributes.
      
      Also, for testing purposes the goal inode number can be specified via
      /sys/fs/{dev}/inode_goal.  This can be useful for testing inode
      allocation beyond 2^32 blocks on very large filesystems.
      Signed-off-by: NAndreas Dilger <adilger@sun.com>
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      11013911
    • T
      ext4: Use a hash of the topdir directory name for the Orlov parent group · f157a4aa
      Theodore Ts'o 提交于
      Instead of using a random number to determine the goal parent grop for
      the Orlov top directories, use a hash of the directory name.  This
      allows for repeatable results when trying to benchmark filesystem
      layout algorithms.
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      f157a4aa
  5. 16 2月, 2009 1 次提交
  6. 07 1月, 2009 2 次提交
    • T
      ext4: Remove "extents" mount option · 83982b6f
      Theodore Ts'o 提交于
      This mount option is largely superfluous, and in fact the way it was
      implemented was buggy; if a filesystem which did not have the extents
      feature flag was mounted -o extents, the filesystem would attempt to
      create and use extents-based file even though the extents feature flag
      was not eabled.  The simplest thing to do is to nuke the mount option
      entirely.  It's not all that useful to force the non-creation of new
      extent-based files if the filesystem can support it.
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      83982b6f
    • F
      ext4: Allow ext4 to run without a journal · 0390131b
      Frank Mayhar 提交于
      A few weeks ago I posted a patch for discussion that allowed ext4 to run
      without a journal.  Since that time I've integrated the excellent
      comments from Andreas and fixed several serious bugs.  We're currently
      running with this patch and generating some performance numbers against
      both ext2 (with backported reservations code) and ext4 with and without
      a journal.  It just so happens that running without a journal is
      slightly faster for most everything.
      
      We did
      	iozone -T -t 4 s 2g -r 256k -T -I -i0 -i1 -i2
      
      which creates 4 threads, each of which create and do reads and writes on
      a 2G file, with a buffer size of 256K, using O_DIRECT for all file opens
      to bypass the page cache.  Results:
      
                           ext2        ext4, default   ext4, no journal
        initial writes   13.0 MB/s        15.4 MB/s          15.7 MB/s
        rewrites         13.1 MB/s        15.6 MB/s          15.9 MB/s
        reads            15.2 MB/s        16.9 MB/s          17.2 MB/s
        re-reads         15.3 MB/s        16.9 MB/s          17.2 MB/s
        random readers    5.6 MB/s         5.6 MB/s           5.7 MB/s
        random writers    5.1 MB/s         5.3 MB/s           5.4 MB/s 
      
      So it seems that, so far, this was a useful exercise.
      Signed-off-by: NFrank Mayhar <fmayhar@google.com>
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      0390131b
  7. 14 9月, 2008 1 次提交
  8. 20 8月, 2008 1 次提交
  9. 30 4月, 2008 1 次提交
  10. 29 4月, 2008 1 次提交
    • A
      ext4: Fix race between migration and mmap write · 267e4db9
      Aneesh Kumar K.V 提交于
      Fail migrate if we allocated new blocks via mmap write.
      
      If we write to holes in the file via mmap, we end up allocating
      new blocks. This block allocation happens without taking inode->i_mutex.
      Since migrate is protected by i_mutex and migrate expects that no
      new blocks get allocated during migrate, fail migrate if new blocks
      get allocated.
      
      We can't take inode->i_mutex in the mmap write path because that
      would result in a locking order violation between i_mutex and mmap_sem.
      Also adding a separate rw_sempahore for protection is really high overhead
      for a rare operation such as migrate.
      Signed-off-by: NAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
      Acked-by: NJan Kara <jack@suse.cz>
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      267e4db9
  11. 26 2月, 2008 1 次提交
  12. 10 2月, 2008 1 次提交
  13. 05 2月, 2008 1 次提交
  14. 29 1月, 2008 2 次提交