1. 19 9月, 2012 3 次提交
    • T
      ext4: fix online resizing when the # of block groups is constant · 59e31c15
      Theodore Ts'o 提交于
      Commit 1c6bd717 introduced a regression where an online resize
      operation which did not change the number of block groups would fail,
      i.e:
      
      	mke2fs -t /dev/vdc 60000
      	mount /dev/vdc
      	resize2fs /dev/vdc 60001
      
      This was due to a bug in the logic regarding when to try converting
      the filesystem to use meta_bg.
      
      Also fix up a number of other minor issues with the online resizing
      code: (a) Fix a sparse warning; (b) only check to make sure the device
      is large enough once, instead of multiple times through the resize
      loop.
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      59e31c15
    • A
      ext4: make orphan functions be no-op in no-journal mode · c9b92530
      Anatol Pomozov 提交于
      Instead of checking whether the handle is valid, we check if journal
      is enabled. This avoids taking the s_orphan_lock mutex in all cases
      when there is no journal in use, including the error paths where
      ext4_orphan_del() is called with a handle set to NULL.
      Signed-off-by: NAnatol Pomozov <anatol.pomozov@gmail.com>
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      c9b92530
    • T
      ext4: re-enable -o discard functionality in no-journal mode · b5e2368b
      Theodore Ts'o 提交于
      This is a revert of commit b56ff9d3, which removed the call to
      ext4_issue_discard() to fix a BUG reported because
      ext4_issue_discard() was being called from inside a block group
      spinlock.  As it turns out this bug had already been fixed by Lukas
      Czerner in commit 53fdcf99 by the simple expedient of moving when
      we call ext4_issue_discard() outside the spinlock.
      
      So it should be safe to re-enable this functionality, which I tested
      by putting an BUG_ON(in_atomic) just after the restored callsite to
      ext4_issue_discard().
      
      Addresses-Google-Bug: #6750518
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      Cc: Anatol Pomozov <anatol.pomozov@gmail.com>
      b5e2368b
  2. 18 9月, 2012 2 次提交
    • C
      ext4: fix possible non-initialized variable in htree_dirblock_to_tree() · 90b0a973
      Carlos Maiolino 提交于
      htree_dirblock_to_tree() declares a non-initialized 'err' variable,
      which is passed as a reference to another functions expecting them to
      set this variable with their error codes.
      
      It's passed to ext4_bread(), which then passes it to ext4_getblk(). If
      ext4_map_blocks() returns 0 due to a lookup failure, leaving the
      ext4_getblk() buffer_head uninitialized, it will make ext4_getblk()
      return to ext4_bread() without initialize the 'err' variable, and
      ext4_bread() will return to htree_dirblock_to_tree() with this variable
      still uninitialized.  htree_dirblock_to_tree() will pass this variable
      with garbage back to ext4_htree_fill_tree(), which expects a number of
      directory entries added to the rb-tree. which, in case, might return a
      fake non-zero value due the garbage left in the 'err' variable, leading
      the kernel to an Oops in ext4_dx_readdir(), once this is expecting a
      filled rb-tree node, when in turn it will have a NULL-ed one, causing an
      invalid page request when trying to get a fname struct from this NULL-ed
      rb-tree node in this line:
      
      fname = rb_entry(info->curr_node, struct fname, rb_hash);
      
      The patch itself initializes the err variable in
      htree_dirblock_to_tree() to avoid usage mistakes by the called
      functions, and also fix ext4_getblk() to return a initialized 'err'
      variable when ext4_map_blocks() fails a lookup.
      Signed-off-by: NCarlos Maiolino <cmaiolino@redhat.com>
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      90b0a973
    • T
      ext4: do not enable delalloc by default for ext2 · bc0b75f7
      Theodore Ts'o 提交于
      Signed-off-by: NBrian Foster <bfoster@redhat.com>
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      bc0b75f7
  3. 14 9月, 2012 1 次提交
  4. 13 9月, 2012 3 次提交
  5. 05 9月, 2012 7 次提交
  6. 20 8月, 2012 1 次提交
  7. 19 8月, 2012 4 次提交
  8. 18 8月, 2012 1 次提交
  9. 17 8月, 2012 14 次提交
  10. 06 8月, 2012 2 次提交
    • T
      ext4: avoid kmemcheck complaint from reading uninitialized memory · 7e731bc9
      Theodore Ts'o 提交于
      Commit 03179fe9 introduced a kmemcheck complaint in
      ext4_da_get_block_prep() because we save and restore
      ei->i_da_metadata_calc_last_lblock even though it is left
      uninitialized in the case where i_da_metadata_calc_len is zero.
      
      This doesn't hurt anything, but silencing the kmemcheck complaint
      makes it easier for people to find real bugs.
      
      Addresses https://bugzilla.kernel.org/show_bug.cgi?id=45631
      (which is marked as a regression).
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      Cc: stable@vger.kernel.org
      7e731bc9
    • T
      ext4: make sure the journal sb is written in ext4_clear_journal_err() · d796c52e
      Theodore Ts'o 提交于
      After we transfer set the EXT4_ERROR_FS bit in the file system
      superblock, it's not enough to call jbd2_journal_clear_err() to clear
      the error indication from journal superblock --- we need to call
      jbd2_journal_update_sb_errno() as well.  Otherwise, when the root file
      system is mounted read-only, the journal is replayed, and the error
      indicator is transferred to the superblock --- but the s_errno field
      in the jbd2 superblock is left set (since although we cleared it in
      memory, we never flushed it out to disk).
      
      This can end up confusing e2fsck.  We should make e2fsck more robust
      in this case, but the kernel shouldn't be leaving things in this
      confused state, either.
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      Cc: stable@kernel.org
      
      d796c52e
  11. 03 8月, 2012 2 次提交
    • L
      Linux 3.6-rc1 · 0d7614f0
      Linus Torvalds 提交于
      0d7614f0
    • L
      Merge branch 'for-linus-3.6' of git://dev.laptop.org/users/dilinger/linux-olpc · fc6bdb59
      Linus Torvalds 提交于
      Pull OLPC platform updates from Andres Salomon:
       "These move the OLPC Embedded Controller driver out of
        arch/x86/platform and into drivers/platform/olpc.
      
        OLPC machines are now ARM-based (which means lots of x86 and ARM
        changes), but are typically pretty self-contained..  so it makes more
        sense to go through a separate OLPC tree after getting the appropriate
        review/ACKs."
      
      * 'for-linus-3.6' of git://dev.laptop.org/users/dilinger/linux-olpc:
        x86: OLPC: move s/r-related EC cmds to EC driver
        Platform: OLPC: move global variables into priv struct
        Platform: OLPC: move debugfs support from x86 EC driver
        x86: OLPC: switch over to using new EC driver on x86
        Platform: OLPC: add a suspended flag to the EC driver
        Platform: OLPC: turn EC driver into a platform_driver
        Platform: OLPC: allow EC cmd to be overridden, and create a workqueue to call it
        drivers: OLPC: update various drivers to include olpc-ec.h
        Platform: OLPC: add a stub to drivers/platform/ for the OLPC EC driver
      fc6bdb59