1. 05 9月, 2009 5 次提交
  2. 28 8月, 2009 1 次提交
  3. 21 8月, 2009 2 次提交
  4. 18 8月, 2009 3 次提交
  5. 11 8月, 2009 1 次提交
    • J
      ocfs2: Fix possible deadlock when extending quota file · b409d7a0
      Jan Kara 提交于
      In OCFS2, allocator locks rank above transaction start. Thus we
      cannot extend quota file from inside a transaction less we could
      deadlock.
      
      We solve the problem by starting transaction not already in
      ocfs2_acquire_dquot() but only in ocfs2_local_read_dquot() and
      ocfs2_global_read_dquot() and we allocate blocks to quota files before starting
      the transaction.  In case we crash, quota files will just have a few blocks
      more but that's no problem since we just use them next time we extend the
      quota file.
      Signed-off-by: NJan Kara <jack@suse.cz>
      Signed-off-by: NJoel Becker <joel.becker@oracle.com>
      b409d7a0
  6. 08 8月, 2009 2 次提交
  7. 01 8月, 2009 1 次提交
  8. 31 7月, 2009 1 次提交
  9. 24 7月, 2009 8 次提交
  10. 22 7月, 2009 2 次提交
    • J
      ocfs2: Fix deadlock on umount · f7b1aa69
      Jan Kara 提交于
      In commit ea455f8a, we moved the dentry lock
      put process into ocfs2_wq. This causes problems during umount because ocfs2_wq
      can drop references to inodes while they are being invalidated by
      invalidate_inodes() causing all sorts of nasty things (invalidate_inodes()
      ending in an infinite loop, "Busy inodes after umount" messages etc.).
      
      We fix the problem by stopping ocfs2_wq from doing any further releasing of
      inode references on the superblock being unmounted, wait until it finishes
      the current round of releasing and finally cleaning up all the references in
      dentry_lock_list from ocfs2_put_super().
      
      The issue was tracked down by Tao Ma <tao.ma@oracle.com>.
      Signed-off-by: NJan Kara <jack@suse.cz>
      Signed-off-by: NJoel Becker <joel.becker@oracle.com>
      f7b1aa69
    • T
      ocfs2: Add extra credits and access the modified bh in update_edge_lengths. · 3c5e1068
      Tao Ma 提交于
      In normal tree rotation left process, we will never touch the tree
      branch above subtree_index and ocfs2_extend_rotate_transaction doesn't
      reserve the credits for them either.
      
      But when we want to delete the rightmost extent block, we have to update
      the rightmost records for all the rightmost branch(See
      ocfs2_update_edge_lengths), so we have to allocate extra credits for them.
      What's more, we have to access them also.
      Signed-off-by: NTao Ma <tao.ma@oracle.com>
      Signed-off-by: NJoel Becker <joel.becker@oracle.com>
      3c5e1068
  11. 21 7月, 2009 4 次提交
  12. 11 7月, 2009 1 次提交
  13. 09 7月, 2009 5 次提交
  14. 08 7月, 2009 1 次提交
    • J
      quota: Fix possible deadlock during parallel quotaon and quotaoff · d01730d7
      Jiaying Zhang 提交于
      The following test script triggers a deadlock on ext2 filesystem:
      while true; do quotaon /dev/hda >&/dev/null; usleep $RANDOM; done &
      while true; do quotaoff /dev/hda >&/dev/null; usleep $RANDOM; done &
      
      I found there is a potential deadlock between quotaon and quotaoff (or
      quotasync). Basically, all of quotactl operations need to be protected by
      dqonoff_mutex. vfs_quota_off and vfs_quota_sync also call sb->s_op->quota_write
      that needs to grab the i_mutex of the quota file.  But in vfs_quota_on_inode
      (called from quotaon operation), the current code tries to grab  the i_mutex of
      the quota file first before getting quonoff_mutex.
      
      Reverse the order in which we take locks in vfs_quota_on_inode().
      
      Jan Kara: Changed changelog to be more readable, made lockdep happy with
        I_MUTEX_QUOTA.
      Signed-off-by: NJiaying Zhang <jiayingz@google.com>
      Signed-off-by: NJan Kara <jack@suse.cz>
      d01730d7
  15. 07 7月, 2009 2 次提交
    • O
      cred_guard_mutex: do not return -EINTR to user-space · 793285fc
      Oleg Nesterov 提交于
      do_execve() and ptrace_attach() return -EINTR if
      mutex_lock_interruptible(->cred_guard_mutex) fails.
      
      This is not right, change the code to return ERESTARTNOINTR.
      
      Perhaps we should also change proc_pid_attr_write().
      Signed-off-by: NOleg Nesterov <oleg@redhat.com>
      Cc: David Howells <dhowells@redhat.com>
      Acked-by: NRoland McGrath <roland@redhat.com>
      Cc: James Morris <jmorris@namei.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      793285fc
    • Z
      sys_sync(): fix 16% performance regression in ffsb create_4k test · 3beab0b4
      Zhang, Yanmin 提交于
      I run many ffsb test cases on JBODs (typically 13/12 disks).  Comparing
      with kernel 2.6.30, 2.6.31-rc1 has about 16% regression with
      ffsb_create_4k.  The sub test case creates files continuously for 10
      minitues and every file is 1MB.
      
      Bisect located below patch.
      
      5cee5815 is first bad commit
      commit 5cee5815
      Author: Jan Kara <jack@suse.cz>
      Date:   Mon Apr 27 16:43:51 2009 +0200
      
          vfs: Make sys_sync() use fsync_super() (version 4)
      
          It is unnecessarily fragile to have two places (fsync_super() and do_sync())
          doing data integrity sync of the filesystem. Alter __fsync_super() to
          accommodate needs of both callers and use it. So after this patch
          __fsync_super() is the only place where we gather all the calls needed to
          properly send all data on a filesystem to disk.
      
      As a matter of fact, ffsb calls sys_sync in the end to make sure all data
      is flushed to disks and the flushing is counted into the result.  vmstat
      shows ffsb is blocked when syncing for a long time.  With 2.6.30, ffsb is
      blocked for a short time.
      
      I checked the patch and did experiments to recover the original methods.
      Eventually, the root cause is the patch deletes the calling to
      wakeup_pdflush when syncing, so only ffsb is blocked on disk I/O.
      wakeup_pdflush could ask pdflush to write back pages with ffsb at the
      same time.
      
      [akpm@linux-foundation.org: restore comment too]
      Signed-off-by: NZhang Yanmin <yanmin_zhang@linux.intel.com>
      Cc: Jan Kara <jack@suse.cz>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Acked-by: NJens Axboe <jens.axboe@oracle.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      3beab0b4
  16. 03 7月, 2009 1 次提交
    • D
      NFSD: Don't hold unrefcounted creds over call to nfsd_setuser() · 033a666c
      David Howells 提交于
      nfsd_open() gets an unrefcounted pointer to the current process's effective
      credentials at the top of the function, then calls nfsd_setuser() via
      fh_verify() - which may replace and destroy the current process's effective
      credentials - and then passes the unrefcounted pointer to dentry_open() - but
      the credentials may have been destroyed by this point.
      
      Instead, the value from current_cred() should be passed directly to
      dentry_open() as one of its arguments, rather than being cached in a variable.
      
      Possibly fh_verify() should return the creds to use.
      
      This is a regression introduced by
      745ca247 "CRED: Pass credentials through
      dentry_open()".
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Tested-and-Verified-By: NSteve Dickson <steved@redhat.com>
      Cc: stable@kernel.org
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      033a666c