[pnfs] 4.1-sessions branch and exchange_id
William A. (Andy) Adamson
andros at citi.umich.edu
Wed Apr 4 08:14:23 EDT 2007
On 4/4/07, Benny Halevy <bhalevy at panasas.com> wrote:
>
> Andy, in patch 0001-Update-client-exchange_id-
> structures-to-minorversion.patch
> +struct nfs_impl_id4 {
> + u32 domain_len;
> + char * domain;
> + u32 name_len;
> + char * name;
> + struct timespec date;
>
> => struct nfstime4 date;
> according to i-d. the difference is that the seconds field is 64 bit wide
yes, i know. i believe that the timespec struct does it correctly - it's 64
bits on platforms that support a 64 bit time, and 32 bits on those that
don't. currently, there are no platforms with at kernel_time_t of 64bits. on
all the platforms below __kernel_time_t is a long.
__kernel_time_t Defined as a type in:
- include/asm-alpha/posix_types.h, line
22<http://lxr.linux.no/source/include/asm-alpha/posix_types.h#L22>
- include/asm-arm/posix_types.h, line
33<http://lxr.linux.no/source/include/asm-arm/posix_types.h#L33>
- include/asm-arm26/posix_types.h, line
33<http://lxr.linux.no/source/include/asm-arm26/posix_types.h#L33>
- include/asm-avr32/posix_types.h, line
28<http://lxr.linux.no/source/include/asm-avr32/posix_types.h#L28>
- include/asm-cris/posix_types.h, line
26<http://lxr.linux.no/source/include/asm-cris/posix_types.h#L26>
- include/asm-frv/posix_types.h, line
21<http://lxr.linux.no/source/include/asm-frv/posix_types.h#L21>
- include/asm-h8300/posix_types.h, line
21<http://lxr.linux.no/source/include/asm-h8300/posix_types.h#L21>
- include/asm-i386/posix_types.h, line
21<http://lxr.linux.no/source/include/asm-i386/posix_types.h#L21>
- include/asm-ia64/posix_types.h, line
27<http://lxr.linux.no/source/include/asm-ia64/posix_types.h#L27>
- include/asm-m32r/posix_types.h, line
25<http://lxr.linux.no/source/include/asm-m32r/posix_types.h#L25>
- include/asm-m68k/posix_types.h, line
21<http://lxr.linux.no/source/include/asm-m68k/posix_types.h#L21>
- include/asm-mips/posix_types.h, line
43<http://lxr.linux.no/source/include/asm-mips/posix_types.h#L43>
- include/asm-parisc/posix_types.h, line
27<http://lxr.linux.no/source/include/asm-parisc/posix_types.h#L27>
- include/asm-parisc/posix_types.h, line
32<http://lxr.linux.no/source/include/asm-parisc/posix_types.h#L32>
- include/asm-powerpc/posix_types.h, line
17<http://lxr.linux.no/source/include/asm-powerpc/posix_types.h#L17>
- include/asm-s390/posix_types.h, line
21<http://lxr.linux.no/source/include/asm-s390/posix_types.h#L21>
- include/asm-sh/posix_types.h, line
21<http://lxr.linux.no/source/include/asm-sh/posix_types.h#L21>
- include/asm-sh64/posix_types.h, line
30<http://lxr.linux.no/source/include/asm-sh64/posix_types.h#L30>
- include/asm-sparc/posix_types.h, line
13<http://lxr.linux.no/source/include/asm-sparc/posix_types.h#L13>
- include/asm-sparc64/posix_types.h, line
13<http://lxr.linux.no/source/include/asm-sparc64/posix_types.h#L13>
- include/asm-v850/posix_types.h, line
30<http://lxr.linux.no/source/include/asm-v850/posix_types.h#L30>
- include/asm-x86_64/posix_types.h, line
21<http://lxr.linux.no/source/include/asm-x86_64/posix_types.h#L21>
- include/asm-xtensa/posix_types.h, line
33<http://lxr.linux.no/source/include/asm-xtensa/posix_types.h#L33>
64 bits of seconds has no meaning on a platform that only supports 32 bits
worth. this is why the timespec struct is used for all the other times in
the NFSv4.0 protocol - for example
include/linux/nfs_xdr.h:
struct nfs_fattr {
unsigned short valid; /* which fields are valid */
__u64 pre_size; /* pre_op_attr.size */
struct timespec pre_mtime; /* pre_op_attr.mtime */
struct timespec pre_ctime; /* pre_op_attr.ctime */
enum nfs_ftype type; /* always use NFSv2 types */
__u32 mode;
__u32 nlink;
__u32 uid;
__u32 gid;
__u64 size;
union {
struct {
__u32 blocksize;
__u32 blocks;
} nfs2;
struct {
__u64 used;
} nfs3;
} du;
dev_t rdev;
struct nfs_fsid fsid;
__u64 fileid;
struct timespec atime;
struct timespec mtime;
struct timespec ctime;
where the spec defines all of these times as an nfs4time4.
typedef nfstime4 fattr4_time_backup;
typedef nfstime4 fattr4_time_create;
typedef nfstime4 fattr4_time_delta;
typedef nfstime4 fattr4_time_metadata;
typedef nfstime4 fattr4_time_modify;
and in fs/nfs/nfs4xdr.h they are encoded as follows:
if (iap->ia_valid & ATTR_ATIME_SET) {
bmval1 |= FATTR4_WORD1_TIME_ACCESS_SET;
WRITE32(NFS4_SET_TO_CLIENT_TIME);
WRITE32(0);
WRITE32(iap->ia_mtime.tv_sec);
WRITE32(iap->ia_mtime.tv_nsec); }
else if (iap->ia_valid & ATTR_ATIME) {
bmval1 |= FATTR4_WORD1_TIME_ACCESS_SET;
WRITE32(NFS4_SET_TO_SERVER_TIME);
}
if (iap->ia_valid & ATTR_MTIME_SET) {
bmval1 |= FATTR4_WORD1_TIME_MODIFY_SET;
WRITE32(NFS4_SET_TO_CLIENT_TIME);
WRITE32(0);
WRITE32(iap->ia_mtime.tv_sec);
WRITE32(iap->ia_mtime.tv_nsec);
and correspondingly,
> in 0003-Update-nfs4_proc_exchange_id-to-minorversion1-10.patch:
> + args.impl_id.date.tv_sec = htonl((u32)clp->cl_boot_time.tv_sec);
> + args.impl_id.date.tv_nsec = htonl((u32)clp->cl_boot_time.tv_nsec);
>
> => args.impl_id.date.tv_sec = clp->cl_boot_time.tv_sec;
> => args.impl_id.date.tv_nsec = clp->cl_boot_time.tv_nsec;
>
> No need to store in net order here since this is done later in
> encode_exchange_id()
ok.
-->Andy
in 0004-Update-exchange_id-encode-XDR-to-minorversion1-10.patch
>
> + WRITE32(args->impl_id.date.tv_sec);
> => WRITE64(args->impl_id.date.tv_sec);
Benny
>
> William A. (Andy) Adamson wrote:
> > hi
> >
> > i have a set of slot table server patches that i will put up today for
> > review. but first, we have a slight problem with exchange_id
> >
> > 1) the patch from marc that updated exchange_id to
> > draft-ietf-nfsv4-minorversion1-10 was applied to the master (pnfs)
> branch.
> > it needs to be applied to the 4.1-sessions branch and then merged with
> the
> > master.
> >
> > 2) the updated exchange_id code that is currently in the master branch
> has a
> > couple of issues - i'm not sure the latest code where marc responded to
> > comments actually got into the master.
> >
> > so - i want to apply a 'good' version of the exchange_id update to
> latest
> > dratf patch to the 4.1-sessions branch. i've included a set of 4 small
> > patches that i think do the job. could you please review?
> >
> > the 5th patch applies a fix to the sessions branch that is also in the
> > master branch - can't run without it...
> >
> > thanks
> >
> > -->Andy
> >
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > pNFS mailing list
> > pNFS at linux-nfs.org
> > http://linux-nfs.org/cgi-bin/mailman/listinfo/pnfs
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://linux-nfs.org/pipermail/pnfs/attachments/20070404/34d82ca1/attachment-0001.htm
More information about the pNFS
mailing list