This project is mirrored from Pull mirroring updated .
  1. 10 Dec, 2012 2 commits
  2. 05 Dec, 2012 1 commit
  3. 02 Dec, 2012 1 commit
  4. 30 Nov, 2012 2 commits
  5. 28 Nov, 2012 4 commits
    • Theodore Ts'o's avatar
      ext4: rationalize ext4_extents.h inclusion · 4a092d73
      Theodore Ts'o authored
      Previously, ext4_extents.h was being included at the end of ext4.h,
      which was bad for a number of reasons: (a) it was not being included
      in the expected place, and (b) it caused the header to be included
      multiple times.  There were #ifdef's to prevent this from causing any
      problems, but it still was unnecessary.
      By moving the function declarations that were in ext4_extents.h to
      ext4.h, which is standard practice for where the function declarations
      for the rest of ext4.h can be found, we can remove ext4_extents.h from
      being included in ext4.h at all, and then we can only include
      ext4_extents.h where it is needed in ext4's source files.
      It should be possible to move a few more things into ext4.h, and
      further reduce the number of source files that need to #include
      ext4_extents.h, but that's a cleanup for another day.
      Reported-by: default avatarSachin Kamat <>
      Reported-by: default avatarWei Yongjun <>
      Signed-off-by: default avatar"Theodore Ts'o" <>
    • Vahram Martirosyan's avatar
      ext4: fixed potential NULL dereference in ext4_calculate_overhead() · 766f44d4
      Vahram Martirosyan authored
      The memset operation before check can cause a BUG if the memory
      allocation failed.  Since we are using get_zeroed_age, there is no
      need to use memset anyway.
      Found by the Spruce system in cooperation with the KEDR Framework.
      Signed-off-by: default avatarVahram Martirosyan <>
      Signed-off-by: default avatar"Theodore Ts'o" <>
    • Lukas Czerner's avatar
      ext4: simple cleanup in fiemap codepath · 06348679
      Lukas Czerner authored
      This commit is simple cleanup of fiemap codepath which has not been
      included in previous commit to make the changes clearer. In this commit
      we rename cbex variable to newex in ext4_fill_fiemap_extents() because
      callback is no longer present
      Signed-off-by: default avatarLukas Czerner <>
      Signed-off-by: default avatar"Theodore Ts'o" <>
    • Lukas Czerner's avatar
      ext4: prevent race while walking extent tree for fiemap · 91dd8c11
      Lukas Czerner authored
      Currently ext4_ext_walk_space() only takes i_data_sem for read when
      searching for the extent at given block with ext4_ext_find_extent().
      Then it drops the lock and the extent tree can be changed at will.
      However later on we're searching for the 'next' extent, but the extent
      tree might already have changed, so the information might not be
      In fact we can hit BUG_ON(end <= start) if the extent got inserted into
      the tree after the one we found and before the block we were searching
      for. This has been reproduced by running xfstests 225 in loop on s390x
      architecture, but theoretically we could hit this on any other
      architecture as well, but probably not as often.
      Moreover the extent currently in delayed allocation might be allocated
      after we search the extent tree and before we search extent status tree
      delayed buffers resulting in those delayed buffers being completely
      missed, even though completely written and allocated.
      We fix all those problems in several steps:
       1. remove unnecessary callback indirection
       2. rename functions
              ext4_ext_walk_space -> ext4_fill_fiemap_extents
              ext4_ext_fiemap_cb -> ext4_find_delayed_extent
       3. move fiemap_fill_next_extent() into ext4_fill_fiemap_extents()
       4. hold the i_data_sem for:
       5. call fiemap_fill_next_extent after releasing the i_data_sem
       6. move path reinitialization into the critical section.
      Signed-off-by: default avatarLukas Czerner <>
      Signed-off-by: default avatar"Theodore Ts'o" <>
  6. 16 Nov, 2012 1 commit
    • Theodore Ts'o's avatar
      ext4: remove calls to ext4_jbd2_file_inode() from delalloc write path · f3b59291
      Theodore Ts'o authored
      The calls to ext4_jbd2_file_inode() are needed to guarantee that we do
      not expose stale data in the data=ordered mode.  However, they are not
      necessary because in all of the cases where we have newly allocated
      blocks in the delayed allocation write path, we immediately submit the
      dirty pages for I/O.  Hence, we can avoid the overhead of adding the
      inode to the list of inodes whose data pages will be to be flushed out
      to disk completely during the next commit operation.
      Signed-off-by: default avatar"Theodore Ts'o" <>
  7. 15 Nov, 2012 1 commit
  8. 13 Nov, 2012 1 commit
  9. 11 Nov, 2012 1 commit
  10. 09 Nov, 2012 7 commits
  11. 08 Nov, 2012 16 commits
  12. 29 Oct, 2012 1 commit
    • Eric Sandeen's avatar
      ext4: fix unjournaled inode bitmap modification · ffb5387e
      Eric Sandeen authored
      commit 119c0d44
      ext4_new_inode() such that the inode bitmap was being modified
      outside a transaction, which could lead to corruption, and was
      discovered when journal_checksum found a bad checksum in the
      journal during log replay.
      Nix ran into this when using the journal_async_commit mount
      option, which enables journal checksumming.  The ensuing
      journal replay failures due to the bad checksums led to
      filesystem corruption reported as the now infamous
      "Apparent serious progressive ext4 data corruption bug"
      [ Changed by tytso to only call ext4_journal_get_write_access() only
        when we're fairly certain that we're going to allocate the inode. ]
      I've tested this by mounting with journal_checksum and
      running fsstress then dropping power; I've also tested by
      hacking DM to create snapshots w/o first quiescing, which
      allows me to test journal replay repeatedly w/o actually
      power-cycling the box.  Without the patch I hit a journal
      checksum error every time.  With this fix it survives
      many iterations.
      Reported-by: default avatarNix <>
      Signed-off-by: default avatarEric Sandeen <>
      Signed-off-by: default avatar"Theodore Ts'o" <>
  13. 28 Oct, 2012 2 commits