1. 28 Dec, 2011 3 commits
  2. 21 Dec, 2011 1 commit
    • Theodore Ts'o's avatar
      ext4: remove unneeded file_remove_suid() from ext4_ioctl() · 22cdfca5
      Theodore Ts'o authored
      In the code to support EXT4_IOC_MOVE_EXT, ext4_ioctl calls
      file_remove_suid() after the call to ext4_move_extents() if any
      extents has been moved.  There are at least three things wrong with
      this.  First, file_remove_suid() should be called with i_mutex down,
      which is not here.  Second, it should be called before the donor file
      has been modified, to avoid a potential race condition.  Third, and
      most importantly, it's pointless, because ext4_file_extents() already
      checks if the donor file has the setuid or setgid bit set, and will
      return an error in that case.  So the first two objections don't
      really matter, since file_remove_suid() will never need to modify the
      inode in any case.
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      22cdfca5
  3. 19 Dec, 2011 1 commit
    • Robin Dong's avatar
      ext4: optimize ext4_find_delalloc_range() in nodelalloc mode · 8c48f7e8
      Robin Dong authored
      We found performance regression when using bigalloc with "nodelalloc"
      (1MB cluster size):
      
      1. mke2fs -C 1048576 -O ^has_journal,bigalloc /dev/sda
      2. mount -o nodelalloc /dev/sda /test/
      3. time dd if=/dev/zero of=/test/io bs=1048576 count=1024
      
      The "dd" will cost about 2 seconds to finish, but if we mke2fs without
      "bigalloc", "dd" will only cost less than 1 second.
      
      The reason is: when using ext4 with "nodelalloc", it will call
      ext4_find_delalloc_cluster() nearly everytime it call
      ext4_ext_map_blocks(), and ext4_find_delalloc_range() will also scan
      all pages in cluster because no buffer is "delayed".  A cluster has
      256 pages (1MB cluster), so it will scan 256 * 256k pags when creating
      a 1G file. That severely hurts the performance.
      
      Therefore, we return immediately from ext4_find_delalloc_range() in
      nodelalloc mode, since by definition there can't be any delalloc
      pages.
      Signed-off-by: default avatarRobin Dong <sanbai@taobao.com>
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      8c48f7e8
  4. 18 Dec, 2011 4 commits
  5. 17 Dec, 2011 1 commit
  6. 16 Dec, 2011 22 commits
  7. 15 Dec, 2011 8 commits