1. 16 5月, 2012 10 次提交
    • J
      quota: Get rid of nested I_MUTEX_QUOTA locking subclass · a80b12c3
      Jan Kara 提交于
      So far i_mutex was ranking above dqonoff_mutex and i_mutex on quota files
      was special and ranking below dqonoff_mutex (and several other locks).
      However there's no real need for i_mutex on quota files to be special.
      IO on quota files is serialized by dqio_mutex anyway so we don't need to
      take i_mutex when writing to quota files. Other places where we take i_mutex
      on quota file can accomodate standard i_mutex lock ranking, we only need
      to change the lock ranking to be dqonoff_mutex > i_mutex which is a matter
      of changing documentation because there's no place which would enforce
      ordering in the other direction.
      Signed-off-by: NJan Kara <jack@suse.cz>
      a80b12c3
    • J
      quota: Use precomputed value of sb_dqopt in dquot_quota_sync · f9ef1784
      Jan Kara 提交于
      Signed-off-by: NJan Kara <jack@suse.cz>
      f9ef1784
    • J
      ext2: Remove i_mutex use from ext2_quota_write() · e2a3fde7
      Jan Kara 提交于
      We don't need i_mutex in ext2_quota_write() because writes to quota file
      are serialized by dqio_mutex anyway. Changes to quota files outside of quota
      code are forbidded and enforced by NOATIME and IMMUTABLE bits.
      Signed-off-by: NJan Kara <jack@suse.cz>
      e2a3fde7
    • J
      reiserfs: Remove i_mutex use from reiserfs_quota_write() · 67f1648d
      Jan Kara 提交于
      We don't need i_mutex in reiserfs_quota_write() because writes to quota file
      are serialized by dqio_mutex anyway. Changes to quota files outside of quota
      code are forbidded and enforced by NOATIME and IMMUTABLE bits.
      Signed-off-by: NJan Kara <jack@suse.cz>
      67f1648d
    • J
      ext4: Remove i_mutex use from ext4_quota_write() · 0b7f7cef
      Jan Kara 提交于
      We don't need i_mutex in ext4_quota_write() because writes to quota file
      are serialized by dqio_mutex anyway. Changes to quota files outside of quota
      code are forbidded and enforced by NOATIME and IMMUTABLE bits.
      Signed-off-by: NJan Kara <jack@suse.cz>
      0b7f7cef
    • J
      ext3: Remove i_mutex use from ext3_quota_write() · 905c3937
      Jan Kara 提交于
      We don't need i_mutex in ext3_quota_write() because writes to quota file
      are serialized by dqio_mutex anyway. Changes to quota files outside of quota
      code are forbidded and enforced by NOATIME and IMMUTABLE bits.
      Signed-off-by: NJan Kara <jack@suse.cz>
      905c3937
    • J
      quota: Fix double lock in add_dquot_ref() with CONFIG_QUOTA_DEBUG · d7e97117
      Jan Kara 提交于
      When CONFIG_QUOTA_DEBUG is enabled we call inode_get_rsv_space() from
      add_dquot_ref() while holding i_lock. But inode_get_rsv_space() is trying
      to get i_lock as well resulting in double lock.
      
      Fix the problem by moving inode_get_rsv_space() call out of i_lock.
      Reported-and-analyzed-by: NJie Liu <jeff.liu@oracle.com>
      Signed-off-by: NJan Kara <jack@suse.cz>
      d7e97117
    • J
      jbd: Write journal superblock with WRITE_FUA after checkpointing · fd2cbd4d
      Jan Kara 提交于
      If journal superblock is written only in disk's caches and other transaction
      starts reusing space of the transaction cleaned from the log, it can happen
      blocks of a new transaction reach the disk before journal superblock. When
      power failure happens in such case, subsequent journal replay would still try
      to replay the old transaction but some of it's blocks may be already
      overwritten by the new transaction. For this reason we must use WRITE_FUA when
      updating log tail and we must first write new log tail to disk and update
      in-memory information only after that.
      Signed-off-by: NJan Kara <jack@suse.cz>
      fd2cbd4d
    • J
      jbd: protect all log tail updates with j_checkpoint_mutex · 1ce8486d
      Jan Kara 提交于
      There are some log tail updates that are not protected by j_checkpoint_mutex.
      Some of these are harmless because they happen during startup or shutdown but
      updates in journal_commit_transaction() and journal_flush() can really race
      with other log tail updates (e.g. someone doing journal_flush() with someone
      running cleanup_journal_tail()). So protect all log tail updates with
      j_checkpoint_mutex.
      Signed-off-by: NJan Kara <jack@suse.cz>
      1ce8486d
    • J
      jbd: Split updating of journal superblock and marking journal empty · 9754e39c
      Jan Kara 提交于
      There are three case of updating journal superblock. In the first case, we want
      to mark journal as empty (setting s_sequence to 0), in the second case we want
      to update log tail, in the third case we want to update s_errno. Split these
      cases into separate functions. It makes the code slightly more straightforward
      and later patches will make the distinction even more important.
      Signed-off-by: NJan Kara <jack@suse.cz>
      9754e39c
  2. 11 4月, 2012 10 次提交
  3. 10 4月, 2012 10 次提交
  4. 08 4月, 2012 5 次提交
  5. 07 4月, 2012 5 次提交