11 Sep, 2012

1 commit


21 Aug, 2012

1 commit

  • Commit d5497fc693a446ce9100fcf4117c3f795ddfd0d2 "nfsd4: move rq_flavor
    into svc_cred" forgot to remove cl_flavor from the client, leaving two
    places (cl_flavor and cl_cred.cr_flavor) for the flavor to be stored.
    After that patch, the latter was the one that was updated, but the
    former was the one that the callback used.

    Symptoms were a long delay on utime(). This is because the utime()
    generated a setattr which recalled a delegation, but the cb_recall was
    ignored by the client because it had the wrong security flavor.

    Cc: stable@vger.kernel.org
    Tested-by: Jamie Heilman
    Reported-by: Jamie Heilman
    Signed-off-by: J. Bruce Fields

    J. Bruce Fields
     

20 Jun, 2012

1 commit

  • For the most part readers of cl_cb_state only need a value that is
    "eventually" right. And the value is set only either 1) in response to
    some change of state, in which case it's set to UNKNOWN and then a
    callback rpc is sent to probe the real state, or b) in the handling of a
    response to such a callback. UNKNOWN is therefore always a "temporary"
    state, and for the other states we're happy to accept last writer wins.

    So I think we're OK here.

    Signed-off-by: J. Bruce Fields

    J. Bruce Fields
     

01 Jun, 2012

1 commit


29 Mar, 2012

1 commit

  • This isn't actually correct, but it works with the Linux client, and
    agrees with the behavior we used to have before commit 80fc015bdfe.

    Later patches will implement the spec-mandated behavior (which is to use
    the security parameters explicitly given by the client in create_session
    or backchannel_ctl).

    Signed-off-by: J. Bruce Fields

    J. Bruce Fields
     

26 Mar, 2012

2 commits

  • We'll need a way to flag the nfs4_client as already being recorded on
    stable storage so that we don't continually upcall. Currently, that's
    recorded in the cl_firststate field of the client struct. Using an
    entire u32 to store a flag is rather wasteful though.

    The cl_cb_flags field is only using 2 bits right now, so repurpose that
    to a generic flags field. Rename NFSD4_CLIENT_KILL to
    NFSD4_CLIENT_CB_KILL to make it evident that it's part of the callback
    flags. Add a mask that we can use for existing checks that look to see
    whether any flags are set, so that the new flags don't interfere.

    Convert all references to cl_firstate to the NFSD4_CLIENT_STABLE flag,
    and add a new NFSD4_CLIENT_RECLAIM_COMPLETE flag.

    Signed-off-by: Jeff Layton
    Signed-off-by: J. Bruce Fields

    Jeff Layton
     
  • The nfs containerization work is a prerequisite for Jeff Layton's reboot
    recovery rework.

    J. Bruce Fields
     

10 Mar, 2012

1 commit

  • Make sure this is set whenever there is no callback channel.

    If a client does not set up a callback channel at all, then it will get
    this flag set from the very start. That's OK, it can just ignore the
    flag if it doesn't care. If a client does care, I think it's better to
    inform it of the problem as early as possible.

    Reported-by: Rick Macklem
    Signed-off-by: J. Bruce Fields

    J. Bruce Fields
     

01 Feb, 2012

2 commits

  • Signed-off-by: Trond Myklebust

    Trond Myklebust
     
  • v2:
    1) "Over-put" of PipeFS mount point fixed. Fix is ugly, but allows to bisect
    the patch set. And it will be removed later in the series.

    This patch makes RPC clients PipeFs dentries allocations in it's owner network
    namespace context.
    RPC client pipefs dentries creation logic has been changed:
    1) Pipefs dentries creation by sb was moved to separated function, which will
    be used for handling PipeFS mount notification.
    2) Initial value of RPC client PipeFS dir dentry is set no NULL now.

    RPC client pipefs dentries cleanup logic has been changed:
    1) Cleanup is done now in separated rpc_remove_pipedir() function, which takes
    care about pipefs superblock locking.

    Also this patch removes slashes from cb_program.pipe_dir_name and from
    NFS_PIPE_DIRNAME to make rpc_d_lookup_sb() work. This doesn't affect
    vfs_path_lookup() results in nfs4blocklayout_init() since this slash is cutted
    off anyway in link_path_walk().

    Signed-off-by: Stanislav Kinsbursky
    Signed-off-by: Trond Myklebust

    Stanislav Kinsbursky
     

05 Jan, 2012

1 commit


24 Oct, 2011

1 commit


27 Sep, 2011

1 commit


14 Sep, 2011

1 commit


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

2 commits

  • Instead of creating the new rpc client from a regular server thread,
    set a flag, kick off a null call, and allow the null call to do the work
    of setting up the client on the callback workqueue.

    Use a spinlock to ensure the callback work gets a consistent view of the
    callback parameters.

    This allows, for example, changing the callback from contexts where
    sleeping is not allowed. I hope it will also keep the locking simple as
    we add more session and trunking features, by serializing most of the
    callback-specific work.

    This also closes a small race where the the new cb_ident could be used
    with an old connection (or vice-versa).

    Signed-off-by: J. Bruce Fields

    J. Bruce Fields
     
  • I don't see the point of the separate struct. It seems to just be
    getting in the way.

    Signed-off-by: J. Bruce Fields

    J. Bruce Fields