1. 11 12月, 2012 2 次提交
  2. 05 12月, 2012 1 次提交
  3. 03 12月, 2012 1 次提交
  4. 30 11月, 2012 2 次提交
  5. 29 11月, 2012 4 次提交
    • T
      ext4: rationalize ext4_extents.h inclusion · 4a092d73
      Theodore Ts'o 提交于
      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: NSachin Kamat <sachin.kamat@linaro.org>
      Reported-by: NWei Yongjun <weiyj.lk@gmail.com>
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      4a092d73
    • V
      ext4: fixed potential NULL dereference in ext4_calculate_overhead() · 766f44d4
      Vahram Martirosyan 提交于
      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: NVahram Martirosyan <vmartirosyan@linuxtesting.org>
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      766f44d4
    • L
      ext4: simple cleanup in fiemap codepath · 06348679
      Lukas Czerner 提交于
      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: NLukas Czerner <lczerner@redhat.com>
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      06348679
    • L
      ext4: prevent race while walking extent tree for fiemap · 91dd8c11
      Lukas Czerner 提交于
      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
      accurate.
      
      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:
              ext4_ext_find_extent()
              ext4_ext_next_allocated_block()
              ext4_find_delayed_extent()
       5. call fiemap_fill_next_extent after releasing the i_data_sem
       6. move path reinitialization into the critical section.
      Signed-off-by: NLukas Czerner <lczerner@redhat.com>
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      91dd8c11
  6. 16 11月, 2012 1 次提交
    • T
      ext4: remove calls to ext4_jbd2_file_inode() from delalloc write path · f3b59291
      Theodore Ts'o 提交于
      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: N"Theodore Ts'o" <tytso@mit.edu>
      f3b59291
  7. 15 11月, 2012 1 次提交
  8. 13 11月, 2012 1 次提交
  9. 11 11月, 2012 1 次提交
  10. 09 11月, 2012 22 次提交
  11. 08 11月, 2012 1 次提交
  12. 29 10月, 2012 3 次提交
    • E
      ext4: fix unjournaled inode bitmap modification · ffb5387e
      Eric Sandeen 提交于
      commit 119c0d44 changed
      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: NNix <nix@esperi.org.uk>
      Signed-off-by: NEric Sandeen <sandeen@redhat.com>
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      Cc: stable@vger.kernel.org
      ffb5387e
    • L
      Linux 3.7-rc3 · 8f0d8163
      Linus Torvalds 提交于
      8f0d8163
    • L
      Merge tag 'ktest-v3.7-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest · 5a5210c6
      Linus Torvalds 提交于
      Pull ktest confusion fix from Steven Rostedt:
       "With the v3.7-rc2 kernel, the network cards on my target boxes were
        not being brought up.
      
        I found that the modules for the network was not being installed.
        This was due to the config CONFIG_MODULES_USE_ELF_RELA that came
        before CONFIG_MODULES, and confused ktest in thinking that
        CONFIG_MODULES=y was not found.
      
        Ktest needs to test all configs and not just stop if something starts
        with CONFIG_MODULES."
      
      * tag 'ktest-v3.7-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest:
        ktest: Fix ktest confusion with CONFIG_MODULES_USE_ELF_RELA
      5a5210c6