04 Aug, 2011

1 commit

  • Currently, there is no guarantee that we will call nfs4_cb_take_slot() even
    though nfs4_callback_compound() will consistently call
    nfs4_cb_free_slot() provided the cb_process_state has set the 'clp' field.
    The result is that we can trigger the BUG_ON() upon the next call to
    nfs4_cb_take_slot().

    This patch fixes the above problem by using the slot id that was taken in
    the CB_SEQUENCE operation as a flag for whether or not we need to call
    nfs4_cb_free_slot().
    It also fixes an atomicity problem: we need to set tbl->highest_used_slotid
    atomically with the check for NFS4_SESSION_DRAINING, otherwise we end up
    racing with the various tests in nfs4_begin_drain_session().

    Cc: stable@kernel.org [2.6.38+]
    Signed-off-by: Trond Myklebust

    Trond Myklebust
     

30 May, 2011

1 commit

  • Note: This functionlaity is incomplete as all layout segments referring to
    the 'to be removed device id' need to be reaped, and all in flight I/O drained.

    [use be32 res in nfs4_callback_devicenotify]
    [use nfs_client to qualify deviceid for cb_notify_deviceid]
    [use global deviceid cache for CB_NOTIFY_DEVICEID]
    [refactor device cache _lookup_deviceid]
    [refactor device cache _find_get_deviceid]
    Signed-off-by: Benny Halevy
    [Bug in new global-device-cache code]
    [layout_driver MUST set free_deviceid_node if using dev-cache]
    Signed-off-by: Boaz Harrosh
    Signed-off-by: Benny Halevy

    Marc Eshel
     

26 Jan, 2011

1 commit

  • The information required to find the nfs_client cooresponding to the incoming
    back channel request is contained in the NFS layer. Perform minimal checking
    in the RPC layer pg_authenticate method, and push more detailed checking into
    the NFS layer where the nfs_client can be found.

    Signed-off-by: Andy Adamson
    Signed-off-by: Trond Myklebust

    Andy Adamson
     

07 Jan, 2011

5 commits

  • While here, update the code a bit.

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

    Alexandros Batsakis
     
  • This is the xdr decoding for CB_LAYOUTRECALL.

    Signed-off-by: Alexandros Batsakis
    Signed-off-by: Dean Hildebrand
    Signed-off-by: Marc Eshel
    Signed-off-by: Andy Adamson
    Signed-off-by: Benny Halevy
    Signed-off-by: Fred Isaman
    Signed-off-by: Trond Myklebust

    Fred Isaman
     
  • Currently session draining only drains the fore channel.
    The back channel processing must also be drained.

    Use the back channel highest_slot_used to indicate that a callback is being
    processed by the callback thread. Move the session complete to be per channel.

    When the session is draininig, wait for any current back channel processing
    to complete and stop all new back channel processing by returning NFS4ERR_DELAY
    to the back channel client.

    Drain the back channel, then the fore channel.

    Signed-off-by: Andy Adamson
    Signed-off-by: Trond Myklebust

    Andy Adamson
     
  • Fixes a bug where the nfs_client could be freed during callback processing.
    Refactor nfs_find_client to use minorversion specific means to locate the
    correct nfs_client structure.

    In the NFS layer, V4.0 clients are found using the callback_ident field in the
    CB_COMPOUND header. V4.1 clients are found using the sessionID in the
    CB_SEQUENCE operation which is also compared against the sessionID associated
    with the back channel thread after a successful CREATE_SESSION.

    Each of these methods finds the one an only nfs_client associated
    with the incoming callback request - so nfs_find_client_next is not needed.

    In the RPC layer, the pg_authenticate call needs to find the nfs_client. For
    the v4.0 callback service, the callback identifier has not been decoded so a
    search by address, version, and minorversion is used. The sessionid for the
    sessions based callback service has (usually) not been set for the
    pg_authenticate on a CB_NULL call which can be sent prior to the return
    of a CREATE_SESSION call, so the sessionid associated with the back channel
    thread is not used to find the client in pg_authenticate for CB_NULL calls.

    Pass the referenced nfs_client to each CB_COMPOUND operation being proceesed
    via the new cb_process_state structure. The reference is held across
    cb_compound processing.

    Use the new cb_process_state struct to move the NFS4ERR_RETRY_UNCACHED_REP
    processing from process_op into nfs4_callback_sequence where it belongs.

    Signed-off-by: Andy Adamson
    Signed-off-by: Trond Myklebust

    Andy Adamson
     
  • The sessions based callback service is started prior to the CREATE_SESSION call
    so that it can handle CB_NULL requests which can be sent before the
    CREATE_SESSION call returns and the session ID is known.

    Set the callback sessionid after a sucessful CREATE_SESSION.

    Signed-off-by: Andy Adamson
    Signed-off-by: Trond Myklebust

    Andy Adamson
     

10 Feb, 2010

1 commit


06 Dec, 2009

2 commits


18 Jun, 2009

10 commits

  • Change the type of cs_addr and csr_status to 'struct sockaddr' and
    '__be32' since the cb_sequence processing function will use existing
    functionality that expects these types.

    Signed-off-by: Ricardo Labiaga
    Signed-off-by: Benny Halevy

    Ricardo Labiaga
     
  • Currently, just free up any referring calls information.

    Signed-off-by: Benny Halevy
    [nfs41: fix csr_{,target}highestslotid]
    Signed-off-by: Benny Halevy

    Benny Halevy
     
  • Signed-off-by: Benny Halevy

    Benny Halevy
     
  • Note that this patch changes the nfsv4.0 behavior also when
    CONFIG_NFS_V4_1 is not defined where NFS4ERR_MINOR_VERS_MISMATCH
    will be returned if the client received a CB_COMPOUND
    with minorversion != 0. Previously, it would have
    returned NFS4ERR_OP_ILLEGAL for CB_SEQUENCE.
    (or if the server is broken and sent OP_CB_GETATTR or OP_CB_RECALL
    with minorversion!=0, they would have been processed normally.

    Signed-off-by: Benny Halevy
    [nfs41: refactor op preprocessing out of process_op]
    See http://linux-nfs.org/pipermail/pnfs/2009-June/007845.html
    [nfs41: define CB_NOTIFY_DEVICEID as not supported]
    Signed-off-by: Benny Halevy

    Benny Halevy
     
  • Signed-off-by: Benny Halevy

    Benny Halevy
     
  • decode cb_compound header conforming to
    http://tools.ietf.org/html/draft-ietf-nfsv4-minorversion1-26

    Get rid of cb_compound_hdr_arg.callback_ident

    callback_ident is not used anywhere so we shouldn't waste any memory to
    store it.

    Signed-off-by: Benny Halevy
    [nfs41: no need to break read_buf in decode_compound_hdr_arg]
    See http://linux-nfs.org/pipermail/pnfs/2009-June/007844.html
    Signed-off-by: Benny Halevy

    Benny Halevy
     
  • Signed-off-by: Benny Halevy

    Benny Halevy
     
  • Tracks the nfs_callback_info for both versions, enabling the callback
    service for v4 and v4.1 to run concurrently and be stopped independently
    of each other.

    Signed-off-by: Ricardo Labiaga
    Signed-off-by: Benny Halevy

    Andy Adamson
     
  • nfs41_callback_up() initializes the necessary queues and creates the new
    nfs41_callback_svc thread. This thread executes the callback service which
    waits for requests to arrive on the svc_serv->sv_cb_list.

    NFS41_BC_MIN_CALLBACKS is set to 1 because we expect callbacks to not
    cause substantial latency.

    The actual processing of the callback will be implemented as a separate patch.

    There is only one NFSv4.1 callback service. The first caller of
    nfs4_callback_up() creates the service, subsequent callers increment a
    reference count on the service. The service is destroyed when the last
    caller invokes nfs_callback_down().

    The transport needs to hold a reference to the callback service in order
    to invoke it during callback processing. Currently this reference is only
    obtained when the service is first created. This is incorrect, since
    subsequent registrations for other transports will leave the xprt->serv
    pointer uninitialized, leading to an oops when a callback arrives on
    the "unreferenced" transport.

    This patch fixes the problem by ensuring that a reference to the service
    is saved in xprt->serv, either because the service is created by this
    invocation to nfs4_callback_up() or by a prior invocation.

    Signed-off-by: Ricardo Labiaga
    Signed-off-by: Benny Halevy
    [nfs41: Add a reference to svc_serv during callback service bring up]
    Signed-off-by: Ricardo Labiaga
    Signed-off-by: Benny Halevy
    [Type check arguments of nfs_callback_up]
    Signed-off-by: Ricardo Labiaga
    Signed-off-by: Benny Halevy
    [nfs41: save svc_serv in nfs_callback_info]
    Signed-off-by: Benny Halevy
    [Removal of ugly #ifdefs]
    [nfs41: Update to removal of ugly #ifdefs]
    Signed-off-by: Ricardo Labiaga
    Signed-off-by: Benny Halevy

    Ricardo Labiaga
     
  • move nfs4_init_callback into nfs4_init_client_minor_version
    and nfs4_destroy_callback into nfs4_clear_client_minor_version

    as these need to happen also when auto-negotiating the minorversion
    once the callback service for nfs41 becomes different than for nfs4.0

    Signed-off-by: Benny Halevy
    [nfs41: Fix checkpatch warning]
    Signed-off-by: Ricardo Labiaga
    Signed-off-by: Benny Halevy
    [Type check arguments of nfs_callback_up]
    Signed-off-by: Ricardo Labiaga
    Signed-off-by: Benny Halevy
    [nfs41: Backchannel: Remove FIXME comment]
    Signed-off-by: Ricardo Labiaga
    Signed-off-by: Benny Halevy

    Benny Halevy
     

29 Mar, 2009

1 commit

  • Apparently a lot of people need to disable IPv6 completely on their
    distributor-built systems, which have CONFIG_IPV6_MODULE enabled at
    build time.

    They do this by blacklisting the ipv6.ko module. This causes the
    creation of the NFSv4 callback service listener to fail if
    CONFIG_IPV6_MODULE is set, but the module cannot be loaded.

    Now that the kernel's PF_INET6 RPC listeners are completely separate
    from PF_INET listeners, we can always start PF_INET. Then the NFS
    client can try to start a PF_INET6 listener, but it isn't required
    to be available.

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

    Chuck Lever
     

30 Jan, 2008

2 commits


15 May, 2007

1 commit

  • - fs/nfs/nfs4xdr.c:2499:42: warning: incorrect type in argument 2
    (different signedness)
    - fs/nfs/nfs4xdr.c:2658:49: warning: incorrect type in argument 4
    (different explicit signedness)
    - fs/nfs/nfs4xdr.c:2683:50: warning: incorrect type in argument 4
    (different explicit signedness)
    - fs/nfs/nfs4xdr.c:3063:68: warning: incorrect type in argument 4
    (different explicit signedness)
    - fs/nfs/nfs4xdr.c:3065:68: warning: incorrect type in argument 4
    (different explicit signedness)

    - fs/nfs/callback_xdr.c:138:31: warning: incorrect type in argument 2
    (different signedness)

    Signed-off-by: Trond Myklebust

    Trond Myklebust
     

21 Oct, 2006

2 commits


23 Sep, 2006

1 commit


07 Jan, 2006

1 commit


17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds