1. 17 5月, 2011 5 次提交
    • T
      jbd/jbd2: remove obsolete summarise_journal_usage. · 9199e665
      Tao Ma 提交于
      summarise_journal_usage seems to be obsolete for a long time,
      so remove it.
      
      Cc: Jan Kara <jack@suse.cz>
      Signed-off-by: NTao Ma <boyu.mt@taobao.com>
      Signed-off-by: NJan Kara <jack@suse.cz>
      9199e665
    • J
      jbd: Fix forever sleeping process in do_get_write_access() · 2842bb20
      Jan Kara 提交于
      In do_get_write_access() we wait on BH_Unshadow bit for buffer to get
      from shadow state. The waking code in journal_commit_transaction() has
      a bug because it does not issue a memory barrier after the buffer is moved
      from the shadow state and before wake_up_bit() is called. Thus a waitqueue
      check can happen before the buffer is actually moved from the shadow state
      and waiting process may never be woken. Fix the problem by issuing proper
      barrier.
      
      CC: stable@kernel.org
      Reported-by: NTao Ma <boyu.mt@taobao.com>
      Signed-off-by: NJan Kara <jack@suse.cz>
      2842bb20
    • R
      ext2: fix error msg when mounting fs with too-large blocksize · 4e299c1d
      Robin Dong 提交于
      When ext2 mounts a filesystem, it attempts to set the block device
      blocksize with a call to sb_set_blocksize, which can fail for
      several reasons.  The current failure message in ext2 prints:
      
        EXT2-fs (loop1): error: blocksize is too small
      
      which is not correct in all cases.  This can be demonstrated
      by creating a filesystem with
      
        # mkfs.ext2 -b 8192
      
      on a 4k page system, and attempting to mount it.
      
      Change the error message to a more generic:
      
        EXT2-fs (loop1): bad blocksize 8192
      
      to match the error message in ext3.
      Signed-off-by: NRobin Dong <sanbai@taobao.com>
      Reviewed-by: NColy Li <bosong.ly@taobao.com>
      Reviewed-by: NEric Sandeen <sandeen@redhat.com>
      Signed-off-by: NJan Kara <jack@suse.cz>
      4e299c1d
    • T
      jbd: fix fsync() tid wraparound bug · d9b01934
      Ted Ts'o 提交于
      If an application program does not make any changes to the indirect
      blocks or extent tree, i_datasync_tid will not get updated.  If there
      are enough commits (i.e., 2**31) such that tid_geq()'s calculations
      wrap, and there isn't a currently active transaction at the time of
      the fdatasync() call, this can end up triggering a BUG_ON in
      fs/jbd/commit.c:
      
      	J_ASSERT(journal->j_running_transaction != NULL);
      
      It's pretty rare that this can happen, since it requires the use of
      fdatasync() plus *very* frequent and excessive use of fsync().  But
      with the right workload, it can.
      
      We fix this by replacing the use of tid_geq() with an equality test,
      since there's only one valid transaction id that is valid for us to
      start: namely, the currently running transaction (if it exists).
      
      CC: stable@kernel.org
      Reported-by: Martin_Zielinski@McAfee.com
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      Signed-off-by: NJan Kara <jack@suse.cz>
      d9b01934
    • J
      ext3: Fix fs corruption when make_indexed_dir() fails · 86c4f6d8
      Jan Kara 提交于
      When make_indexed_dir() fails (e.g. because of ENOSPC) after it has allocated
      block for index tree root, we did not properly mark all changed buffers dirty.
      This lead to only some of these buffers being written out and thus effectively
      corrupting the directory.
      
      Fix the issue by marking all changed data dirty even in the error failure case.
      
      CC: stable@kernel.org
      Signed-off-by: NJan Kara <jack@suse.cz>
      86c4f6d8
  2. 30 4月, 2011 1 次提交
    • J
      ext3: Fix lock inversion in ext3_symlink() · ae54870a
      Jan Kara 提交于
      ext3_symlink() cannot call __page_symlink() with transaction open.
      __page_symlink() calls ext3_write_begin() which gets page lock which ranks
      above transaction start (thus lock ordering is violated) and and also
      ext3_write_begin() waits for a transaction commit when we run out of space
      which never happens if we hold transaction open.
      
      Fix the problem by stopping a transaction before calling __page_symlink()
      (we have to be careful and put inode to orphan list so that it gets deleted
      in case of crash) and starting another one after __page_symlink() returns
      for addition of symlink into a directory.
      Signed-off-by: NJan Kara <jack@suse.cz>
      ae54870a
  3. 29 4月, 2011 15 次提交
  4. 28 4月, 2011 7 次提交
  5. 27 4月, 2011 11 次提交
  6. 26 4月, 2011 1 次提交