1. 02 Dec, 2012 1 commit
  2. 30 Nov, 2012 2 commits
  3. 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 <sachin.kamat@linaro.org>
      Reported-by: default avatarWei Yongjun <weiyj.lk@gmail.com>
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      4a092d73
    • 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 <vmartirosyan@linuxtesting.org>
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      766f44d4
    • 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 <lczerner@redhat.com>
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      06348679
    • 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
      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: default avatarLukas Czerner <lczerner@redhat.com>
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      91dd8c11
  4. 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" <tytso@mit.edu>
      f3b59291
  5. 15 Nov, 2012 1 commit
  6. 13 Nov, 2012 1 commit
  7. 11 Nov, 2012 1 commit
  8. 09 Nov, 2012 7 commits
  9. 08 Nov, 2012 16 commits
  10. 29 Oct, 2012 1 commit
    • Eric Sandeen's avatar
      ext4: fix unjournaled inode bitmap modification · ffb5387e
      Eric Sandeen authored
      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: default avatarNix <nix@esperi.org.uk>
      Signed-off-by: default avatarEric Sandeen <sandeen@redhat.com>
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      Cc: stable@vger.kernel.org
      ffb5387e
  11. 28 Oct, 2012 5 commits
    • Linus Torvalds's avatar
      Linux 3.7-rc3 · 8f0d8163
      Linus Torvalds authored
      8f0d8163
    • Linus Torvalds's avatar
      Merge tag 'ktest-v3.7-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest · 5a5210c6
      Linus Torvalds authored
      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
    • Linus Torvalds's avatar
      Merge tag 'spi-mxs' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc · 8e99165a
      Linus Torvalds authored
      Pull minor spi MXS fixes from Mark Brown:
       "These fixes are both pretty minor ones and are driver local."
      
      * tag 'spi-mxs' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc:
        spi: mxs: Terminate DMA in case of DMA timeout
        spi: mxs: Assign message status after transfer finished
      8e99165a
    • Linus Torvalds's avatar
      Merge tag 'fixes-for-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · 065c8012
      Linus Torvalds authored
      Pull arm-soc fixes from Arnd Bergmann:
       "Bug fixes for a number of ARM platforms, mostly OMAP, imx and at91.
      
        These come a little later than I had hoped but unfortunately we had a
        few of these patches cause regressions themselves and had to work out
        how to deal with those in the meantime."
      
      * tag 'fixes-for-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (38 commits)
        Revert "ARM i.MX25: Fix PWM per clock lookups"
        ARM: versatile: fix versatile_defconfig
        ARM: mvebu: update defconfig with 3.7 changes
        ARM: at91: fix at91x40 build
        ARM: socfpga: Fix socfpga compilation with early_printk() enabled
        ARM: SPEAr: Remove unused empty files
        MAINTAINERS: Add arm-soc tree entry
        ARM: dts: mxs: add the "clock-names" for gpmi-nand
        ARM: ux500: Correct SDI5 address and add some format changes
        ARM: ux500: Specify AMBA Primecell IDs for Nomadik I2C in DT
        ARM: ux500: Fix build error relating to IRQCHIP_SKIP_SET_WAKE
        ARM: at91: drop duplicated config SOC_AT91SAM9 entry
        ARM: at91/i2c: change id to let i2c-at91 work
        ARM: at91/i2c: change id to let i2c-gpio work
        ARM: at91/dts: at91sam9g20ek_common: Fix typos in buttons labels.
        ARM: at91: fix external interrupt specification in board code
        ARM: at91: fix external interrupts in non-DT case
        ARM: at91: at91sam9g10: fix SOC type detection
        ARM: at91/tc: fix typo in the DT document
        ARM: AM33XX: Fix configuration of dmtimer parent clock by dmtimer driverDate:Wed, 17 Oct 2012 13:55:55 -0500
        ...
      065c8012
    • Mikulas Patocka's avatar
      Lock splice_read and splice_write functions · 1a25b1c4
      Mikulas Patocka authored
      Functions generic_file_splice_read and generic_file_splice_write access
      the pagecache directly. For block devices these functions must be locked
      so that block size is not changed while they are in progress.
      
      This patch is an additional fix for commit b87570f5 ("Fix a crash
      when block device is read and block size is changed at the same time")
      that locked aio_read, aio_write and mmap against block size change.
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      1a25b1c4