diff options
author | dfr <dfr@FreeBSD.org> | 1995-08-02 13:00:40 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 1995-08-02 13:00:40 +0000 |
commit | 2025cfa67f37a6a4ec6c895380fddda501d5b899 (patch) | |
tree | b6b5b0b3ed6cbb9f8d1d11cc5778ce4ed8c52588 /sys/msdosfs | |
parent | 2fcbb0e5924dba4835a362cf48e446d11a9a4b87 (diff) | |
download | FreeBSD-src-2025cfa67f37a6a4ec6c895380fddda501d5b899.zip FreeBSD-src-2025cfa67f37a6a4ec6c895380fddda501d5b899.tar.gz |
Add support for the va_filerev attribute required by NFSv3.
Diffstat (limited to 'sys/msdosfs')
-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 |
3 files changed, 24 insertions, 3 deletions
diff --git a/sys/msdosfs/denode.h b/sys/msdosfs/denode.h index a7f2928..804d4f6 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 60a6811..2635ac1 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 7abfb47..945ca49 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; } |