1. 22 May, 2014 1 commit
    • Jan Kara's avatar
      ext3: Fix deadlock in data=journal mode when fs is frozen · 166418cc
      Jan Kara authored
      When ext3 is used in data=journal mode, syncing filesystem makes sure
      all the data is committed in the journal but the data doesn't have to be
      checkpointed. ext3_freeze() then takes care of checkpointing all the
      data so all buffer heads are clean but pages can still have dangling
      dirty bits. So when flusher thread comes later when filesystem is
      frozen, it tries to write back dirty pages, ext3_journalled_writepage()
      tries to start a transaction and hangs waiting for frozen fs causing a
      deadlock because a holder of s_umount semaphore may be waiting for
      flusher thread to complete.
      
      The fix is luckily relatively easy. We don't have to start a transaction
      in ext3_journalled_writepage() when a page is just dirty (and doesn't
      have PageChecked set) because in that case all buffers should be already
      mapped (mapping must happen before writing a buffer to the journal) and
      it is enough to write them out. This optimization also solves the deadlock
      because block_write_full_page() will just find out there's no buffer to
      write and do nothing.
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      166418cc
  2. 21 May, 2014 2 commits
    • Jeff Mahoney's avatar
      reiserfs: call truncate_setsize under tailpack mutex · 22e7478d
      Jeff Mahoney authored
      Prior to commit 0e4f6a79 (Fix reiserfs_file_release()), reiserfs
      truncates serialized on i_mutex. They mostly still do, with the exception
      of reiserfs_file_release. That blocks out other writers via the tailpack
      mutex and the inode openers counter adjusted in reiserfs_file_open.
      
      However, NFS will call reiserfs_setattr without having called ->open, so
      we end up with a race when nfs is calling ->setattr while another
      process is releasing the file. Ultimately, it triggers the
      BUG_ON(inode->i_size != new_file_size) check in maybe_indirect_to_direct.
      
      The solution is to pull the lock into reiserfs_setattr to encompass the
      truncate_setsize call as well.
      Signed-off-by: default avatarJeff Mahoney <jeffm@suse.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      22e7478d
    • Fabian Frederick's avatar
      fs/jbd/revoke.c: replace shift loop by ilog2 · 770901cc
      Fabian Frederick authored
      journal_init_revoke_table is only called with positive hash_size
      (JOURNAL_REVOKE_DEFAULT_HASH) so we can replace loop shift by ilog2
      
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Jan Kara <jack@suse.cz>
      Cc: Joe Perches <joe@perches.com>
      Signed-off-by: default avatarFabian Frederick <fabf@skynet.be>
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      770901cc
  3. 14 May, 2014 1 commit
  4. 13 May, 2014 3 commits
  5. 07 May, 2014 16 commits
  6. 06 May, 2014 17 commits