1. 11 Apr, 2011 1 commit
    • Curt Wohlgemuth's avatar
      ext4: sync the directory inode in ext4_sync_parent() · 0893ed45
      Curt Wohlgemuth authored
      ext4 has taken the stance that, in the absence of a journal,
      when an fsync/fdatasync of an inode is done, the parent
      directory should be sync'ed if this inode entry is new.
      ext4_sync_parent(), which implements this, does indeed sync
      the dirent pages for parent directories, but it does not
      sync the directory *inode*.  This patch fixes this.
      
      Also now return error status from ext4_sync_parent().
      
      I tested this using a power fail test, which panics a
      machine running a file server getting requests from a
      client.  Without this patch, on about every other test run,
      the server is missing many, many files that had been synced.
      With this patch, on > 6 runs, I see zero files being lost.
      
      Google-Bug-Id: 4179519
      Signed-off-by: default avatarCurt Wohlgemuth <curtw@google.com>
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      0893ed45
  2. 05 Apr, 2011 2 commits
    • Tao Ma's avatar
      ext4: init timer earlier to avoid a kernel panic in __save_error_info · 04496411
      Tao Ma authored
      During mount, when we fail to open journal inode or root inode, the
      __save_error_info will mod_timer. But actually s_err_report isn't
      initialized yet and the kernel oops. The detailed information can
      be found https://bugzilla.kernel.org/show_bug.cgi?id=32082.
      
      The best way is to check whether the timer s_err_report is initialized
      or not. But it seems that in include/linux/timer.h, we can't find a
      good function to check the status of this timer, so this patch just
      move the initializtion of s_err_report earlier so that we can avoid
      the kernel panic. The corresponding del_timer is also added in the
      error path.
      Reported-by: default avatarSami Liedes <sliedes@cc.hut.fi>
      Signed-off-by: default avatarTao Ma <boyu.mt@taobao.com>
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      04496411
    • Zhang Huan's avatar
      jbd2: fix potential memory leak on transaction commit · 6cba611e
      Zhang Huan authored
      There is potential memory leak of journal head in function
      jbd2_journal_commit_transaction. The problem is that JBD2 will not
      reclaim the journal head of commit record if error occurs or journal
      is abotred.
      
      I use the following script to reproduce this issue, on a RHEL6
      system. I found it very easy to reproduce with async commit enabled.
      
      mount /dev/sdb /mnt -o journal_checksum,journal_async_commit
      touch /mnt/xxx
      echo offline > /sys/block/sdb/device/state
      sync
      umount /mnt
      rmmod ext4
      rmmod jbd2
      
      Removal of the jbd2 module will make slab complaining that
      "cache `jbd2_journal_head': can't free all objects".
      Signed-off-by: default avatarZhang Huan <zhhuan@gmail.com>
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      6cba611e
  3. 04 Apr, 2011 4 commits
  4. 29 Mar, 2011 33 commits