19 Oct, 2011

1 commit


28 Aug, 2011

1 commit


01 Aug, 2011

1 commit

  • The block driver uses GETDEVICELIST

    Signed-off-by: Andy Adamson
    [pass struct nfs_server * to getdevicelist]
    [get machince creds for getdevicelist]
    [fix getdevicelist decode sizing]
    Signed-off-by: Benny Halevy
    Signed-off-by: Benny Halevy
    Signed-off-by: Jim Rees
    Signed-off-by: Trond Myklebust

    Andy Adamson
     

13 Jul, 2011

3 commits

  • FREE_STATEID is used to tell the server that we want to free a stateid
    that no longer has any locks associated with it. This allows the client
    to reclaim locks without encountering edge conditions documented in
    section 8.4.3 of RFC 5661.

    Signed-off-by: Bryan Schumaker
    Signed-off-by: Trond Myklebust

    Bryan Schumaker
     
  • This patch adds in the xdr for doing a TEST_STATEID call with a single
    stateid. RFC 5661 allows multiple stateids to be tested in a single
    call, but only testing one keeps things simpler for now.

    Signed-off-by: Bryan Schumaker
    Signed-off-by: Trond Myklebust

    Bryan Schumaker
     
  • If the client is using NFS v4.1, then we can use SECINFO_NO_NAME to find
    the secflavor for the initial mount. If the server doesn't support
    SECINFO_NO_NAME then I fall back on the "guess and check" method used
    for v4.0 mounts.

    Signed-off-by: Bryan Schumaker
    Signed-off-by: Trond Myklebust

    Bryan Schumaker
     

30 May, 2011

3 commits

  • * 'pnfs-submit' of git://git.open-osd.org/linux-open-osd: (32 commits)
    pnfs-obj: pg_test check for max_io_size
    NFSv4.1: define nfs_generic_pg_test
    NFSv4.1: use pnfs_generic_pg_test directly by layout driver
    NFSv4.1: change pg_test return type to bool
    NFSv4.1: unify pnfs_pageio_init functions
    pnfs-obj: objlayout_encode_layoutcommit implementation
    pnfs: encode_layoutcommit
    pnfs-obj: report errors and .encode_layoutreturn Implementation.
    pnfs: encode_layoutreturn
    pnfs: layoutret_on_setattr
    pnfs: layoutreturn
    pnfs-obj: osd raid engine read/write implementation
    pnfs: support for non-rpc layout drivers
    pnfs-obj: define per-inode private structure
    pnfs: alloc and free layout_hdr layoutdriver methods
    pnfs-obj: objio_osd device information retrieval and caching
    pnfs-obj: decode layout, alloc/free lseg
    pnfs-obj: pnfs_osd XDR client implementation
    pnfs-obj: pnfs_osd XDR definitions
    pnfs-obj: objlayoutdriver module skeleton
    ...

    Linus Torvalds
     
  • * 'for-2.6.40' of git://linux-nfs.org/~bfields/linux: (22 commits)
    nfsd: make local functions static
    NFSD: Remove unused variable from nfsd4_decode_bind_conn_to_session()
    NFSD: Check status from nfsd4_map_bcts_dir()
    NFSD: Remove setting unused variable in nfsd_vfs_read()
    nfsd41: error out on repeated RECLAIM_COMPLETE
    nfsd41: compare request's opcnt with session's maxops at nfsd4_sequence
    nfsd v4.1 lOCKT clientid field must be ignored
    nfsd41: add flag checking for create_session
    nfsd41: make sure nfs server process OPEN with EXCLUSIVE4_1 correctly
    nfsd4: fix wrongsec handling for PUTFH + op cases
    nfsd4: make fh_verify responsibility of nfsd_lookup_dentry caller
    nfsd4: introduce OPDESC helper
    nfsd4: allow fh_verify caller to skip pseudoflavor checks
    nfsd: distinguish functions of NFSD_MAY_* flags
    svcrpc: complete svsk processing on cb receive failure
    svcrpc: take advantage of tcp autotuning
    SUNRPC: Don't wait for full record to receive tcp data
    svcrpc: copy cb reply instead of pages
    svcrpc: close connection if client sends short packet
    svcrpc: note network-order types in svc_process_calldir
    ...

    Linus Torvalds
     
  • NFSv4.1 LAYOUTRETURN implementation

    Currently, does not support layout-type payload encoding.

    Signed-off-by: Alexandros Batsakis
    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: Marc Eshel
    Signed-off-by: Zhang Jingwang
    [call pnfs_return_layout right before pnfs_destroy_layout]
    [remove assert_spin_locked from pnfs_clear_lseg_list]
    [remove wait parameter from the layoutreturn path.]
    [remove return_type field from nfs4_layoutreturn_args]
    [remove range from nfs4_layoutreturn_args]
    [no need to send layoutcommit from _pnfs_return_layout]
    [don't wait on sync layoutreturn]
    [fix layout stateid in layoutreturn args]
    [fixed NULL deref in _pnfs_return_layout]
    [removed recaim member of nfs4_layoutreturn_args]
    Signed-off-by: Benny Halevy

    Benny Halevy
     

30 Apr, 2011

1 commit


31 Mar, 2011

1 commit


25 Mar, 2011

2 commits


24 Mar, 2011

1 commit

  • The filelayout driver sends LAYOUTCOMMIT only when COMMIT goes to
    the data server (as opposed to the MDS) and the data server WRITE
    is not NFS_FILE_SYNC.

    Only whole file layout support means that there is only one IOMODE_RW layout
    segment.

    Signed-off-by: Andy Adamson
    Signed-off-by: Alexandros Batsakis
    Signed-off-by: Boaz Harrosh
    Signed-off-by: Dean Hildebrand
    Signed-off-by: Fred Isaman
    Signed-off-by: Mingyang Guo
    Signed-off-by: Tao Guo
    Signed-off-by: Zhang Jingwang
    Tested-by: Boaz Harrosh
    Signed-off-by: Benny Halevy
    Signed-off-by: Fred Isaman
    Signed-off-by: Trond Myklebust

    Andy Adamson
     

15 Jan, 2011

1 commit

  • * 'for-2.6.38' of git://linux-nfs.org/~bfields/linux: (62 commits)
    nfsd4: fix callback restarting
    nfsd: break lease on unlink, link, and rename
    nfsd4: break lease on nfsd setattr
    nfsd: don't support msnfs export option
    nfsd4: initialize cb_per_client
    nfsd4: allow restarting callbacks
    nfsd4: simplify nfsd4_cb_prepare
    nfsd4: give out delegations more quickly in 4.1 case
    nfsd4: add helper function to run callbacks
    nfsd4: make sure sequence flags are set after destroy_session
    nfsd4: re-probe callback on connection loss
    nfsd4: set sequence flag when backchannel is down
    nfsd4: keep finer-grained callback status
    rpc: allow xprt_class->setup to return a preexisting xprt
    rpc: keep backchannel xprt as long as server connection
    rpc: move sk_bc_xprt to svc_xprt
    nfsd4: allow backchannel recovery
    nfsd4: support BIND_CONN_TO_SESSION
    nfsd4: modify session list under cl_lock
    Documentation: fl_mylease no longer exists
    ...

    Fix up conflicts in fs/nfsd/vfs.c with the vfs-scale work. The
    vfs-scale work touched some msnfs cases, and this merge removes support
    for that entirely, so the conflict was trivial to resolve.

    Linus Torvalds
     

12 Jan, 2011

2 commits


18 Dec, 2010

1 commit


27 Oct, 2010

1 commit

  • * 'for-2.6.37' of git://linux-nfs.org/~bfields/linux: (99 commits)
    svcrpc: svc_tcp_sendto XPT_DEAD check is redundant
    svcrpc: no need for XPT_DEAD check in svc_xprt_enqueue
    svcrpc: assume svc_delete_xprt() called only once
    svcrpc: never clear XPT_BUSY on dead xprt
    nfsd4: fix connection allocation in sequence()
    nfsd4: only require krb5 principal for NFSv4.0 callbacks
    nfsd4: move minorversion to client
    nfsd4: delay session removal till free_client
    nfsd4: separate callback change and callback probe
    nfsd4: callback program number is per-session
    nfsd4: track backchannel connections
    nfsd4: confirm only on succesful create_session
    nfsd4: make backchannel sequence number per-session
    nfsd4: use client pointer to backchannel session
    nfsd4: move callback setup into session init code
    nfsd4: don't cache seq_misordered replies
    SUNRPC: Properly initialize sock_xprt.srcaddr in all cases
    SUNRPC: Use conventional switch statement when reclassifying sockets
    sunrpc/xprtrdma: clean up workqueue usage
    sunrpc: Turn list_for_each-s into the ..._entry-s
    ...

    Fix up trivial conflicts (two different deprecation notices added in
    separate branches) in Documentation/feature-removal-schedule.txt

    Linus Torvalds
     

25 Oct, 2010

3 commits

  • Add the ability to actually send LAYOUTGET and GETDEVICEINFO. This also adds
    in the machinery to handle layout state and the deviceid cache. Note that
    GETDEVICEINFO is not called directly by the generic layer. Instead it
    is called by the drivers while parsing the LAYOUTGET opaque data in response
    to an unknown device id embedded therein. RFC 5661 only encodes
    device ids within the driver-specific opaque data.

    Signed-off-by: Andy Adamson
    Signed-off-by: Dean Hildebrand
    Signed-off-by: Marc Eshel
    Signed-off-by: Mike Sager
    Signed-off-by: Ricardo Labiaga
    Signed-off-by: Tao Guo
    Signed-off-by: Boaz Harrosh
    Signed-off-by: Fred Isaman
    Signed-off-by: Trond Myklebust

    Andy Adamson
     
  • In NFSv4.1 the stateid consists of the other and seqid fields. For layout
    processing we need to numerically compare the seqid value of layout stateids.
    To do so, introduce a union to nfs4_stateid to switch between opaque(16 bytes)
    and opaque(12 bytes) / __be32

    Signed-off-by: Alexandros Batsakis
    Signed-off-by: Benny Halevy
    Signed-off-by: Fred Isaman
    Signed-off-by: Trond Myklebust

    Alexandros Batsakis
     
  • Use only layoutreturn constant for both returns and recalls.
    (return_* works better for recall_type rather the other way around)

    Signed-off-by: Dean Hildebrand
    Signed-off-by: Marc Eshel
    Signed-off-by: Benny Halevy
    Signed-off-by: Fred Isaman
    Signed-off-by: Trond Myklebust

    Dean Hildebrand
     

02 Oct, 2010

1 commit


31 Jul, 2010

1 commit


06 Dec, 2009

2 commits

  • XDR encoding and decoding for RECLAIM_COMPLETE. Implements the necessary
    encoding to indicate reclaim complete for the entire client. In the future,
    it can be extended to provide reclaim complete functionality for a single
    file system after migration.

    Signed-off-by: Ricardo Labiaga
    Signed-off-by: Trond Myklebust

    Ricardo Labiaga
     
  • the server can indicate a number of error conditions by setting the
    appropriate bits in the SEQUENCE operation. The client re-establishes
    state with the server when it receives one of those, with the action
    depending on the specific case.

    Signed-off-by: Alexandros Batsakis
    Signed-off-by: Trond Myklebust

    Alexandros Batsakis
     

22 Sep, 2009

1 commit

  • * 'for-2.6.32' of git://linux-nfs.org/~bfields/linux: (68 commits)
    nfsd4: nfsv4 clients should cross mountpoints
    nfsd: revise 4.1 status documentation
    sunrpc/cache: avoid variable over-loading in cache_defer_req
    sunrpc/cache: use list_del_init for the list_head entries in cache_deferred_req
    nfsd: return success for non-NFS4 nfs4_state_start
    nfsd41: Refactor create_client()
    nfsd41: modify nfsd4.1 backchannel to use new xprt class
    nfsd41: Backchannel: Implement cb_recall over NFSv4.1
    nfsd41: Backchannel: cb_sequence callback
    nfsd41: Backchannel: Setup sequence information
    nfsd41: Backchannel: Server backchannel RPC wait queue
    nfsd41: Backchannel: Add sequence arguments to callback RPC arguments
    nfsd41: Backchannel: callback infrastructure
    nfsd4: use common rpc_cred for all callbacks
    nfsd4: allow nfs4 state startup to fail
    SUNRPC: Defer the auth_gss upcall when the RPC call is asynchronous
    nfsd4: fix null dereference creating nfsv4 callback client
    nfsd4: fix whitespace in NFSPROC4_CLNT_CB_NULL definition
    nfsd41: sunrpc: add new xprt class for nfsv4.1 backchannel
    sunrpc/cache: simplify cache_fresh_locked and cache_fresh_unlocked.
    ...

    Linus Torvalds
     

09 Sep, 2009

1 commit


11 Jul, 2009

1 commit


18 Jun, 2009

3 commits

  • Implement the create_session operation conforming to
    http://tools.ietf.org/html/draft-ietf-nfsv4-minorversion1-26

    Set the real fore channel max operations to preserve server resources.
    Note: If the server returns < NFS4_MAX_OPS, the client will very soon
    get an NFS4ERR_TOO_MANY_OPS. A later patch will handle this.

    Set the max_rqst_sz and max_resp_sz to PAGE_SIZE - we preallocate the buffers.

    Set the back channel max_resp_sz_cached to zero to force the client to
    always set csa_cachethis to FALSE because the current implementation
    of the back channel DRC only supports caching the CB_SEQUENCE operation.

    The client back channel server supports one slot, and desires 2 operations
    per compound.

    Signed-off-by: Ricardo Labiaga
    Signed-off-by: Andy Adamson
    Signed-off-by: Benny Halevy
    [nfs41: remove extraneous rpc_clnt pointer]
    Use the struct nfs_client cl_rpcclient.
    Signed-off-by: Andy Adamson
    Signed-off-by: Benny Halevy
    [nfs41: nfs4_init_channel_attrs, just use nfs41_create_session_args]
    Signed-off-by: Andy Adamson
    Signed-off-by: Benny Halevy
    [nfs41: use rsize and wsize for session channel attributes]
    Signed-off-by: Andy Adamson
    Signed-off-by: Benny Halevy
    [nfs41: set channel max operations]
    Signed-off-by: Andy Adamson
    Signed-off-by: Benny Halevy
    [nfs41: set back channel attributes]
    Signed-off-by: Andy Adamson
    Signed-off-by: Benny Halevy
    [nfs41: obliterate nfs4_adjust_channel_attrs]
    Signed-off-by: Andy Adamson
    Signed-off-by: Benny Halevy
    [nfs41: have create_session work on nfs_client]
    Signed-off-by: Benny Halevy
    [nfs41: move CONFIG_NFS_V4_1 endif]
    Signed-off-by: Andy Adamson
    Signed-off-by: Benny Halevy
    [nfs41: pass *session in seq_args and seq_res]
    [moved nfs4_init_slot_table definition here]
    Signed-off-by: Benny Halevy
    [nfs41: use kcalloc to allocate slot table]
    Signed-off-by: Benny Halevy
    Signed-off-by: Trond Myklebust
    [nfs41: fix Xcode_create_session's xdr Xcoding pointer type]
    [nfs41: refactor decoding of channel attributes]
    Signed-off-by: Benny Halevy

    Andy Adamson
     
  • Implement the exchange_id operation conforming to
    http://tools.ietf.org/html/draft-ietf-nfsv4-minorversion1-26

    Unlike NFSv4.0, NFSv4.1 requires machine credentials. RPC_AUTH_GSS machine
    credentials will be passed into the kernel at mount time to be available for
    the exchange_id operation.

    RPC_AUTH_UNIX root mounts can use the UNIX root credential. Store the root
    credential in the nfs_client struct.

    Without a credential, NFSv4.1 state renewal fails.

    [nfs41: establish clientid via exchange id only if cred != NULL]
    Signed-off-by: Andy Adamson
    Signed-off-by: Benny Halevy
    [nfsd41: move nfstime4 from under CONFIG_NFS_V4_1]
    Signed-off-by: Andy Adamson
    Signed-off-by: Benny Halevy
    [nfs41: do not wait a lease time in exchange id]
    Signed-off-by: Andy Adamson
    Signed-off-by: Benny Halevy
    [nfs41: pass *session in seq_args and seq_res]
    Signed-off-by: Benny Halevy
    Signed-off-by: Trond Myklebust
    [nfs41: Ignoring impid in decode_exchange_id is missing a READ_BUF]
    Signed-off-by: Benny Halevy
    [nfs41: fix Xcode_exchange_id's xdr Xcoding pointer type]
    [nfs41: get rid of unused struct nfs41_exchange_id_res members]
    Signed-off-by: Benny Halevy

    Benny Halevy
     
  • If 4.1 isn't supported, NFS4_MAX_MINOR_VERSION will be 0.

    Signed-off-by: Mike Sager
    Signed-off-by: Benny Halevy
    Signed-off-by: Trond Myklebust

    Mike Sager
     

04 Apr, 2009

3 commits

  • Implement the CREATE_EXCLUSIVE4_1 open mode conforming to
    http://tools.ietf.org/html/draft-ietf-nfsv4-minorversion1-26

    This mode allows the client to atomically create a file
    if it doesn't exist while setting some of its attributes.

    It must be implemented if the server supports persistent
    reply cache and/or pnfs.

    Signed-off-by: Benny Halevy
    Signed-off-by: J. Bruce Fields

    Benny Halevy
     
  • Return bitmask for supported EXCLUSIVE4_1 create attributes.

    Signed-off-by: Benny Halevy
    Signed-off-by: J. Bruce Fields

    Benny Halevy
     
  • Define all NFSv4.1 common operation and error code constants.

    Note that some of the definitions are used by both the nfs41 client
    and the server code. This patch is duplicated in the nfs41 and nfsd41
    sessions patchset.

    Signed-off-by: Andy Adamson
    Signed-off-by: Benny Halevy
    [nfs41: add exchange id flags]
    Signed-off-by: Mike Sager
    Signed-off-by: Benny Halevy
    [removed server-only hunk changing NFSERR_REPLAY_ME]
    Signed-off-by: Benny Halevy
    [nfs41: add SEQ4_XX to nfs41-common-protocol]
    Signed-off-by: Andy Adamson
    Signed-off-by: Benny Halevy
    [nfs41: generic error code update]
    [nfs41: reverse EXCHGID4_INVAL_FLAG_MASK_{A,R}]
    Signed-off-by: Benny Halevy
    Signed-off-by: J. Bruce Fields

    Benny Halevy
     

08 Jan, 2009

1 commit

  • refactor the nfs4 server lock code to use last_byte_offset
    to compute the last byte covered by the lock. Check for overflow
    so that the last byte is set to NFS4_MAX_UINT64 if offset + len
    wraps around.

    Also, use NFS4_MAX_UINT64 for ~(u64)0 where appropriate.

    Signed-off-by: Benny Halevy
    Signed-off-by: J. Bruce Fields

    Benny Halevy
     

24 Jun, 2008

1 commit


11 Jul, 2007

1 commit

  • The Linux NFS4 client simply skips over the bitmask in an O_EXCL open
    call and so it doesn't bother to reset any fields that may be holding
    the verifier. This patch has us save the first two words of the bitmask
    (which is all the current client has #defines for). The client then
    later checks this bitmask and turns on the appropriate flags in the
    sattr->ia_verify field for the following SETATTR call.

    This patch only currently checks to see if the server used the atime
    and mtime slots for the verifier (which is what the Linux server uses
    for this). I'm not sure of what other fields the server could
    reasonably use, but adding checks for others should be trivial.

    Signed-off-by: Jeff Layton
    Signed-off-by: Trond Myklebust

    Jeff Layton
     

15 May, 2007

1 commit

  • The XDR code should not depend on the physical allocation size of
    structures like nfs4_stateid and nfs4_verifier since those may have to
    change at some future date. We therefore replace all uses of
    sizeof() with constants like NFS4_VERIFIER_SIZE and NFS4_STATEID_SIZE.

    This also has the side-effect of fixing some warnings of the type
    format ‘%u’ expects type ‘unsigned int’, but argument X has type
    ‘long unsigned int’
    on 64-bit systems

    Signed-off-by: Trond Myklebust

    Trond Myklebust
     

17 Feb, 2007

1 commit