28 Jan, 2016

1 commit


05 Jan, 2016

4 commits

  • * pnfs_generic:
    NFSv4.1/pNFS: Cleanup constify struct pnfs_layout_range arguments
    NFSv4.1/pnfs: Cleanup copying of pnfs_layout_range structures
    NFSv4.1/pNFS: Cleanup pnfs_mark_matching_lsegs_invalid()
    NFSv4.1/pNFS: Fix a race in initiate_file_draining()
    NFSv4.1/pNFS: pnfs_error_mark_layout_for_return() must always return layout
    NFSv4.1/pNFS: pnfs_mark_matching_lsegs_return() should set the iomode
    NFSv4.1/pNFS: Use nfs4_stateid_copy for copying stateids
    NFSv4.1/pNFS: Don't pass stateids by value to pnfs_send_layoutreturn()
    NFS: Relax requirements in nfs_flush_incompatible
    NFSv4.1/pNFS: Don't queue up a new commit if the layout segment is invalid
    NFS: Allow multiple commit requests in flight per file
    NFS/pNFS: Fix up pNFS write reschedule layering violations and bugs
    NFSv4: List stateid information in the callback tracepoints
    NFSv4.1/pNFS: Don't return NFS4ERR_DELAY unnecessarily in CB_LAYOUTRECALL
    NFSv4.1/pNFS: Ensure we enforce RFC5661 Section 12.5.5.2.1
    pNFS: If we have to delay the layout callback, mark the layout for return
    NFSv4.1/pNFS: Add a helper to mark the layout as returned
    pNFS: Ensure nfs4_layoutget_prepare returns the correct error

    Trond Myklebust
     
  • Signed-off-by: Trond Myklebust

    Trond Myklebust
     
  • Signed-off-by: Trond Myklebust

    Trond Myklebust
     
  • Fix a bug whereby if all the layout segments could be immediately freed,
    the call to pnfs_error_mark_layout_for_return() would never result in
    a layoutreturn.

    Signed-off-by: Trond Myklebust

    Trond Myklebust
     

01 Jan, 2016

1 commit


29 Dec, 2015

3 commits


23 Sep, 2015

1 commit

  • If we send a layoutreturn asynchronously before close, the close
    might reach server first and layoutreturn would fail with BADSTATEID
    because there is nothing keeping the layout stateid alive.

    Also do not pretend sending layoutreturn if we are not.

    Signed-off-by: Peng Tao
    Signed-off-by: Trond Myklebust

    Peng Tao
     

26 Aug, 2015

5 commits


19 Aug, 2015

1 commit

  • The helper pnfs_roc() has already verified that we have no delegations,
    and no further open files, hence no outstanding I/O and it has marked
    all the return-on-close lsegs as being invalid.
    Furthermore, it sets the NFS_LAYOUT_RETURN bit, thus serialising the
    close/delegreturn with all future layoutget calls on this inode.

    The checks in pnfs_roc_drain() for valid layout segments are therefore
    redundant: those cannot exist until another layoutget completes.
    The other check for whether or not NFS_LAYOUT_RETURN is set, actually
    causes a hang, since we already know that we hold that flag.

    To fix, we therefore strip out all the functionality in pnfs_roc_drain()
    except the retrieval of the barrier state, and then rename the function
    accordingly.

    Reported-by: Christoph Hellwig
    Fixes: 5c4a79fb2b1c ("Don't prevent layoutgets when doing return-on-close")
    Signed-off-by: Trond Myklebust

    Trond Myklebust
     

13 Aug, 2015

1 commit


27 Jun, 2015

1 commit


24 Jun, 2015

1 commit


27 Apr, 2015

1 commit

  • Pull NFS client updates from Trond Myklebust:
    "Another set of mainly bugfixes and a couple of cleanups. No new
    functionality in this round.

    Highlights include:

    Stable patches:
    - Fix a regression in /proc/self/mountstats
    - Fix the pNFS flexfiles O_DIRECT support
    - Fix high load average due to callback thread sleeping

    Bugfixes:
    - Various patches to fix the pNFS layoutcommit support
    - Do not cache pNFS deviceids unless server notifications are enabled
    - Fix a SUNRPC transport reconnection regression
    - make debugfs file creation failure non-fatal in SUNRPC
    - Another fix for circular directory warnings on NFSv4 "junctioned"
    mountpoints
    - Fix locking around NFSv4.2 fallocate() support
    - Truncating NFSv4 file opens should also sync O_DIRECT writes
    - Prevent infinite loop in rpcrdma_ep_create()

    Features:
    - Various improvements to the RDMA transport code's handling of
    memory registration
    - Various code cleanups"

    * tag 'nfs-for-4.1-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (55 commits)
    fs/nfs: fix new compiler warning about boolean in switch
    nfs: Remove unneeded casts in nfs
    NFS: Don't attempt to decode missing directory entries
    Revert "nfs: replace nfs_add_stats with nfs_inc_stats when add one"
    NFS: Rename idmap.c to nfs4idmap.c
    NFS: Move nfs_idmap.h into fs/nfs/
    NFS: Remove CONFIG_NFS_V4 checks from nfs_idmap.h
    NFS: Add a stub for GETDEVICELIST
    nfs: remove WARN_ON_ONCE from nfs_direct_good_bytes
    nfs: fix DIO good bytes calculation
    nfs: Fetch MOUNTED_ON_FILEID when updating an inode
    sunrpc: make debugfs file creation failure non-fatal
    nfs: fix high load average due to callback thread sleeping
    NFS: Reduce time spent holding the i_mutex during fallocate()
    NFS: Don't zap caches on fallocate()
    xprtrdma: Make rpcrdma_{un}map_one() into inline functions
    xprtrdma: Handle non-SEND completions via a callout
    xprtrdma: Add "open" memreg op
    xprtrdma: Add "destroy MRs" memreg op
    xprtrdma: Add "reset MRs" memreg op
    ...

    Linus Torvalds
     

16 Apr, 2015

1 commit


28 Mar, 2015

4 commits


18 Feb, 2015

1 commit


04 Feb, 2015

14 commits

  • * flexfiles: (53 commits)
    pnfs: lookup new lseg at lseg boundary
    nfs41: .init_read and .init_write can be called with valid pg_lseg
    pnfs: Update documentation on the Layout Drivers
    pnfs/flexfiles: Add the FlexFile Layout Driver
    nfs: count DIO good bytes correctly with mirroring
    nfs41: wait for LAYOUTRETURN before retrying LAYOUTGET
    nfs: add a helper to set NFS_ODIRECT_RESCHED_WRITES to direct writes
    nfs41: add NFS_LAYOUT_RETRY_LAYOUTGET to layout header flags
    nfs/flexfiles: send layoutreturn before freeing lseg
    nfs41: introduce NFS_LAYOUT_RETURN_BEFORE_CLOSE
    nfs41: allow async version layoutreturn
    nfs41: add range to layoutreturn args
    pnfs: allow LD to ask to resend read through pnfs
    nfs: add nfs_pgio_current_mirror helper
    nfs: only reset desc->pg_mirror_idx when mirroring is supported
    nfs41: add a debug warning if we destroy an unempty layout
    pnfs: fail comparison when bucket verifier not set
    nfs: mirroring support for direct io
    nfs: add mirroring support to pgio layer
    pnfs: pass ds_commit_idx through the commit path
    ...

    Conflicts:
    fs/nfs/pnfs.c
    fs/nfs/pnfs.h

    Trond Myklebust
     
  • The flexfile layout is a new layout that extends the
    file layout. It is currently being drafted as a specification at
    https://datatracker.ietf.org/doc/draft-ietf-nfsv4-layout-types/

    Signed-off-by: Weston Andros Adamson
    Signed-off-by: Tom Haynes
    Signed-off-by: Tao Peng

    Tom Haynes
     
  • Also take care to stop waiting if someone clears retry bit.

    Signed-off-by: Peng Tao

    Peng Tao
     
  • Use it to indicate that LD wants to retry layoutget. LD can set
    it whenever it wants the common pnfs code to return and retry
    pnfs path through a new layout.

    The bit gets cleared when client does a new layoutget, when client
    closes the file (ROC case), or when kernel needs to evict the inode
    (non-ROC case).

    Signed-off-by: Peng Tao

    Peng Tao
     
  • When it is set, generic pnfs would try to send layoutreturn right
    before last close/delegation_return regard less NFS_LAYOUT_ROC is
    set or not. LD can then make sure layoutreturn is always sent
    rather than being omitted.

    The difference against NFS_LAYOUT_RETURN is that
    NFS_LAYOUT_RETURN_BEFORE_CLOSE does not block usage of the layout so
    LD can set it and expect generic layer to try pnfs path at the
    same time.

    Signed-off-by: Peng Tao
    Signed-off-by: Tom Haynes

    Peng Tao
     
  • Signed-off-by: Peng Tao
    Signed-off-by: Tom Haynes

    Peng Tao
     
  • If current IO cannot be completed due to some transient errors,
    LD may want to ask generic layer to resend the request through
    pnfs again.

    Signed-off-by: Peng Tao
    Signed-off-by: Tom Haynes

    Peng Tao
     
  • Pass ds_commit_idx through the nfs commit path. It's used to select
    the commit bucket when using pnfs and is ignored when not using pnfs.
    Several functions had to be changed: nfs_retry_commit,
    nfs_mark_request_commit, pnfs_mark_request_commit and the pnfs layout
    driver .mark_request_commit functions.

    Signed-off-by: Tom Haynes

    Weston Andros Adamson
     
  • This is needed to support mirrored writes - the first write can't just
    trash the lseg, we need to keep it around until all mirrors have
    written.

    Signed-off-by: Weston Andros Adamson

    Weston Andros Adamson
     
  • And if we are to return the same type of layouts, don't bother
    sending more layoutgets.

    Signed-off-by: Peng Tao
    Signed-off-by: Tom Haynes

    Peng Tao
     
  • It marks all matching layout segments as NFS_LSEG_LAYOUTRETURN,
    which is an indicator for pnfs_put_lseg() to send layoutreturn,
    and also prevents pnfs_update_layout() from using the returning
    segments. Once it is set, it never gets cleared.

    It also sets proper io failure bit so that pnfs path can be retried
    after PNFS_LAYOUTGET_RETRY_TIMEOUT second.

    Signed-off-by: Peng Tao
    Signed-off-by: Tom Haynes

    Peng Tao
     
  • Per RFC 5661 Errata 3208:
    | A client MAY always forget its layout state and associated
    | layout stateid at any time (See also section 12.5.5.1).
    | In such case, the client MUST use a non-layout stateid for the next
    | LAYOUTGET operation. This will signal the server that the client has
    | no more layouts on the file and its respective layout state can be
    | released before issuing a new layout in response to LAYOUTGET.

    In order to make such a signal unique to server, client needs to serialize
    all layoutgets using non-layout stateid. We implement this by serializing
    layoutgets when client has no layout segments at hand.

    Signed-off-by: Peng Tao
    Signed-off-by: Tom Haynes

    Peng Tao
     
  • Signed-off-by: Peng Tao
    Signed-off-by: Tom Haynes

    Peng Tao
     
  • flexfile layout may need to set such when making DS connections.

    Signed-off-by: Peng Tao
    Signed-off-by: Tom Haynes

    Peng Tao