mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-27 19:39:35 +03:00
FreeBSD: Provide correct file generation number
va_seq was actually a thin veil over va_gen, so z_gen is a more appropriate value than z_seq to populate the field with. Drop the unnecessary compat obfuscation and provide the correct file generation number. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alexander Motin <mav@FreeBSD.org> Signed-off-by: Ryan Moeller <freqlabs@freebsd.org> Closes #12851
This commit is contained in:
parent
f6a0dac84a
commit
92a9e8c618
@ -134,7 +134,6 @@ vn_flush_cached_data(vnode_t *vp, boolean_t sync)
|
|||||||
/* TODO: This field needs conversion! */
|
/* TODO: This field needs conversion! */
|
||||||
#define va_nblocks va_bytes
|
#define va_nblocks va_bytes
|
||||||
#define va_blksize va_blocksize
|
#define va_blksize va_blocksize
|
||||||
#define va_seq va_gen
|
|
||||||
|
|
||||||
#define MAXOFFSET_T OFF_MAX
|
#define MAXOFFSET_T OFF_MAX
|
||||||
#define EXCL 0
|
#define EXCL 0
|
||||||
|
@ -496,7 +496,7 @@ zfsctl_common_getattr(vnode_t *vp, vattr_t *vap)
|
|||||||
*/
|
*/
|
||||||
vap->va_blksize = 0;
|
vap->va_blksize = 0;
|
||||||
vap->va_nblocks = 0;
|
vap->va_nblocks = 0;
|
||||||
vap->va_seq = 0;
|
vap->va_gen = 0;
|
||||||
vn_fsid(vp, vap);
|
vn_fsid(vp, vap);
|
||||||
vap->va_mode = zfsctl_ctldir_mode;
|
vap->va_mode = zfsctl_ctldir_mode;
|
||||||
vap->va_type = VDIR;
|
vap->va_type = VDIR;
|
||||||
|
@ -2051,7 +2051,7 @@ zfs_getattr(vnode_t *vp, vattr_t *vap, int flags, cred_t *cr)
|
|||||||
vap->va_size = zp->z_size;
|
vap->va_size = zp->z_size;
|
||||||
if (vp->v_type == VBLK || vp->v_type == VCHR)
|
if (vp->v_type == VBLK || vp->v_type == VCHR)
|
||||||
vap->va_rdev = zfs_cmpldev(rdev);
|
vap->va_rdev = zfs_cmpldev(rdev);
|
||||||
vap->va_seq = zp->z_seq;
|
vap->va_gen = zp->z_gen;
|
||||||
vap->va_flags = 0; /* FreeBSD: Reset chflags(2) flags. */
|
vap->va_flags = 0; /* FreeBSD: Reset chflags(2) flags. */
|
||||||
vap->va_filerev = zp->z_seq;
|
vap->va_filerev = zp->z_seq;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user