1. 20 7月, 2012 1 次提交
  2. 05 5月, 2012 1 次提交
    • T
      NFS: Fix sparse warnings · 1385b811
      Trond Myklebust 提交于
      Fix the following sparse warnings:
      
      fs/nfs/direct.c:221:6: warning: symbol 'nfs_direct_readpage_release' was
      not declared. Should it be static?
      fs/nfs/read.c:38:43: warning: non-ANSI function declaration of function
      'nfs_readhdr_alloc'
      fs/nfs/objlayout/objio_osd.c:214:5: warning: symbol '__alloc_objio_seg'
      was not declared. Should it be static?
      Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      Cc: Fred Isaman <iisaman@netapp.com>
      Cc: Boaz Harrosh <bharrosh@panasas.com>
      1385b811
  3. 28 4月, 2012 1 次提交
    • F
      NFS: create common nfs_pgio_header for both read and write · cd841605
      Fred Isaman 提交于
      In order to avoid duplicating all the data in nfs_read_data whenever we
      split it up into multiple RPC calls (either due to a short read result
      or due to rsize < PAGE_SIZE), we split out the bits that are the same
      per RPC call into a separate "header" structure.
      
      The goal this patch moves towards is to have a single header
      refcounted by several rpc_data structures.  Thus, want to always refer
      from rpc_data to the header, and not the other way.  This patch comes
      close to that ideal, but the directio code currently needs some
      special casing, isolated in the nfs_direct_[read_write]hdr_release()
      functions.  This will be dealt with in a future patch.
      Signed-off-by: NFred Isaman <iisaman@netapp.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      cd841605
  4. 21 3月, 2012 1 次提交
    • S
      pnfs-obj: autologin: Add support for protocol autologin · 18d98f6c
      Sachin Bhamare 提交于
      The pnfs-objects protocol mandates that we autologin into devices not
      present in the system, according to information specified in the
      get_device_info returned from the server.
      
      The Protocol specifies two login hints.
      1. An IP address:port combination
      2. A string URI which is constructed as a URL with a protocol prefix
         followed by :// and a string as address. For each  protocol prefix
         the string-address format might be different.
      
      We only support the second option. The first option is just redundant
      to the second one.
      NOTE: The Kernel part of autologin does not parse the URI string. It
      just channels it to a user-mode script. So any new login protocols should
      only update the user-mode script which is a part of the nfs-utils package,
      but the Kernel need not change.
      
      We implement the autologin by using the call_usermodehelper() API.
      (Thanks to Steve Dickson <steved@redhat.com> for pointing it out)
      So there is no running daemon needed, and/or special setup.
      
      We Add the osd_login_prog Kernel module parameters which defaults to:
      	/sbin/osd_login
      
      Kernel try's to upcall the program specified in osd_login_prog. If the file is
      not found or the execution fails Kernel will disable any farther upcalls, by
      zeroing out  osd_login_prog, Until Admin re-enables it by setting the
      osd_login_prog parameter to a proper program.
      
      Also add text about the osd_login program command line API to:
      	Documentation/filesystems/nfs/pnfs.txt
      and documentation of the new  osd_login_prog  module parameter to:
      	Documentation/kernel-parameters.txt
      
      TODO: Add timeout option in the case osd_login program gets
                    stuck
      Signed-off-by: NSachin Bhamare <sbhamare@panasas.com>
      Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      18d98f6c
  5. 14 3月, 2012 1 次提交
    • B
      pnfs-obj: Uglify objio_segment allocation for the sake of the principle :-( · 5318a29c
      Boaz Harrosh 提交于
      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: NBoaz Harrosh <bharrosh@panasas.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      5318a29c
  6. 07 2月, 2012 1 次提交
  7. 06 1月, 2012 1 次提交
    • B
      pnfs-obj: Must return layout on IO error · fe0fe835
      Boaz Harrosh 提交于
      As mandated by the standard. In case of an IO error, a pNFS
      objects layout driver must return it's layout. This is because
      all device errors are reported to the server as part of the
      layout return buffer.
      
      This is implemented the same way PNFS_LAYOUTRET_ON_SETATTR
      is done, through a bit flag on the pnfs_layoutdriver_type->flags
      member. The flag is set by the layout driver that wants a
      layout_return preformed at pnfs_ld_{write,read}_done in case
      of an error.
      (Though I have not defined a wrapper like pnfs_ld_layoutret_on_setattr
       because this code is never called outside of pnfs.c and pnfs IO
       paths)
      
      Without this patch 3.[0-2] Kernels leak memory and have an annoying
      WARN_ON after every IO error utilizing the pnfs-obj driver.
      
      [This patch is for 3.2 Kernel. 3.1/0 Kernels need a different patch]
      CC: Stable Tree <stable@kernel.org>
      Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      fe0fe835
  8. 03 11月, 2011 7 次提交
  9. 04 8月, 2011 2 次提交
    • B
      pnfs-obj: Fix the comp_index != 0 case · 9af7db32
      Boaz Harrosh 提交于
      There were bugs in the case of partial layout where olo_comp_index
      is not zero. This used to work and was tested but one of the later
      cleanup SQUASHMEs broke it and was not tested since.
      
      Also add a dprint that specify those received layout parameters.
      Everything else was already printed.
      
      [Needed in v3.0]
      CC: Stable Tree <stable@kernel.org>
      Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      9af7db32
    • B
      pnfs-obj: Bug when we are running out of bio · 20618b21
      Boaz Harrosh 提交于
      When we have a situation that the number of pages we want
      to encode is bigger then the size of the bio. (Which can
      currently happen only when all IO is going to a single device
      .e.g group_width==1) then the IO is submitted short and we
      report back only the amount of bytes we actually wrote/read
      and all is fine. BUT ...
      
      There was a bug that the current length counter was advanced
      before the fail to add the extra page, and we come to a situation
      that the CDB length was one-page longer then the actual bio size,
      which is of course rejected by the osd-target.
      
      While here also fix the bio size calculation, in the case
      that we received more then one group of devices.
      
      CC: Stable Tree <stable@kernel.org>
      Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      20618b21
  10. 16 7月, 2011 1 次提交
  11. 15 7月, 2011 2 次提交
  12. 13 7月, 2011 3 次提交
  13. 21 6月, 2011 1 次提交
    • T
      NFSv4.1: Fix some issues with pnfs_generic_pg_test · 8f7d5efb
      Trond Myklebust 提交于
      1. If the intention is to coalesce requests 'prev' and 'req' then we
         have to ensure at least that we have a layout starting at
         req_offset(prev).
      
      2. If we're only requesting a minimal layout of length desc->pg_count,
         we need to test the length actually returned by the server before
         we allow the coalescing to occur.
      
      3. We need to deal correctly with (pgio->lseg == NULL)
      
      4. Fixup the test guarding the pnfs_update_layout.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      8f7d5efb
  14. 20 6月, 2011 1 次提交
  15. 30 5月, 2011 11 次提交
  16. 05 1月, 2011 2 次提交
  17. 10 5月, 2007 1 次提交
  18. 17 2月, 2007 1 次提交
  19. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4