1. 17 Mar, 2012 1 commit
    • Trond Myklebust's avatar
      NFSv4.1: Clean ups and bugfixes for the pNFS read/writeback/commit code · 8dd37758
      Trond Myklebust authored
      Move more pnfs-isms out of the generic commit code.
      
      Bugfixes:
      
      - filelayout_scan_commit_lists doesn't need to get/put the lseg.
        In fact since it is run under the inode->i_lock, the lseg_put()
        can deadlock.
      
      - Ensure that we distinguish between what needs to be done for
        commit-to-data server and what needs to be done for commit-to-MDS
        using the new flag PG_COMMIT_TO_DS. Otherwise we may end up calling
        put_lseg() on a bucket for a struct nfs_page that got written
        through the MDS.
      
      - Fix a case where we were using list_del() on an nfs_page->wb_list
        instead of list_del_init().
      
      - filelayout_initiate_commit needs to call filelayout_commit_release
        on error instead of the mds_ops->rpc_release(). Otherwise it won't
        clear the commit lock.
      
      Cleanups:
      
      - Let the files layout manage the commit lists for the pNFS case.
        Don't expose stuff like pnfs_choose_commit_list, and the fact
        that the commit buckets hold references to the layout segment
        in common code.
      
      - Cast out the put_lseg() calls for the struct nfs_read/write_data->lseg
        into the pNFS layer from whence they came.
      
      - Let the pNFS layer manage the NFS_INO_PNFS_COMMIT bit.
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      Cc: Fred Isaman <iisaman@netapp.com>
      8dd37758
  2. 15 Mar, 2012 1 commit
  3. 14 Mar, 2012 2 commits
    • William Dauchy's avatar
      NFSv4: Rate limit the state manager for lock reclaim warning messages · 96dcadc2
      William Dauchy authored
      Adding rate limit on `Lock reclaim failed` messages since it could fill
      up system logs
      Signed-off-by: default avatarWilliam Dauchy <wdauchy@gmail.com>
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      96dcadc2
    • Boaz Harrosh's avatar
      pnfs-obj: Uglify objio_segment allocation for the sake of the principle :-( · 5318a29c
      Boaz Harrosh authored
      At some past instance Linus Trovalds wrote:
      > From: Linus Torvalds <torvalds@linux-foundation.org>
      > commit a84a79e4 upstream.
      >
      > 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".
      
      Since then any use of "variable length arrays" has become blasphemous.
      Even in perfectly good, beautiful, perfectly safe code like the one
      below where the variable length arrays are only used as a sizeof()
      parameter, for type-safe dynamic structure allocations. GCC is not
      executing any stack allocation code.
      
      I have produced a small file which defines two functions main1(unsigned numdevs)
      and main2(unsigned numdevs). main1 uses code as before with call to malloc
      and main2 uses code as of after this patch. I compiled it as:
      	gcc -O2 -S see_asm.c
      and here is what I get:
      
      <see_asm.s>
      main1:
      .LFB7:
      	.cfi_startproc
      	mov	%edi, %edi
      	leaq	4(%rdi,%rdi), %rdi
      	salq	$3, %rdi
      	jmp	malloc
      	.cfi_endproc
      .LFE7:
      	.size	main1, .-main1
      	.p2align 4,,15
      	.globl	main2
      	.type	main2, @function
      main2:
      .LFB8:
      	.cfi_startproc
      	mov	%edi, %edi
      	addq	$2, %rdi
      	salq	$4, %rdi
      	jmp	malloc
      	.cfi_endproc
      .LFE8:
      	.size	main2, .-main2
      	.section	.text.startup,"ax",@progbits
      	.p2align 4,,15
      </see_asm.s>
      
      *Exact* same code !!!
      
      So please seriously consider not accepting this patch and leave the
      perfectly good code intact.
      
      CC: Linus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarBoaz Harrosh <bharrosh@panasas.com>
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      5318a29c
  4. 13 Mar, 2012 1 commit
  5. 12 Mar, 2012 4 commits
  6. 11 Mar, 2012 4 commits
  7. 10 Mar, 2012 3 commits
  8. 09 Mar, 2012 2 commits
  9. 08 Mar, 2012 1 commit
  10. 07 Mar, 2012 5 commits
  11. 06 Mar, 2012 16 commits