23 Feb, 2011

1 commit

  • Fix bug introduced in patch
    85a56480 NFSD: Update XDR decoders in NFSv4 callback client

    Although decode_cb_sequence4resok ignores highest slotid and target highest slotid
    it must account for their space in their xdr stream when calling xdr_inline_decode

    Cc: Chuck Lever
    Signed-off-by: Benny Halevy
    Signed-off-by: J. Bruce Fields

    Benny Halevy
     

14 Feb, 2011

1 commit


15 Jan, 2011

2 commits

  • * '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
     
  • Ensure a new callback is added to the client's list of callbacks at most
    once.

    Signed-off-by: J. Bruce Fields

    J. Bruce Fields
     

14 Jan, 2011

1 commit


12 Jan, 2011

6 commits


05 Jan, 2011

2 commits

  • when callback is generated in NFSv4 server, it doesn't set the source
    address. When an alias IP is utilized on NFSv4 server and suppose the
    client is accessing via that alias IP (e.g. eth0:0), the client invokes
    the callback to the IP address that is set on the original device (e.g.
    eth0). This behavior results in timeout of xprt.
    The patch sets the IP address that the client should invoke callback to.

    Signed-off-by: Takuma Umeya
    [bfields@redhat.com: Simplify gen_callback arguments, use helper function]
    Signed-off-by: J. Bruce Fields

    Takuma Umeya
     
  • setup_callback_client(), nfsd4_release_cb() and nfsd4_process_cb_update()
    do not have users outside the translation unit. Let's declare it as
    static.

    Signed-off-by: Kirill A. Shutemov
    Signed-off-by: J. Bruce Fields

    Kirill A. Shutemov
     

17 Dec, 2010

5 commits

  • Now that all client-side XDR decoder routines use xdr_streams, there
    should be no need to support the legacy calling sequence [rpc_rqst *,
    __be32 *, RPC res *] anywhere. We can construct an xdr_stream in the
    generic RPC code, instead of in each decoder function.

    This is a refactoring change. It should not cause different behavior.

    Signed-off-by: Chuck Lever
    Tested-by: J. Bruce Fields
    Signed-off-by: Trond Myklebust

    Chuck Lever
     
  • Now that all client-side XDR encoder routines use xdr_streams, there
    should be no need to support the legacy calling sequence [rpc_rqst *,
    __be32 *, RPC arg *] anywhere. We can construct an xdr_stream in the
    generic RPC code, instead of in each encoder function.

    Also, all the client-side encoder functions return 0 now, making a
    return value superfluous. Take this opportunity to convert them to
    return void instead.

    This is a refactoring change. It should not cause different behavior.

    Signed-off-by: Chuck Lever
    Tested-by: J. Bruce Fields
    Signed-off-by: Trond Myklebust

    Chuck Lever
     
  • Clean up.

    When I was making other changes in this area, checkscript.pl
    complained about the use of leading blanks in the PROC macros in the
    xdr files.

    Signed-off-by: Chuck Lever
    Tested-by: J. Bruce Fields
    Signed-off-by: Trond Myklebust

    Chuck Lever
     
  • Clean up.

    Remove old-style NFSv4 XDR macros in favor of the style now used in
    fs/nfs/nfs4xdr.c. These were forgotten during the recent nfs4xdr.c
    rewrite.

    Additional whitespace cleanup adds to the size of this patch.

    Signed-off-by: Chuck Lever
    Tested-by: J. Bruce Fields
    Signed-off-by: Trond Myklebust

    Chuck Lever
     
  • Clean up.

    Remove old-style NFSv4 XDR macros in favor of the style now used in
    fs/nfs/nfs4xdr.c. These were forgotten during the recent nfs4xdr.c
    rewrite.

    Signed-off-by: Chuck Lever
    Tested-by: J. Bruce Fields
    Signed-off-by: Trond Myklebust

    Chuck Lever
     

21 Oct, 2010

6 commits

  • In the sessions backchannel case, we don't need a krb5 principal name
    for the client; we use the already-created forechannel credentials
    instead.

    Some cleanup, while we're there: make it clearer which code here is 4.0-
    or sessions- specific.

    Signed-off-by: J. Bruce Fields

    J. Bruce Fields
     
  • The minorversion seems more a property of the client than the callback
    channel.

    Some time we should probably also enforce consistent minorversion usage
    from the client; for now, this is just a cosmetic change.

    Signed-off-by: J. Bruce Fields

    J. Bruce Fields
     
  • Only one of the nfsd4_callback_probe callers actually cares about
    changing the callback information.

    Signed-off-by: J. Bruce Fields

    J. Bruce Fields
     
  • The callback program is allowed to depend on the session which the
    callback is going over.

    No change in behavior yet, while we still only do callbacks over a
    single session for the lifetime of the client.

    Signed-off-by: J. Bruce Fields

    J. Bruce Fields
     
  • Currently we don't deal well with a client that has multiple sessions
    associated with it (even simultaneously, or serially over the lifetime
    of the client).

    In particular, we don't attempt to keep the backchannel running after
    the original session diseappears.

    We will fix that soon.

    Once we do that, we need the slot sequence number to be per-session;
    otherwise, for example, we cannot correctly handle a case like this:

    - All session 1 connections are lost.
    - The client creates session 2. We use it for the backchannel
    (since it's the only working choice).
    - The client gives us a new connection to use with session 1.
    - The client destroys session 2.

    At this point our only choice is to go back to using session 1. When we
    do so we must use the sequence number that is next for session 1. We
    therefore need to maintain multiple sequence number streams.

    Signed-off-by: J. Bruce Fields

    J. Bruce Fields
     
  • Instead of copying the sessionid, use the new cl_cb_session pointer,
    which indicates which session we're using for the backchannel.

    Signed-off-by: J. Bruce Fields

    J. Bruce Fields
     

02 Oct, 2010

8 commits


08 Sep, 2010

1 commit


07 Aug, 2010

1 commit

  • If a callback is retried at nfsd4_cb_recall_done() due to
    some error, the returned rpc reply crashes here:

    @@ -514,6 +514,7 @@ decode_cb_sequence(struct xdr_stream *xdr, struct nfsd4_cb_sequence *res,
    u32 dummy;
    __be32 *p;

    + BUG_ON(!res);
    if (res->cbs_minorversion == 0)
    return 0;

    [BUG_ON added for demonstration]

    This is because the nfsd4_cb_done_sequence() has NULLed out
    the task->tk_msg.rpc_resp pointer.

    Also eventually the rpc would use the new slot without making
    sure it is free by calling nfsd41_cb_setup_sequence().

    This problem was introduced by a 4.1 protocol addition patch:
    [0421b5c5] nfsd41: Backchannel: Implement cb_recall over NFSv4.1

    Which was overlooking the possibility of an RPC callback retries.
    For not-4.1 case redoing the _prepare is harmless.

    Signed-off-by: Boaz Harrosh
    Signed-off-by: J. Bruce Fields

    Boaz Harrosh
     

25 Jun, 2010

2 commits


23 Jun, 2010

1 commit

  • To be used also for the pnfs cb_layoutrecall callback

    Signed-off-by: Benny Halevy
    [nfsd4: fix cb_recall encoding]
    "nfsd: nfs4callback encode_stateid helper function" forgot to reserve
    more space after return from the new helper.
    Reported-by: Michael Groshans
    Signed-off-by: Benny Halevy
    Signed-off-by: J. Bruce Fields

    Benny Halevy
     

01 Jun, 2010

3 commits