* [PATCH 2/2] nfs: Initialize cb_sequenceres information before validate_seqid()
@ 2015-06-02 10:59 Kinglong Mee
2015-06-12 0:32 ` Kinglong Mee
0 siblings, 1 reply; 2+ messages in thread
From: Kinglong Mee @ 2015-06-02 10:59 UTC (permalink / raw)
To: Trond Myklebust, linux-nfs@vger.kernel.org
Cc: Weston Andros Adamson, J. Bruce Fields, kinglongmee,
Christoph Hellwig
For a cb_layoutrecall replay, nfsd got CB_SEQUENCE status of zero,
but all informations of cb_sequenceres are zero too !!!
validate_seqid() return NFS4ERR_RETRY_UNCACHED_REP for a replay,
and skip the initlize cb_sequenceres.
Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
---
fs/nfs/callback_proc.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c
index 7e9653a..17a5c57 100644
--- a/fs/nfs/callback_proc.c
+++ b/fs/nfs/callback_proc.c
@@ -445,6 +445,13 @@ __be32 nfs4_callback_sequence(struct cb_sequenceargs *args,
goto out;
}
+ memcpy(&res->csr_sessionid, &args->csa_sessionid,
+ sizeof(res->csr_sessionid));
+ res->csr_sequenceid = args->csa_sequenceid;
+ res->csr_slotid = args->csa_slotid;
+ res->csr_highestslotid = NFS41_BC_MAX_CALLBACKS - 1;
+ res->csr_target_highestslotid = NFS41_BC_MAX_CALLBACKS - 1;
+
status = validate_seqid(tbl, args);
spin_unlock(&tbl->slot_tbl_lock);
if (status)
@@ -462,13 +469,6 @@ __be32 nfs4_callback_sequence(struct cb_sequenceargs *args,
goto out;
}
- memcpy(&res->csr_sessionid, &args->csa_sessionid,
- sizeof(res->csr_sessionid));
- res->csr_sequenceid = args->csa_sequenceid;
- res->csr_slotid = args->csa_slotid;
- res->csr_highestslotid = NFS41_BC_MAX_CALLBACKS - 1;
- res->csr_target_highestslotid = NFS41_BC_MAX_CALLBACKS - 1;
-
/*
* RFC5661 20.9.3
* If CB_SEQUENCE returns an error, then the state of the slot
--
2.4.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 2/2] nfs: Initialize cb_sequenceres information before validate_seqid()
2015-06-02 10:59 [PATCH 2/2] nfs: Initialize cb_sequenceres information before validate_seqid() Kinglong Mee
@ 2015-06-12 0:32 ` Kinglong Mee
0 siblings, 0 replies; 2+ messages in thread
From: Kinglong Mee @ 2015-06-12 0:32 UTC (permalink / raw)
To: Trond Myklebust, linux-nfs@vger.kernel.org
Cc: Weston Andros Adamson, J. Bruce Fields, Christoph Hellwig
And this one.
Ping ...
On 6/2/2015 6:59 PM, Kinglong Mee wrote:
> For a cb_layoutrecall replay, nfsd got CB_SEQUENCE status of zero,
> but all informations of cb_sequenceres are zero too !!!
>
> validate_seqid() return NFS4ERR_RETRY_UNCACHED_REP for a replay,
> and skip the initlize cb_sequenceres.
>
> Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
> ---
> fs/nfs/callback_proc.c | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c
> index 7e9653a..17a5c57 100644
> --- a/fs/nfs/callback_proc.c
> +++ b/fs/nfs/callback_proc.c
> @@ -445,6 +445,13 @@ __be32 nfs4_callback_sequence(struct cb_sequenceargs *args,
> goto out;
> }
>
> + memcpy(&res->csr_sessionid, &args->csa_sessionid,
> + sizeof(res->csr_sessionid));
> + res->csr_sequenceid = args->csa_sequenceid;
> + res->csr_slotid = args->csa_slotid;
> + res->csr_highestslotid = NFS41_BC_MAX_CALLBACKS - 1;
> + res->csr_target_highestslotid = NFS41_BC_MAX_CALLBACKS - 1;
> +
> status = validate_seqid(tbl, args);
> spin_unlock(&tbl->slot_tbl_lock);
> if (status)
> @@ -462,13 +469,6 @@ __be32 nfs4_callback_sequence(struct cb_sequenceargs *args,
> goto out;
> }
>
> - memcpy(&res->csr_sessionid, &args->csa_sessionid,
> - sizeof(res->csr_sessionid));
> - res->csr_sequenceid = args->csa_sequenceid;
> - res->csr_slotid = args->csa_slotid;
> - res->csr_highestslotid = NFS41_BC_MAX_CALLBACKS - 1;
> - res->csr_target_highestslotid = NFS41_BC_MAX_CALLBACKS - 1;
> -
> /*
> * RFC5661 20.9.3
> * If CB_SEQUENCE returns an error, then the state of the slot
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-06-12 0:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-02 10:59 [PATCH 2/2] nfs: Initialize cb_sequenceres information before validate_seqid() Kinglong Mee
2015-06-12 0:32 ` Kinglong Mee
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.