mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-20 15:43:16 +00:00
Add support for the va_filerev attribute required by NFSv3.
This commit is contained in:
parent
e581051d3d
commit
94a8606f1b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=9862
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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. */
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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. */
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user