1. 28 4月, 2012 4 次提交
    • F
      NFS: merge _full and _partial write rpc_ops · 6c75dc0d
      Fred Isaman 提交于
      Decouple nfs_pgio_header and nfs_write_data, and have (possibly
      multiple) nfs_write_datas each take a refcount on nfs_pgio_header.
      
      For the moment keeps nfs_write_header as a way to preallocate a single
      nfs_write_data with the nfs_pgio_header.  The code doesn't need this,
      and would be prettier without, but given the amount of churn I am
      already introducing I didn't want to play with tuning new mempools.
      
      This also fixes bug in pnfs_ld_handle_write_error.  In the case of
      desc->pg_bsize < PAGE_CACHE_SIZE, the pages list was empty, causing
      replay attempt to do nothing.
      Signed-off-by: NFred Isaman <iisaman@netapp.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      6c75dc0d
    • F
      NFS: merge _full and _partial read rpc_ops · 4db6e0b7
      Fred Isaman 提交于
      Decouple nfs_pgio_header and nfs_read_data, and have (possibly
      multiple) nfs_read_datas each take a refcount on nfs_pgio_header.
      
      For the moment keeps nfs_read_header as a way to preallocate a single
      nfs_read_data with the nfs_pgio_header.  The code doesn't need this,
      and would be prettier without, but given the amount of churn I am
      already introducing I didn't want to play with tuning new mempools.
      
      This also fixes bug in pnfs_ld_handle_read_error.  In the case of
      desc->pg_bsize < PAGE_CACHE_SIZE, the pages list was empty, causing
      replay attempt to do nothing.
      Signed-off-by: NFred Isaman <iisaman@netapp.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      4db6e0b7
    • 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
    • F
      NFS4.1: make pnfs_ld_[read|write]_done consistent · 1acbbb4e
      Fred Isaman 提交于
      The two functions had diverged quite a bit, with the write function
      being a bit more robust than the read.
      
      However, these still break badly in the desc->pg_bsize < PAGE_CACHE_SIZE case,
      as then there is nothing hanging on the data->pages list, and the resend
      ends up doing nothing.  This will be fixed in a patch later in the series.
      Signed-off-by: NFred Isaman <iisaman@netapp.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      1acbbb4e
  2. 27 4月, 2012 1 次提交
  3. 17 3月, 2012 1 次提交
    • T
      NFSv4.1: Clean ups and bugfixes for the pNFS read/writeback/commit code · 8dd37758
      Trond Myklebust 提交于
      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: NTrond Myklebust <Trond.Myklebust@netapp.com>
      Cc: Fred Isaman <iisaman@netapp.com>
      8dd37758
  4. 06 3月, 2012 2 次提交
  5. 02 3月, 2012 1 次提交
    • T
      NFSv4.1: Get rid of redundant NFS4CLNT_LAYOUTRECALL tests · a59c30ac
      Trond Myklebust 提交于
      The NFS4CLNT_LAYOUTRECALL tests in pnfs_layout_process and
      pnfs_update_layout are redundant.
      
      In the case of a bulk layout recall, we're always testing for
      the NFS_LAYOUT_BULK_RECALL flay anyway.
      In the case of a file or segment recall, the call to
      pnfs_set_layout_stateid() updates the layout_header 'barrier'
      sequence id, which triggers the test in pnfs_layoutgets_blocked()
      and is less race-prone than NFS4CLNT_LAYOUTRECALL anyway.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      a59c30ac
  6. 07 2月, 2012 1 次提交
  7. 01 2月, 2012 1 次提交
  8. 06 1月, 2012 2 次提交
    • T
      NFS: Remove pNFS bloat from the generic write path · e2fecb21
      Trond Myklebust 提交于
      We have no business doing any this in the standard write release path.
      Get rid of it, and put it in the pNFS layer.
      
      Also, while we're at it, get rid of the completely bogus unlock/relock
      semantics that were present in nfs_writeback_release_full(). It is
      not only unnecessary, but actually dangerous to release the write lock
      just in order to take it again in nfs_page_async_flush(). Better just
      to open code the pgio operations in a pnfs helper.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      e2fecb21
    • 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
  9. 11 11月, 2011 1 次提交
  10. 01 11月, 2011 1 次提交
    • P
      fs: add module.h to files that were implicitly using it · 143cb494
      Paul Gortmaker 提交于
      Some files were using the complete module.h infrastructure without
      actually including the header at all.  Fix them up in advance so
      once the implicit presence is removed, we won't get failures like this:
      
        CC [M]  fs/nfsd/nfssvc.o
      fs/nfsd/nfssvc.c: In function 'nfsd_create_serv':
      fs/nfsd/nfssvc.c:335: error: 'THIS_MODULE' undeclared (first use in this function)
      fs/nfsd/nfssvc.c:335: error: (Each undeclared identifier is reported only once
      fs/nfsd/nfssvc.c:335: error: for each function it appears in.)
      fs/nfsd/nfssvc.c: In function 'nfsd':
      fs/nfsd/nfssvc.c:555: error: implicit declaration of function 'module_put_and_exit'
      make[3]: *** [fs/nfsd/nfssvc.o] Error 1
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      143cb494
  11. 31 10月, 2011 1 次提交
  12. 19 10月, 2011 3 次提交
  13. 01 8月, 2011 5 次提交
  14. 15 7月, 2011 3 次提交
  15. 13 7月, 2011 7 次提交
  16. 21 6月, 2011 2 次提交
  17. 16 6月, 2011 2 次提交
  18. 15 6月, 2011 2 次提交