1. 20 4月, 2016 1 次提交
  2. 14 4月, 2016 1 次提交
  3. 13 4月, 2016 1 次提交
  4. 06 4月, 2016 1 次提交
  5. 05 4月, 2016 1 次提交
  6. 24 3月, 2016 1 次提交
  7. 16 3月, 2016 21 次提交
  8. 15 3月, 2016 5 次提交
  9. 14 3月, 2016 4 次提交
    • V
      ext4: clean up error handling in the MMP support · 03046886
      vikram.jadhav07 提交于
      There is memory leak as both caller function kmmpd() and callee
      read_mmp_block() not releasing bh_check  (i.e buffer_head).
      Given patch fixes this problem.
      
      [ Additional changes suggested by Andreas Dilger -- TYT ]
      Signed-off-by: NJadhav Vikram <vikramjadhavpucsd2007@gmail.com>
      Signed-off-by: NTheodore Ts'o <tytso@mit.edu>
      03046886
    • M
      jbd2: do not fail journal because of frozen_buffer allocation failure · 490c1b44
      Michal Hocko 提交于
      Journal transaction might fail prematurely because the frozen_buffer
      is allocated by GFP_NOFS request:
      [   72.440013] do_get_write_access: OOM for frozen_buffer
      [   72.440014] EXT4-fs: ext4_reserve_inode_write:4729: aborting transaction: Out of memory in __ext4_journal_get_write_access
      [   72.440015] EXT4-fs error (device sda1) in ext4_reserve_inode_write:4735: Out of memory
      (...snipped....)
      [   72.495559] do_get_write_access: OOM for frozen_buffer
      [   72.495560] EXT4-fs: ext4_reserve_inode_write:4729: aborting transaction: Out of memory in __ext4_journal_get_write_access
      [   72.496839] do_get_write_access: OOM for frozen_buffer
      [   72.496841] EXT4-fs: ext4_reserve_inode_write:4729: aborting transaction: Out of memory in __ext4_journal_get_write_access
      [   72.505766] Aborting journal on device sda1-8.
      [   72.505851] EXT4-fs (sda1): Remounting filesystem read-only
      
      This wasn't a problem until "mm: page_alloc: do not lock up GFP_NOFS
      allocations upon OOM" because small GPF_NOFS allocations never failed.
      This allocation seems essential for the journal and GFP_NOFS is too
      restrictive to the memory allocator so let's use __GFP_NOFAIL here to
      emulate the previous behavior.
      Signed-off-by: NMichal Hocko <mhocko@suse.com>
      Signed-off-by: NTheodore Ts'o <tytso@mit.edu>
      490c1b44
    • K
      ext4: use __GFP_NOFAIL in ext4_free_blocks() · adb7ef60
      Konstantin Khlebnikov 提交于
      This might be unexpected but pages allocated for sbi->s_buddy_cache are
      charged to current memory cgroup. So, GFP_NOFS allocation could fail if
      current task has been killed by OOM or if current memory cgroup has no
      free memory left. Block allocator cannot handle such failures here yet.
      Signed-off-by: NKonstantin Khlebnikov <khlebnikov@yandex-team.ru>
      Signed-off-by: NTheodore Ts'o <tytso@mit.edu>
      adb7ef60
    • A
      ext4: fix compile error while opening the macro DOUBLE_CHECK · a2821e34
      Aihua Zhang 提交于
      the error is:
          fs/ext4/mballoc.c:475:43: error: 'struct ext4_group_info' has
      no member named 'bb_bitmap'.
          so, the definition of macro DOUBLE_CHECK should before
      'struct ext4_group_info', I fixed it, and I moved the macro
      AGGRESSIVE_CHECK together, because I think they shoule be together.
      Signed-off-by: NAihua Zhang <zhangaihua1@huawei.com>
      Signed-off-by: NTheodore Ts'o <tytso@mit.edu>
      a2821e34
  10. 13 3月, 2016 2 次提交
    • A
      ext4: print ext4 mount option data_err=abort correctly · 7915a861
      Ales Novak 提交于
      If data_err=abort option is specified for an ext3/ext4 mount,
      /proc/mounts does show it as "(null)". This is caused by token2str()
      returning NULL for Opt_data_err_abort (due to its pattern containing
      '=').
      Signed-off-by: NAles Novak <alnovak@suse.cz>
      Signed-off-by: NTheodore Ts'o <tytso@mit.edu>
      7915a861
    • E
      ext4: fix NULL pointer dereference in ext4_mark_inode_dirty() · 5e1021f2
      Eryu Guan 提交于
      ext4_reserve_inode_write() in ext4_mark_inode_dirty() could fail on
      error (e.g. EIO) and iloc.bh can be NULL in this case. But the error is
      ignored in the following "if" condition and ext4_expand_extra_isize()
      might be called with NULL iloc.bh set, which triggers NULL pointer
      dereference.
      
      This is uncovered by commit 8b4953e1 ("ext4: reserve code points for
      the project quota feature"), which enlarges the ext4_inode size, and
      run the following script on new kernel but with old mke2fs:
      
        #/bin/bash
        mnt=/mnt/ext4
        devname=ext4-error
        dev=/dev/mapper/$devname
        fsimg=/home/fs.img
      
        trap cleanup 0 1 2 3 9 15
      
        cleanup()
        {
                umount $mnt >/dev/null 2>&1
                dmsetup remove $devname
                losetup -d $backend_dev
                rm -f $fsimg
                exit 0
        }
      
        rm -f $fsimg
        fallocate -l 1g $fsimg
        backend_dev=`losetup -f --show $fsimg`
        devsize=`blockdev --getsz $backend_dev`
      
        good_tab="0 $devsize linear $backend_dev 0"
        error_tab="0 $devsize error $backend_dev 0"
      
        dmsetup create $devname --table "$good_tab"
      
        mkfs -t ext4 $dev
        mount -t ext4 -o errors=continue,strictatime $dev $mnt
      
        dmsetup load $devname --table "$error_tab" && dmsetup resume $devname
        echo 3 > /proc/sys/vm/drop_caches
        ls -l $mnt
        exit 0
      
      [ Patch changed to simplify the function a tiny bit. -- Ted ]
      Signed-off-by: NEryu Guan <guaneryu@gmail.com>
      Signed-off-by: NTheodore Ts'o <tytso@mit.edu>
      5e1021f2
  11. 11 3月, 2016 1 次提交
  12. 10 3月, 2016 1 次提交