1. 18 Oct, 2011 6 commits
    • Jim Rees's avatar
      pnfsblock: fix return code confusion · 516f2e24
      Jim Rees authored
      Always return PTR_ERR, not NULL, from nfs4_blk_get_deviceinfo and
      nfs4_blk_decode_device.
      
      Check for IS_ERR, not NULL, in bl_set_layoutdriver when calling
      nfs4_blk_get_deviceinfo.
      Signed-off-by: default avatarJim Rees <rees@umich.edu>
      Signed-off-by: default avatarBenny Halevy <bhalevy@tonian.com>
      Cc: stable@kernel.org [3.0]
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      516f2e24
    • Jeff Layton's avatar
      nfs: don't try to migrate pages with active requests · 2da95652
      Jeff Layton authored
      nfs_find_and_lock_request will take a reference to the nfs_page and
      will then put it if the req is already locked. It's possible though
      that the reference will be the last one. That put then can kick off
      a whole series of reference puts:
      
      nfs_page
         nfs_open_context
            dentry
                inode
      
      If the inode ends up being deleted, then the VFS will call
      truncate_inode_pages. That function will try to take the page lock, but
      it was already locked when migrate_page was called. The code
      deadlocks.
      
      Fix this by simply refusing the migration request if PagePrivate is
      already set, indicating that the page is already associated with an
      active read or write request.
      
      We've had a customer test a backported version of this patch and
      the preliminary results seem good.
      
      Cc: stable@kernel.org
      Cc: Andrea Arcangeli <aarcange@redhat.com>
      Reported-by: default avatarHarshula Jayasuriya <harshula@redhat.com>
      Signed-off-by: default avatarJeff Layton <jlayton@redhat.com>
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      2da95652
    • Mi Jinlong's avatar
      nfs: fix bug about IPv6 address scope checking · b9dd3abb
      Mi Jinlong authored
      The result from ipv6_addr_scope() always not be a single SCOPE,
      so we can't use equal to compare the result with IPV6_ADDR_SCOPE_LINKLOCAL
      at nfs_sockaddr_match_ipaddr6.
      
      This patch fixs the problem, and lets checking address before scope_id.
      Signed-off-by: default avatarMi Jinlong <mijinlong@cn.fujitsu.com>
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      b9dd3abb
    • Jeff Layton's avatar
      nfs: don't redirty inode when ncommit == 0 in nfs_commit_unstable_pages · 3236c3e1
      Jeff Layton authored
      commit 420e3646 allowed the kernel to reduce the number of unnecessary
      commit calls by skipping the commit when there are a large number of
      outstanding pages.
      
      However, the current test in nfs_commit_unstable_pages does not handle
      the edge condition properly. When ncommit == 0, then that means that the
      kernel doesn't need to do anything more for the inode. The current test
      though in the WB_SYNC_NONE case will return true, and the inode will end
      up being marked dirty. Once that happens the inode will never be clean
      until there's a WB_SYNC_ALL flush.
      
      Fix this by immediately returning from nfs_commit_unstable_pages when
      ncommit == 0.
      
      Mike noticed this problem initially in RHEL5 (2.6.18-based kernel) which
      has a backported version of 420e3646. The inode cache there was growing
      very large. The inode cache was unable to be shrunk since the inodes
      were all marked dirty. Calling sync() would essentially "fix" the
      problem -- the WB_SYNC_ALL flush would result in the inodes all being
      marked clean.
      
      What I'm not clear on is how big a problem this is in mainline kernels
      as the writeback code there is very different. Either way, it seems
      incorrect to re-mark the inode dirty in this case.
      Reported-by: default avatarMike McLean <mikem@redhat.com>
      Signed-off-by: default avatarJeff Layton <jlayton@redhat.com>
      Cc: stable@kernel.org [2.6.34+]
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      3236c3e1
    • Trond Myklebust's avatar
      Revert "NFS: Ensure that writeback_single_inode() calls write_inode() when syncing" · 59b7c05f
      Trond Myklebust authored
      This reverts commit b80c3cb6.
      
      The reverted commit was rendered obsolete by a VFS fix: commit
      5547e8aa (writeback: Update dirty flags in
      two steps). We now no longer need to worry about writeback_single_inode()
      missing our marking the inode for COMMIT in 'do_writepages()' call.
      
      Reverting this patch, fixes a performance regression in which the inode
      would continuously get queued to the dirty list, causing the writeback
      code to unnecessarily try to send a COMMIT.
      
      Signed-off-by: Trond Myklebust <Trond.Myklebust>
      Tested-by: default avatarSimon Kirby <sim@hostway.ca>
      Cc: stable@kernel.org [2.6.35+]
      59b7c05f
    • Linus Torvalds's avatar
      Linux 3.1-rc10 · 899e3ee4
      Linus Torvalds authored
      899e3ee4
  2. 17 Oct, 2011 1 commit
    • Linus Torvalds's avatar
      Avoid using variable-length arrays in kernel/sys.c · a84a79e4
      Linus Torvalds authored
      The size is always valid, but variable-length arrays generate worse code
      for no good reason (unless the function happens to be inlined and the
      compiler sees the length for the simple constant it is).
      
      Also, there seems to be some code generation problem on POWER, where
      Henrik Bakken reports that register r28 can get corrupted under some
      subtle circumstances (interrupt happening at the wrong time?).  That all
      indicates some seriously broken compiler issues, but since variable
      length arrays are bad regardless, there's little point in trying to
      chase it down.
      
      "Just don't do that, then".
      Reported-by: default avatarHenrik Grindal Bakken <henribak@cisco.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: stable@kernel.org
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      a84a79e4
  3. 16 Oct, 2011 1 commit
  4. 15 Oct, 2011 3 commits
  5. 14 Oct, 2011 6 commits
  6. 13 Oct, 2011 7 commits
  7. 11 Oct, 2011 5 commits
  8. 10 Oct, 2011 11 commits