From: "J. Bruce Fields" <bfields@fieldses.org>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: trond.myklebust@netapp.com, linux-nfs@vger.kernel.org
Subject: Re: [PATCH 07/14] NFS: Don't swap bytes in nfs4_construct_boot_verifier()
Date: Mon, 21 May 2012 11:40:06 -0400 [thread overview]
Message-ID: <20120521154006.GF24299@fieldses.org> (raw)
In-Reply-To: <20120518220615.774.43776.stgit@degas.1015granger.net>
On Fri, May 18, 2012 at 06:06:16PM -0400, Chuck Lever wrote:
> The SETCLIENTID boot verifier is opaque to NFSv4 servers, thus there
> is no requirement for byte swapping before the client puts the
> verifier on the wire.
>
> This treatment is similar to other timestamp-based verifiers.
The fact that it's opaque means we don't *have* to be consistent about
byte-order. But we can still choose to do so. It may help debugging a
little (by making it just a little easier to decode the on-the-wire
verifier). And changing the encoding of the verifier means it won't
work over boots that cross kernel versions. (I'll admit that's *not* a
big deal--most clients probably take longer than most servers' lease
times anyway--but why do this without a reason?)
--b.
>
> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
> ---
>
> fs/nfs/nfs4proc.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
> index db7b76a..73cfd9e 100644
> --- a/fs/nfs/nfs4proc.c
> +++ b/fs/nfs/nfs4proc.c
> @@ -3937,8 +3937,8 @@ static void nfs4_construct_boot_verifier(struct nfs_client *clp,
> {
> __be32 verf[2];
>
> - verf[0] = htonl((u32)clp->cl_boot_time.tv_sec);
> - verf[1] = htonl((u32)clp->cl_boot_time.tv_nsec);
> + verf[0] = (__be32)clp->cl_boot_time.tv_sec;
> + verf[1] = (__be32)clp->cl_boot_time.tv_nsec;
> memcpy(bootverf->data, verf, sizeof(bootverf->data));
> }
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2012-05-21 15:40 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-18 22:05 [PATCH 00/14] UCS pre-requisites for 3.5 Chuck Lever
2012-05-18 22:05 ` [PATCH 01/14] NFS: Fix comment misspelling in struct nfs_client definition Chuck Lever
2012-05-18 22:05 ` [PATCH 02/14] NFS: Use proper naming conventions for NFSv4.1 server scope fields Chuck Lever
2012-05-19 21:08 ` Myklebust, Trond
2012-05-18 22:05 ` [PATCH 03/14] NFS: Use proper naming conventions for nfs_client.impl_id field Chuck Lever
2012-05-21 15:06 ` Adamson, Dros
2012-05-18 22:05 ` [PATCH 04/14] NFS: Use proper naming conventions for the nfs_client.net field Chuck Lever
2012-05-18 22:05 ` [PATCH 05/14] NFS: Clean up return code checking in nfs4_proc_exchange_id() Chuck Lever
2012-05-21 15:10 ` Adamson, Dros
2012-05-21 15:19 ` Chuck Lever
2012-05-18 22:06 ` [PATCH 06/14] NFS: Remove nfs_unique_id Chuck Lever
2012-05-18 22:06 ` [PATCH 07/14] NFS: Don't swap bytes in nfs4_construct_boot_verifier() Chuck Lever
2012-05-21 15:40 ` J. Bruce Fields [this message]
2012-05-21 15:47 ` Chuck Lever
2012-05-21 15:51 ` J. Bruce Fields
2012-05-18 22:06 ` [PATCH 08/14] NFS: Add NFSDBG_STATE Chuck Lever
2012-05-18 22:06 ` [PATCH 09/14] NFS: Force server to drop NFSv4 state Chuck Lever
2012-05-21 16:08 ` J. Bruce Fields
2012-05-21 16:11 ` J. Bruce Fields
2012-05-21 16:11 ` Chuck Lever
2012-05-21 16:16 ` J. Bruce Fields
2012-05-21 16:24 ` Chuck Lever
2012-05-21 16:49 ` Myklebust, Trond
2012-05-18 22:06 ` [PATCH 10/14] NFS: Always use the same SETCLIENTID boot verifier Chuck Lever
2012-05-18 22:06 ` [PATCH 11/14] NFS: Refactor nfs_get_client(): add nfs_found_client() Chuck Lever
2012-05-18 22:06 ` [PATCH 12/14] NFS: Refactor nfs_get_client(): initialize nfs_client Chuck Lever
2012-05-18 22:07 ` [PATCH 13/14] NFS: Add nfs_client behavior flags Chuck Lever
2012-05-18 22:07 ` [PATCH 14/14] NFS: EXCHANGE_ID should save the server major and minor ID Chuck Lever
-- strict thread matches above, loose matches on Subject: below --
2012-05-22 2:44 [PATCH 00/14 v2] UCS pre-requisites for 3.5 Chuck Lever
2012-05-22 2:45 ` [PATCH 07/14] NFS: Don't swap bytes in nfs4_construct_boot_verifier() Chuck Lever
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120521154006.GF24299@fieldses.org \
--to=bfields@fieldses.org \
--cc=chuck.lever@oracle.com \
--cc=linux-nfs@vger.kernel.org \
--cc=trond.myklebust@netapp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox