02 Dec, 2016

1 commit

  • When initializing a freshly created slot for the calllback channel,
    the seq_nr needs to be 0, not 1. Otherwise validate_seqid
    and nfs4_slot_wait_on_seqid get confused and believe that the
    mpty slot corresponds to a previously sent reply.

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

    Fred Isaman
     

08 Nov, 2016

1 commit

  • Fix the following warn:

    fs/nfs/nfs4session.c: In function ‘nfs4_slot_seqid_in_use’:
    fs/nfs/nfs4session.c:203:54: warning: ‘cur_seq’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    if (nfs4_slot_get_seqid(tbl, slotid, &cur_seq) == 0 &&
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
    cur_seq == seq_nr && test_bit(slotid, tbl->used_slots))
    ~~~~~~~~~~~~~~~~~

    Signed-off-by: Shuah Khan
    Signed-off-by: Anna Schumaker

    Shuah Khan
     

25 Oct, 2016

1 commit

  • A bugfix introduced a harmless gcc warning in nfs4_slot_seqid_in_use
    if we enable -Wmaybe-uninitialized again:

    fs/nfs/nfs4session.c:203:54: error: 'cur_seq' may be used uninitialized in this function [-Werror=maybe-uninitialized]

    gcc is not smart enough to conclude that the IS_ERR/PTR_ERR pair
    results in a nonzero return value here. Using PTR_ERR_OR_ZERO()
    instead makes this clear to the compiler.

    The warning originally did not appear in v4.8 as it was globally
    disabled, but the bugfix that introduced the warning got backported
    to stable kernels which again enable it, and this is now the only
    warning in the v4.7 builds.

    Fixes: e09c978aae5b ("NFSv4.1: Fix Oopsable condition in server callback races")
    Signed-off-by: Arnd Bergmann
    Cc: Trond Myklebust
    Signed-off-by: Anna Schumaker

    Arnd Bergmann
     

29 Aug, 2016

2 commits


25 Jan, 2016

1 commit


19 Feb, 2015

1 commit


02 Feb, 2014

1 commit


05 Sep, 2013

1 commit

  • linux/fs/nfs/nfs4session.c:337:6: warning:
    symbol 'nfs41_set_target_slotid' was not declared. Should it be static?

    Move nfs41_set_target_slotid() and nfs41_update_target_slotid() back
    behind CONFIG_NFS_V4_1, since, in the final revision of this work,
    they are used only in NFSv4.1 and later.

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

    Chuck Lever
     

04 Sep, 2013

4 commits


08 Aug, 2013

1 commit

  • Never try to use a non-UID 0 user credential for lease management,
    as that credential can change out from under us. The server will
    block NFSv4 lease recovery with NFS4ERR_CLID_INUSE.

    Since the mechanism to acquire a credential for lease management
    is now the same for all minor versions, replace the minor version-
    specific callout with a single function.

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

    Chuck Lever
     

29 Jun, 2013

1 commit

  • nfs4_init_session was originally written to be called prior to
    nfs4_init_channel_attrs, setting the session target_max response and request
    sizes that nfs4_init_channel_attrs would pay attention to.

    In the current code flow, nfs4_init_session, just like nfs4_init_ds_session
    for the data server case, is called after the session is all negotiated, and
    is actually used in a RECLAIM COMPLETE call to the server.

    Remove the un-needed fc_target_max response and request fields from
    nfs4_session and just set the max_resp_sz and max_rqst_sz in
    nfs4_init_channel_attrs.

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

    Andy Adamson
     

21 May, 2013

1 commit

  • On a CB_RECALL the callback service thread flushes the inode using
    filemap_flush prior to scheduling the state manager thread to return the
    delegation. When pNFS is used and I/O has not yet gone to the data server
    servicing the inode, a LAYOUTGET can preceed the I/O. Unlike the async
    filemap_flush call, the LAYOUTGET must proceed to completion.

    If the state manager starts to recover data while the inode flush is sending
    the LAYOUTGET, a deadlock occurs as the callback service thread holds the
    single callback session slot until the flushing is done which blocks the state
    manager thread, and the state manager thread has set the session draining bit
    which puts the inode flush LAYOUTGET RPC to sleep on the forechannel slot
    table waitq.

    Separate the draining of the back channel from the draining of the fore channel
    by moving the NFS4_SESSION_DRAINING bit from session scope into the fore
    and back slot tables. Drain the back channel first allowing the LAYOUTGET
    call to proceed (and fail) so the callback service thread frees the callback
    slot. Then proceed with draining the forechannel.

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

    Andy Adamson
     

16 Dec, 2012

2 commits


12 Dec, 2012

1 commit


06 Dec, 2012

3 commits