16 Oct, 2015

2 commits


18 Aug, 2015

1 commit


24 Jun, 2015

1 commit


22 Apr, 2015

1 commit


13 Feb, 2015

1 commit

  • Pull nfsd updates from Bruce Fields:
    "The main change is the pNFS block server support from Christoph, which
    allows an NFS client connected to shared disk to do block IO to the
    shared disk in place of NFS reads and writes. This also requires xfs
    patches, which should arrive soon through the xfs tree, barring
    unexpected problems. Support for other filesystems is also possible
    if there's interest.

    Thanks also to Chuck Lever for continuing work to get NFS/RDMA into
    shape"

    * 'for-3.20' of git://linux-nfs.org/~bfields/linux: (32 commits)
    nfsd: default NFSv4.2 to on
    nfsd: pNFS block layout driver
    exportfs: add methods for block layout exports
    nfsd: add trace events
    nfsd: update documentation for pNFS support
    nfsd: implement pNFS layout recalls
    nfsd: implement pNFS operations
    nfsd: make find_any_file available outside nfs4state.c
    nfsd: make find/get/put file available outside nfs4state.c
    nfsd: make lookup/alloc/unhash_stid available outside nfs4state.c
    nfsd: add fh_fsid_match helper
    nfsd: move nfsd_fh_match to nfsfh.h
    fs: add FL_LAYOUT lease type
    fs: track fl_owner for leases
    nfs: add LAYOUT_TYPE_MAX enum value
    nfsd: factor out a helper to decode nfstime4 values
    sunrpc/lockd: fix references to the BKL
    nfsd: fix year-2038 nfs4 state problem
    svcrdma: Handle additional inline content
    svcrdma: Move read list XDR round-up logic
    ...

    Linus Torvalds
     

04 Feb, 2015

1 commit

  • 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
     

03 Feb, 2015

2 commits

  • Add support for the GETDEVICEINFO, LAYOUTGET, LAYOUTCOMMIT and
    LAYOUTRETURN NFSv4.1 operations, as well as backing code to manage
    outstanding layouts and devices.

    Layout management is very straight forward, with a nfs4_layout_stateid
    structure that extends nfs4_stid to manage layout stateids as the
    top-level structure. It is linked into the nfs4_file and nfs4_client
    structures like the other stateids, and contains a linked list of
    layouts that hang of the stateid. The actual layout operations are
    implemented in layout drivers that are not part of this commit, but
    will be added later.

    The worst part of this commit is the management of the pNFS device IDs,
    which suffers from a specification that is not sanely implementable due
    to the fact that the device-IDs are global and not bound to an export,
    and have a small enough size so that we can't store the fsid portion of
    a file handle, and must never be reused. As we still do need perform all
    export authentication and validation checks on a device ID passed to
    GETDEVICEINFO we are caught between a rock and a hard place. To work
    around this issue we add a new hash that maps from a 64-bit integer to a
    fsid so that we can look up the export to authenticate against it,
    a 32-bit integer as a generation that we can bump when changing the device,
    and a currently unused 32-bit integer that could be used in the future
    to handle more than a single device per export. Entries in this hash
    table are never deleted as we can't reuse the ids anyway, and would have
    a severe lifetime problem anyway as Linux export structures are temporary
    structures that can go away under load.

    Parts of the XDR data, structures and marshaling/unmarshaling code, as
    well as many concepts are derived from the old pNFS server implementation
    from Andy Adamson, Benny Halevy, Dean Hildebrand, Marc Eshel, Fred Isaman,
    Mike Sager, Ricardo Labiaga and many others.

    Signed-off-by: Christoph Hellwig

    Christoph Hellwig
     
  • This gives us a nice upper bound for later use in nfѕd.

    Signed-off-by: Christoph Hellwig

    Christoph Hellwig
     

26 Nov, 2014

2 commits


01 Oct, 2014

1 commit

  • The SEEK operation is used when an application makes an lseek call with
    either the SEEK_HOLE or SEEK_DATA flags set. I fall back on
    nfs_file_llseek() if the server does not have SEEK support.

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

    Anna Schumaker
     

30 Sep, 2014

2 commits

  • This patch adds server support for the NFS v4.2 operation SEEK, which
    returns the position of the next hole or data segment in a file.

    Signed-off-by: Anna Schumaker
    Signed-off-by: J. Bruce Fields

    Anna Schumaker
     
  • It's cleaner to introduce everything at once and have the server reply
    with "not supported" than it would be to introduce extra operations when
    implementing a specific one in the middle of the list.

    Signed-off-by: Anna Schumaker
    Signed-off-by: J. Bruce Fields

    Anna Schumaker
     

29 Aug, 2014

1 commit

  • Recent NFS v4.2 drafts have removed NFS4ERR_METADATA_NOTSUPP and
    reassigned the error code to NFS4ERR_UNION_NOTSUPP.

    I also add in the NFS4ERR_OFFLOAD_NO_REQS error code.

    We're not using any of these yet, so there's no harm done.

    Signed-off-by: Anna Schumaker
    Signed-off-by: J. Bruce Fields

    Anna Schumaker
     

07 Jun, 2014

1 commit


06 Dec, 2013

1 commit

  • Pull NFS client bugfixes from Trond Myklebust:
    - Stable fix for a NFSv4.1 delegation and state recovery deadlock
    - Stable fix for a loop on irrecoverable errors when returning
    delegations
    - Fix a 3-way deadlock between layoutreturn, open, and state recovery
    - Update the MAINTAINERS file with contact information for Trond
    Myklebust
    - Close needs to handle NFS4ERR_ADMIN_REVOKED
    - Enabling v4.2 should not recompile nfsd and lockd
    - Fix a couple of compile warnings

    * tag 'nfs-for-3.13-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
    nfs: fix do_div() warning by instead using sector_div()
    MAINTAINERS: Update contact information for Trond Myklebust
    NFSv4.1: Prevent a 3-way deadlock between layoutreturn, open and state recovery
    SUNRPC: do not fail gss proc NULL calls with EACCES
    NFSv4: close needs to handle NFS4ERR_ADMIN_REVOKED
    NFSv4: Update list of irrecoverable errors on DELEGRETURN
    NFSv4 wait on recovery for async session errors
    NFS: Fix a warning in nfs_setsecurity
    NFS: Enabling v4.2 should not recompile nfsd and lockd

    Linus Torvalds
     

20 Nov, 2013

1 commit


17 Nov, 2013

1 commit

  • Pull nfsd changes from Bruce Fields:
    "This includes miscellaneous bugfixes and cleanup and a performance fix
    for write-heavy NFSv4 workloads.

    (The most significant nfsd-relevant change this time is actually in
    the delegation patches that went through Viro, fixing a long-standing
    bug that can cause NFSv4 clients to miss updates made by non-nfs users
    of the filesystem. Those enable some followup nfsd patches which I
    have queued locally, but those can wait till 3.14)"

    * 'nfsd-next' of git://linux-nfs.org/~bfields/linux: (24 commits)
    nfsd: export proper maximum file size to the client
    nfsd4: improve write performance with better sendspace reservations
    svcrpc: remove an unnecessary assignment
    sunrpc: comment typo fix
    Revert "nfsd: remove_stid can be incorporated into nfs4_put_delegation"
    nfsd4: fix discarded security labels on setattr
    NFSD: Add support for NFS v4.2 operation checking
    nfsd4: nfsd_shutdown_net needs state lock
    NFSD: Combine decode operations for v4 and v4.1
    nfsd: -EINVAL on invalid anonuid/gid instead of silent failure
    nfsd: return better errors to exportfs
    nfsd: fh_update should error out in unexpected cases
    nfsd4: need to destroy revoked delegations in destroy_client
    nfsd: no need to unhash_stid before free
    nfsd: remove_stid can be incorporated into nfs4_put_delegation
    nfsd: nfs4_open_delegation needs to remove_stid rather than unhash_stid
    nfsd: nfs4_free_stid
    nfsd: fix Kconfig syntax
    sunrpc: trim off EC bytes in GSSAPI v2 unwrap
    gss_krb5: document that we ignore sequence number
    ...

    Linus Torvalds
     

05 Nov, 2013

2 commits

  • We don't want to be setting capabilities and/or requesting attributes
    that are not appropriate for the NFSv4 minor version.

    - Ensure that we clear the NFS_CAP_SECURITY_LABEL capability when appropriate
    - Ensure that we limit the attribute bitmasks to the mounted_on_fileid
    attribute and less for NFSv4.0
    - Ensure that we limit the attribute bitmasks to suppattr_exclcreat and
    less for NFSv4.1
    - Ensure that we limit it to change_sec_label or less for NFSv4.2

    Signed-off-by: Trond Myklebust

    Trond Myklebust
     
  • In the spec, the security label attribute id is '80', which means that
    it should be bit number 80-64 == 16 in the 3rd word of the bitmap.

    Fixes: 4488cc96c581: NFS: Add NFSv4.2 protocol constants
    Cc: J. Bruce Fields
    Cc: Steve Dickson
    Cc: stable@vger.kernel.org # 3.11+
    Signed-off-by: Trond Myklebust

    Trond Myklebust
     

31 Oct, 2013

1 commit

  • The server does allow NFS over v4.2, even if it doesn't add any new
    operations yet.

    I also switch to using constants to represent the last operation for
    each minor version since this makes the code cleaner and easier to
    understand at a quick glance.

    Signed-off-by: Anna Schumaker
    Signed-off-by: J. Bruce Fields

    Anna Schumaker
     

29 Oct, 2013

1 commit

  • Introduce a mechanism for probing a server to determine if an FSID
    is present or absent.

    The on-the-wire compound is different between minor version 0 and 1.
    Minor version 0 appends a RENEW operation to identify which client
    ID is probing. Minor version 1 has a SEQUENCE operation in the
    compound which effectively carries the same information.

    Signed-off-by: Chuck Lever
    Signed-off-by: Trond Myklebust

    Chuck Lever
     

09 Jun, 2013

2 commits

  • In order to mimic the way that NFSv4 ACLs are implemented we have created a
    structure to be used to pass label data up and down the call chain. This patch
    adds the new structure and new members to the required NFSv4 call structures.

    Signed-off-by: Matthew N. Dodd
    Signed-off-by: Miguel Rodel Felipe
    Signed-off-by: Phua Eu Gene
    Signed-off-by: Khin Mi Mi Aung
    Signed-off-by: Steve Dickson
    Signed-off-by: Trond Myklebust

    Steve Dickson
     
  • This enable NFSv4.2 support. To enable this code the
    CONFIG_NFS_V4_2 Kconfig define needs to be set and
    the -o v4.2 mount option need to be used.

    Signed-off-by: Steve Dickson
    Signed-off-by: Trond Myklebust

    Steve Dickson
     

13 May, 2013

1 commit


13 Feb, 2013

1 commit

  • In struct nfs4_ace remove the member who and replace it with an
    anonymous union holding who_uid and who_gid. Allowing typesafe
    storage uids and gids.

    Add a helper pace_gt for sorting posix_acl_entries.

    In struct posix_user_ace_state to replace uid with a union
    of kuid_t uid and kgid_t gid.

    Remove all initializations of the deprecated posic_acl_entry
    e_id field. Which is not present when user namespaces are enabled.

    Split find_uid into two functions find_uid and find_gid that work
    in a typesafe manner.

    In nfs4xdr update nfsd4_encode_fattr to deal with the changes
    in struct nfs4_ace.

    Rewrite nfsd4_encode_name to take a kuid_t and a kgid_t instead
    of a generic id and flag if it is a group or a uid. Replace
    the group flag with a test for a valid gid.

    Modify nfsd4_encode_user to take a kuid_t and call the modifed
    nfsd4_encode_name.

    Modify nfsd4_encode_group to take a kgid_t and call the modified
    nfsd4_encode_name.

    Modify nfsd4_encode_aclname to take an ace instead of taking the
    fields of an ace broken out. This allows it to detect if the ace is
    for a user or a group and to pass the appropriate value while still
    being typesafe.

    Cc: "J. Bruce Fields"
    Cc: Trond Myklebust
    Signed-off-by: "Eric W. Biederman"

    Eric W. Biederman
     

13 Oct, 2012

1 commit


27 May, 2012

1 commit


26 May, 2012

1 commit


25 May, 2012

2 commits


26 Mar, 2012

1 commit


06 Mar, 2012

1 commit


18 Feb, 2012

1 commit


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

2 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