1. 28 4月, 2012 1 次提交
    • 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
  2. 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
  3. 11 3月, 2012 2 次提交
  4. 20 10月, 2011 1 次提交
  5. 15 7月, 2011 4 次提交
  6. 13 7月, 2011 2 次提交
  7. 21 6月, 2011 1 次提交
  8. 30 5月, 2011 1 次提交
  9. 27 3月, 2011 1 次提交
    • T
      NFS: Fix a hang in the writeback path · 4d65c520
      Trond Myklebust 提交于
      Now that the inode scalability patches have been merged, it is no longer
      safe to call igrab() under the inode->i_lock.
      Now that we no longer call nfs_clear_request() until the nfs_page is
      being freed, we know that we are always holding a reference to the
      nfs_open_context, which again holds a reference to the path, and so
      the inode cannot be freed until the last nfs_page has been removed
      from the radix tree and freed.
      
      We can therefore skip the igrab()/iput() altogether.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      4d65c520
  10. 24 3月, 2011 1 次提交
    • F
      NFSv4.1: add generic layer hooks for pnfs COMMIT · a861a1e1
      Fred Isaman 提交于
      We create three major hooks for the pnfs code.
      
      pnfs_mark_request_commit() is called during writeback_done from
      nfs_mark_request_commit, which gives the driver an opportunity to
      claim it wants control over commiting a particular req.
      
      pnfs_choose_commit_list() is called from nfs_scan_list
      to choose which list a given req should be added to, based on
      where we intend to send it for COMMIT.  It is up to the driver
      to have preallocated list headers for each destination it may need.
      
      pnfs_commit_list() is how the driver actually takes control, it is
      used instead of nfs_commit_list().
      
      In order to pass information between the above functions, we create
      a union in nfs_page to hold a lseg (which is possible because the req is
      not on any list while in transition), and add some flags to indicate
      if we need to use the pnfs code.
      Signed-off-by: NFred Isaman <iisaman@netapp.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      a861a1e1
  11. 22 3月, 2011 1 次提交
  12. 12 3月, 2011 3 次提交
  13. 08 12月, 2010 1 次提交
    • T
      nfs: remove extraneous and problematic calls to nfs_clear_request · 2df485a7
      Trond Myklebust 提交于
      When a nfs_page is freed, nfs_free_request is called which also calls
      nfs_clear_request to clean out the lock and open contexts and free the
      pagecache page.
      
      However, a couple of places in the nfs code call nfs_clear_request
      themselves. What happens here if the refcount on the request is still high?
      We'll be releasing contexts and freeing pointers while the request is
      possibly still in use.
      
      Remove those bare calls to nfs_clear_context. That should only be done when
      the request is being freed.
      
      Note that when doing this, we need to watch out for tests of req->wb_page.
      Previously, nfs_set_page_tag_locked() and nfs_clear_page_tag_locked()
      would check the value of req->wb_page to figure out if the page is mapped
      into the nfsi->nfs_page_tree. We now indicate the page is mapped using
      the new bit PG_MAPPED in req->wb_flags .
      Reported-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      2df485a7
  14. 31 7月, 2010 1 次提交
  15. 10 7月, 2008 1 次提交
    • T
      NFS: Allow redirtying of a completed unstable write. · e468bae9
      Trond Myklebust 提交于
      Currently, if an unstable write completes, we cannot redirty the page in
      order to reflect a new change in the page data until after we've sent a
      COMMIT request.
      
      This patch allows a page rewrite to proceed without the unnecessary COMMIT
      step, putting it immediately back onto the dirty page list, undoing the
      VM unstable write accounting, and removing the NFS_PAGE_TAG_COMMIT tag from
      the NFS radix tree.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      e468bae9
  16. 30 1月, 2008 1 次提交
  17. 10 10月, 2007 1 次提交
  18. 11 7月, 2007 4 次提交
  19. 24 5月, 2007 1 次提交
    • T
      NFS: Avoid a deadlock situation on write · 7fe7f848
      Trond Myklebust 提交于
      When processes are allowed to attempt to lock a non-contiguous range of nfs
      write requests, it is possible for generic_writepages to 'wrap round' the
      address space, and call writepage() on a request that is already locked by
      the same process.
      
      We avoid the deadlock by checking if the page index is contiguous with the
      list of nfs write requests that is already held in our
      nfs_pageio_descriptor prior to attempting to lock a new request.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      7fe7f848
  20. 01 5月, 2007 6 次提交
  21. 21 4月, 2007 1 次提交
  22. 15 4月, 2007 1 次提交
  23. 06 12月, 2006 3 次提交