26 Nov, 2011

1 commit


02 Nov, 2011

1 commit


24 Oct, 2011

3 commits


19 Oct, 2011

1 commit


17 Oct, 2011

1 commit


12 Oct, 2011

1 commit


11 Oct, 2011

1 commit


27 Sep, 2011

2 commits

  • Use a separate stateid idr per client, and lookup a stateid by first
    finding the client, then looking up the stateid relative to that client.

    Also some minor refactoring.

    This allows us to improve error returns: we can return expired when the
    clientid is not found and bad_stateid when the clientid is found but not
    the stateid, as opposed to returning expired for both cases.

    I hope this will also help to replace the state lock mostly by a
    per-client lock, but that hasn't been done yet.

    Signed-off-by: J. Bruce Fields

    J. Bruce Fields
     
  • Test_stateid is 4.1-only and only allowed after a sequence operation, so
    this check is unnecessary.

    Cc: Bryan Schumaker
    Signed-off-by: J. Bruce Fields

    J. Bruce Fields
     

17 Sep, 2011

1 commit


16 Sep, 2011

1 commit

  • For checking the size of reply before calling a operation,
    we need try to get maxsize of the operation's reply.

    v3: using new method as Bruce said,

    "we could handle operations in two different ways:

    - For operations that actually change something (write, rename,
    open, close, ...), do it the way we're doing it now: be
    very careful to estimate the size of the response before even
    processing the operation.
    - For operations that don't change anything (read, getattr, ...)
    just go ahead and do the operation. If you realize after the
    fact that the response is too large, then return the error at
    that point.

    So we'd add another flag to op_flags: say, OP_MODIFIES_SOMETHING. And for
    operations with OP_MODIFIES_SOMETHING set, we'd do the first thing. For
    operations without it set, we'd do the second."

    Signed-off-by: Mi Jinlong
    [bfields@redhat.com: crash, don't attempt to handle, undefined op_rsize_bop]
    Signed-off-by: J. Bruce Fields

    Mi Jinlong
     

14 Sep, 2011

1 commit

  • The current code is sort of hackish in that it assumes a referral is always
    matched to an export. When we add support for junctions that may not be the
    case.
    We can replace nfsd4_path() with a function that encodes the components
    directly from the dentries. Since nfsd4_path is currently the only user of
    the 'ex_pathname' field in struct svc_export, this has the added benefit
    of allowing us to get rid of that.

    Signed-off-by: Trond Myklebust
    Reviewed-by: Jeff Layton
    Signed-off-by: J. Bruce Fields

    Trond Myklebust
     

07 Sep, 2011

1 commit


01 Sep, 2011

4 commits


28 Aug, 2011

1 commit


27 Aug, 2011

2 commits

  • The nfsd4 code has a bunch of special exceptions for error returns which
    map nfserr_symlink to other errors.

    In fact, the spec makes it clear that nfserr_symlink is to be preferred
    over less specific errors where possible.

    The patch that introduced it back in 2.6.4 is "kNFSd: correct symlink
    related error returns.", which claims that these special exceptions are
    represent an NFSv4 break from v2/v3 tradition--when in fact the symlink
    error was introduced with v4.

    I suspect what happened was pynfs tests were written that were overly
    faithful to the (known-incomplete) rfc3530 error return lists, and then
    code was fixed up mindlessly to make the tests pass.

    Delete these unnecessary exceptions.

    Signed-off-by: J. Bruce Fields

    J. Bruce Fields
     
  • A slightly unconventional approach to make the code more compact I could
    live with, but let's give the poor reader *some* chance.

    Signed-off-by: J. Bruce Fields

    J. Bruce Fields
     

20 Aug, 2011

1 commit

  • The set of errors here does *not* agree with the set of errors specified
    in the rfc!

    While we're there, turn this macros into a function, for the usual
    reasons, and move it to the one place where it's actually used.

    Cc: stable@kernel.org
    Signed-off-by: J. Bruce Fields

    J. Bruce Fields
     

18 Jul, 2011

2 commits


16 Jul, 2011

2 commits


19 May, 2011

1 commit


30 Apr, 2011

2 commits

  • Compiling gave me this warning:
    fs/nfsd/nfs4xdr.c: In function ‘nfsd4_decode_bind_conn_to_session’:
    fs/nfsd/nfs4xdr.c:427:6: warning: variable ‘dummy’ set but not used
    [-Wunused-but-set-variable]

    The local variable "dummy" wasn't being used past the READ32() macro that
    set it. READ_BUF() should ensure that the xdr buffer is pushed past the
    data read into dummy already, so nothing needs to be read in.

    Signed-off-by: Bryan Schumaker
    [bfields@redhat.com: minor comment fixup.]
    Signed-off-by: J. Bruce Fields

    Bryan Schumaker
     
  • RFC 5661 Section 18.11.3

    The clientid field of the owner MAY be set to any value by the client
    and MUST be ignored by the server. The reason the server MUST ignore
    the clientid field is that the server MUST derive the client ID from
    the session ID from the SEQUENCE operation of the COMPOUND request.

    Signed-off-by: Andy Adamson
    Signed-off-by: J. Bruce Fields

    Andy Adamson
     

18 Mar, 2011

1 commit

  • We must not use dummy for index.
    After the first index, READ32(dummy) will change dummy!!!!

    Signed-off-by: Mi Jinlong
    [bfields@redhat.com: Trond points out READ_BUF alone is sufficient.]
    Cc: stable@kernel.org
    Signed-off-by: J. Bruce Fields

    Mi Jinlong
     

09 Mar, 2011

1 commit


17 Feb, 2011

1 commit

  • These functions return an nfs status, not a host_err. So don't
    try to convert before returning.

    This is a regression introduced by
    3c726023402a2f3b28f49b9d90ebf9e71151157d; I fixed up two of the callers,
    but missed these two.

    Cc: stable@kernel.org
    Reported-by: Herbert Poetzl
    Signed-off-by: NeilBrown
    Signed-off-by: J. Bruce Fields

    NeilBrown
     

12 Jan, 2011

2 commits


05 Jan, 2011

3 commits


30 Dec, 2010

1 commit

  • The secinfo_no_name code oopses on encoding with

    BUG: unable to handle kernel NULL pointer dereference at 00000044
    IP: [] nfsd4_encode_secinfo+0x1c/0x1c1 [nfsd]

    We should implement a nfsd4_encode_secinfo_no_name() instead using
    nfsd4_encode_secinfo().

    Signed-off-by: Mi Jinlong
    Signed-off-by: J. Bruce Fields

    Mi Jinlong
     

18 Dec, 2010

1 commit