1. 27 Jul, 2011 5 commits
  2. 26 Jul, 2011 1 commit
    • Jan Kara's avatar
      ext4: fix data corruption in inodes with journalled data · 2d859db3
      Jan Kara authored
      When journalling data for an inode (either because it is a symlink or
      because the filesystem is mounted in data=journal mode), ext4_evict_inode()
      can discard unwritten data by calling truncate_inode_pages(). This is
      because we don't mark the buffer / page dirty when journalling data but only
      add the buffer to the running transaction and thus mm does not know there
      are still unwritten data.
      
      Fix the problem by carefully tracking transaction containing inode's data,
      committing this transaction, and writing uncheckpointed buffers when inode
      should be reaped.
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      2d859db3
  3. 24 Jul, 2011 3 commits
  4. 23 Jul, 2011 3 commits
  5. 18 Jul, 2011 6 commits
  6. 16 Jul, 2011 1 commit
  7. 11 Jul, 2011 13 commits
  8. 10 Jul, 2011 1 commit
    • Maxim Patlasov's avatar
      ext4: fix i_blocks/quota accounting when extent insertion fails · 7132de74
      Maxim Patlasov authored
      The current implementation of ext4_free_blocks() always calls
      dquot_free_block This looks quite sensible in the most cases: blocks
      to be freed are associated with inode and were accounted in quota and
      i_blocks some time ago.
      
      However, there is a case when blocks to free were not accounted by the
      time calling ext4_free_blocks() yet:
      
      1. delalloc is on, write_begin pre-allocated some space in quota
      2. write-back happens, ext4 allocates some blocks in ext4_ext_map_blocks()
      3. then ext4_ext_map_blocks() gets an error (e.g.  ENOSPC) from
         ext4_ext_insert_extent() and calls ext4_free_blocks().
      
      In this scenario, ext4_free_blocks() calls dquot_free_block() who, in
      turn, decrements i_blocks for blocks which were not accounted yet (due
      to delalloc) After clean umount, e2fsck reports something like:
      
      > Inode 21, i_blocks is 5080, should be 5128.  Fix<y>?
      because i_blocks was erroneously decremented as explained above.
      
      The patch fixes the problem by passing the new flag
      EXT4_FREE_BLOCKS_NO_QUOT_UPDATE to ext4_free_blocks(), to request
      that the dquot_free_block() call be skipped.
      Signed-off-by: default avatarMaxim Patlasov <maxim.patlasov@gmail.com>
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      Cc: stable@kernel.org
      7132de74
  9. 30 Jun, 2011 1 commit
  10. 28 Jun, 2011 2 commits
  11. 27 Jun, 2011 4 commits