03 Aug, 2012

1 commit


29 Jun, 2012

1 commit


10 May, 2012

3 commits

  • Function rename to ensure that the functionality of nfs_unlock_request()
    mirrors that of nfs_lock_request(). Then let nfs_unlock_and_release_request()
    do the work of what used to be called nfs_unlock_request()...

    Signed-off-by: Trond Myklebust
    Cc: Fred Isaman

    Trond Myklebust
     
  • We only have two places where we need to grab a reference when trying
    to lock the nfs_page. We're better off making that explicit.

    Signed-off-by: Trond Myklebust
    Cc: Fred Isaman

    Trond Myklebust
     
  • We have to unlock the nfs_page before we call nfs_end_page_writeback
    to avoid races with functions that expect the page to be unlocked
    when PG_locked and PG_writeback are not set.
    The problem is that nfs_unlock_request also releases the nfs_page,
    causing a deadlock if the release of the nfs_open_context
    triggers an iput() while the PG_writeback flag is still set...

    The solution is to separate the unlocking and release of the nfs_page,
    so that we can do the former before nfs_end_page_writeback and the
    latter after.

    Signed-off-by: Trond Myklebust
    Cc: Fred Isaman

    Trond Myklebust
     

28 Apr, 2012

4 commits


17 Mar, 2012

1 commit

  • 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: Trond Myklebust
    Cc: Fred Isaman

    Trond Myklebust
     

11 Mar, 2012

2 commits


20 Oct, 2011

1 commit


15 Jul, 2011

4 commits


13 Jul, 2011

2 commits


21 Jun, 2011

1 commit


30 May, 2011

1 commit


27 Mar, 2011

1 commit

  • 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: Trond Myklebust

    Trond Myklebust
     

24 Mar, 2011

1 commit

  • 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: Fred Isaman
    Signed-off-by: Trond Myklebust

    Fred Isaman
     

22 Mar, 2011

1 commit


12 Mar, 2011

3 commits

  • This will make it possible to clear the lseg pointer in the same
    function as it is put, instead of in the caller nfs_pageio_doio().

    Signed-off-by: Fred Isaman
    Signed-off-by: Trond Myklebust

    Fred Isaman
     
  • Move the pnfs_update_layout call location to nfs_pageio_do_add_request().
    Grab the lseg sent in the doio function to nfs_read_rpcsetup and attach
    it to each nfs_read_data so it can be sent to the layout driver.

    Signed-off-by: Andy Adamson
    Signed-off-by: Andy Adamson
    Signed-off-by: Dean Hildebrand
    Signed-off-by: Fred Isaman
    Signed-off-by: Fred Isaman
    Signed-off-by: Benny Halevy
    Signed-off-by: Boaz Harrosh
    Signed-off-by: Oleg Drokin
    Signed-off-by: Tao Guo
    Signed-off-by: Trond Myklebust

    Fred Isaman
     
  • Add a pg_test layout driver hook which is used to avoid coelescing I/O across
    layout stripes.

    Signed-off-by: Andy Adamson
    Signed-off-by: Andy Adamson
    Signed-off-by: Dean Hildebrand
    Signed-off-by: Fred Isaman
    Signed-off-by: Fred Isaman
    Signed-off-by: Benny Halevy
    Signed-off-by: Boaz Harrosh
    Signed-off-by: Oleg Drokin
    Signed-off-by: Tao Guo
    Signed-off-by: Trond Myklebust

    Fred Isaman
     

08 Dec, 2010

1 commit

  • 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: Jeff Layton
    Signed-off-by: Trond Myklebust

    Trond Myklebust
     

31 Jul, 2010

1 commit


10 Jul, 2008

1 commit

  • 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: Trond Myklebust

    Trond Myklebust
     

30 Jan, 2008

1 commit


10 Oct, 2007

1 commit


11 Jul, 2007

4 commits


24 May, 2007

1 commit

  • 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: Trond Myklebust

    Trond Myklebust
     

01 May, 2007

3 commits