diff options
author | Doug Rabson <dfr@FreeBSD.org> | 1995-08-02 13:00:40 +0000 |
---|---|---|
committer | Doug Rabson <dfr@FreeBSD.org> | 1995-08-02 13:00:40 +0000 |
commit | 94a8606f1bb327fc589cbb2508f7382bfdd4d185 (patch) | |
tree | b6b5b0b3ed6cbb9f8d1d11cc5778ce4ed8c52588 /sys | |
parent | e581051d3d9db256c468011ce1950e520397ba63 (diff) | |
download | src-94a8606f1bb327fc589cbb2508f7382bfdd4d185.tar.gz src-94a8606f1bb327fc589cbb2508f7382bfdd4d185.zip |
Add support for the va_filerev attribute required by NFSv3.
Notes
Notes:
svn path=/head/; revision=9862
Diffstat (limited to 'sys')
-rw-r--r-- | sys/fs/cd9660/cd9660_vnops.c | 3 | ||||
-rw-r--r-- | sys/fs/msdosfs/denode.h | 3 | ||||
-rw-r--r-- | sys/fs/msdosfs/msdosfs_denode.c | 21 | ||||
-rw-r--r-- | sys/fs/msdosfs/msdosfs_vnops.c | 3 | ||||
-rw-r--r-- | sys/isofs/cd9660/cd9660_vnops.c | 3 | ||||
-rw-r--r-- | sys/msdosfs/denode.h | 3 | ||||
-rw-r--r-- | sys/msdosfs/msdosfs_denode.c | 21 | ||||
-rw-r--r-- | sys/msdosfs/msdosfs_vnops.c | 3 |
8 files changed, 52 insertions, 8 deletions
diff --git a/sys/fs/cd9660/cd9660_vnops.c b/sys/fs/cd9660/cd9660_vnops.c index 3b538a8d0cb5..f7385656cc20 100644 --- a/sys/fs/cd9660/cd9660_vnops.c +++ b/sys/fs/cd9660/cd9660_vnops.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)cd9660_vnops.c 8.3 (Berkeley) 1/23/94 - * $Id: cd9660_vnops.c,v 1.13 1995/03/28 07:46:38 phk Exp $ + * $Id: cd9660_vnops.c,v 1.14 1995/05/30 08:05:05 rgrimes Exp $ */ #include <sys/param.h> @@ -202,6 +202,7 @@ cd9660_getattr(ap) vap->va_blocksize = ip->i_mnt->logical_block_size; vap->va_bytes = (u_quad_t) ip->i_size; vap->va_type = vp->v_type; + vap->va_filerev = 0; return (0); } diff --git a/sys/fs/msdosfs/denode.h b/sys/fs/msdosfs/denode.h index a7f2928ec8c5..804d4f65bdd7 100644 --- a/sys/fs/msdosfs/denode.h +++ b/sys/fs/msdosfs/denode.h @@ -1,4 +1,4 @@ -/* $Id: denode.h,v 1.4 1995/03/16 18:14:17 bde Exp $ */ +/* $Id: denode.h,v 1.5 1995/05/30 08:07:32 rgrimes Exp $ */ /* $NetBSD: denode.h,v 1.8 1994/08/21 18:43:49 ws Exp $ */ /*- @@ -159,6 +159,7 @@ struct denode { u_short de_StartCluster; /* starting cluster of file */ u_long de_FileSize; /* size of file in bytes */ struct fatcache de_fc[FC_SIZE]; /* fat cache */ + u_quad_t de_modrev; /* Revision level for lease. */ }; /* diff --git a/sys/fs/msdosfs/msdosfs_denode.c b/sys/fs/msdosfs/msdosfs_denode.c index 60a68111833d..2635ac17a099 100644 --- a/sys/fs/msdosfs/msdosfs_denode.c +++ b/sys/fs/msdosfs/msdosfs_denode.c @@ -1,4 +1,4 @@ -/* $Id: msdosfs_denode.c,v 1.11 1995/04/11 17:13:17 bde Exp $ */ +/* $Id: msdosfs_denode.c,v 1.12 1995/05/30 08:07:37 rgrimes Exp $ */ /* $NetBSD: msdosfs_denode.c,v 1.9 1994/08/21 18:44:00 ws Exp $ */ /*- @@ -70,6 +70,23 @@ struct denode **dehashtbl; u_long dehash; /* size of hash table - 1 */ #define DEHASH(dev, deno) (((dev) + (deno)) & dehash) +union _qcvt { + quad_t qcvt; + long val[2]; +}; +#define SETHIGH(q, h) { \ + union _qcvt tmp; \ + tmp.qcvt = (q); \ + tmp.val[_QUAD_HIGHWORD] = (h); \ + (q) = tmp.qcvt; \ +} +#define SETLOW(q, l) { \ + union _qcvt tmp; \ + tmp.qcvt = (q); \ + tmp.val[_QUAD_LOWWORD] = (l); \ + (q) = tmp.qcvt; \ +} + int msdosfs_init() { dehashtbl = hashinit(desiredvnodes/2, M_MSDOSFSMNT, &dehash); @@ -297,6 +314,8 @@ deget(pmp, dirclust, diroffset, direntptr, depp) } } else nvp->v_type = VREG; + SETHIGH(ldep->de_modrev, mono_time.tv_sec); + SETLOW(ldep->de_modrev, mono_time.tv_usec * 4294); VREF(ldep->de_devvp); *depp = ldep; return 0; diff --git a/sys/fs/msdosfs/msdosfs_vnops.c b/sys/fs/msdosfs/msdosfs_vnops.c index 7abfb479eddf..945ca49d73ac 100644 --- a/sys/fs/msdosfs/msdosfs_vnops.c +++ b/sys/fs/msdosfs/msdosfs_vnops.c @@ -1,4 +1,4 @@ -/* $Id: msdosfs_vnops.c,v 1.18 1995/06/28 07:06:48 davidg Exp $ */ +/* $Id: msdosfs_vnops.c,v 1.19 1995/08/01 18:50:55 davidg Exp $ */ /* $NetBSD: msdosfs_vnops.c,v 1.20 1994/08/21 18:44:13 ws Exp $ */ /*- @@ -336,6 +336,7 @@ msdosfs_getattr(ap) vap->va_bytes = (dep->de_FileSize + dep->de_pmp->pm_crbomask) & ~(dep->de_pmp->pm_crbomask); vap->va_type = ap->a_vp->v_type; + vap->va_filerev = dep->de_modrev; return 0; } diff --git a/sys/isofs/cd9660/cd9660_vnops.c b/sys/isofs/cd9660/cd9660_vnops.c index 3b538a8d0cb5..f7385656cc20 100644 --- a/sys/isofs/cd9660/cd9660_vnops.c +++ b/sys/isofs/cd9660/cd9660_vnops.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)cd9660_vnops.c 8.3 (Berkeley) 1/23/94 - * $Id: cd9660_vnops.c,v 1.13 1995/03/28 07:46:38 phk Exp $ + * $Id: cd9660_vnops.c,v 1.14 1995/05/30 08:05:05 rgrimes Exp $ */ #include <sys/param.h> @@ -202,6 +202,7 @@ cd9660_getattr(ap) vap->va_blocksize = ip->i_mnt->logical_block_size; vap->va_bytes = (u_quad_t) ip->i_size; vap->va_type = vp->v_type; + vap->va_filerev = 0; return (0); } diff --git a/sys/msdosfs/denode.h b/sys/msdosfs/denode.h index a7f2928ec8c5..804d4f65bdd7 100644 --- a/sys/msdosfs/denode.h +++ b/sys/msdosfs/denode.h @@ -1,4 +1,4 @@ -/* $Id: denode.h,v 1.4 1995/03/16 18:14:17 bde Exp $ */ +/* $Id: denode.h,v 1.5 1995/05/30 08:07:32 rgrimes Exp $ */ /* $NetBSD: denode.h,v 1.8 1994/08/21 18:43:49 ws Exp $ */ /*- @@ -159,6 +159,7 @@ struct denode { u_short de_StartCluster; /* starting cluster of file */ u_long de_FileSize; /* size of file in bytes */ struct fatcache de_fc[FC_SIZE]; /* fat cache */ + u_quad_t de_modrev; /* Revision level for lease. */ }; /* diff --git a/sys/msdosfs/msdosfs_denode.c b/sys/msdosfs/msdosfs_denode.c index 60a68111833d..2635ac17a099 100644 --- a/sys/msdosfs/msdosfs_denode.c +++ b/sys/msdosfs/msdosfs_denode.c @@ -1,4 +1,4 @@ -/* $Id: msdosfs_denode.c,v 1.11 1995/04/11 17:13:17 bde Exp $ */ +/* $Id: msdosfs_denode.c,v 1.12 1995/05/30 08:07:37 rgrimes Exp $ */ /* $NetBSD: msdosfs_denode.c,v 1.9 1994/08/21 18:44:00 ws Exp $ */ /*- @@ -70,6 +70,23 @@ struct denode **dehashtbl; u_long dehash; /* size of hash table - 1 */ #define DEHASH(dev, deno) (((dev) + (deno)) & dehash) +union _qcvt { + quad_t qcvt; + long val[2]; +}; +#define SETHIGH(q, h) { \ + union _qcvt tmp; \ + tmp.qcvt = (q); \ + tmp.val[_QUAD_HIGHWORD] = (h); \ + (q) = tmp.qcvt; \ +} +#define SETLOW(q, l) { \ + union _qcvt tmp; \ + tmp.qcvt = (q); \ + tmp.val[_QUAD_LOWWORD] = (l); \ + (q) = tmp.qcvt; \ +} + int msdosfs_init() { dehashtbl = hashinit(desiredvnodes/2, M_MSDOSFSMNT, &dehash); @@ -297,6 +314,8 @@ deget(pmp, dirclust, diroffset, direntptr, depp) } } else nvp->v_type = VREG; + SETHIGH(ldep->de_modrev, mono_time.tv_sec); + SETLOW(ldep->de_modrev, mono_time.tv_usec * 4294); VREF(ldep->de_devvp); *depp = ldep; return 0; diff --git a/sys/msdosfs/msdosfs_vnops.c b/sys/msdosfs/msdosfs_vnops.c index 7abfb479eddf..945ca49d73ac 100644 --- a/sys/msdosfs/msdosfs_vnops.c +++ b/sys/msdosfs/msdosfs_vnops.c @@ -1,4 +1,4 @@ -/* $Id: msdosfs_vnops.c,v 1.18 1995/06/28 07:06:48 davidg Exp $ */ +/* $Id: msdosfs_vnops.c,v 1.19 1995/08/01 18:50:55 davidg Exp $ */ /* $NetBSD: msdosfs_vnops.c,v 1.20 1994/08/21 18:44:13 ws Exp $ */ /*- @@ -336,6 +336,7 @@ msdosfs_getattr(ap) vap->va_bytes = (dep->de_FileSize + dep->de_pmp->pm_crbomask) & ~(dep->de_pmp->pm_crbomask); vap->va_type = ap->a_vp->v_type; + vap->va_filerev = dep->de_modrev; return 0; } |