Page MenuHomeFreeBSD

D48452.diff
No OneTemporary

D48452.diff

diff --git a/sys/compat/freebsd32/freebsd32.h b/sys/compat/freebsd32/freebsd32.h
--- a/sys/compat/freebsd32/freebsd32.h
+++ b/sys/compat/freebsd32/freebsd32.h
@@ -240,7 +240,8 @@
uint32_t st_blksize;
uint32_t st_flags;
uint64_t st_gen;
- uint64_t st_spare[10];
+ uint64_t st_filerev;
+ uint64_t st_spare[9];
};
struct freebsd11_stat32 {
uint32_t st_dev;
diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c
--- a/sys/compat/freebsd32/freebsd32_misc.c
+++ b/sys/compat/freebsd32/freebsd32_misc.c
@@ -2251,6 +2251,7 @@
CP(*in, *out, st_blksize);
CP(*in, *out, st_flags);
CP(*in, *out, st_gen);
+ CP(*in, *out, st_filerev);
TS_CP(*in, *out, st_birthtim);
out->st_padding0 = 0;
out->st_padding1 = 0;
diff --git a/sys/fs/tmpfs/tmpfs_vnops.c b/sys/fs/tmpfs/tmpfs_vnops.c
--- a/sys/fs/tmpfs/tmpfs_vnops.c
+++ b/sys/fs/tmpfs/tmpfs_vnops.c
@@ -476,6 +476,7 @@
sb->st_blksize = PAGE_SIZE;
sb->st_flags = node->tn_flags;
sb->st_gen = node->tn_gen;
+ sb->st_filerev = 0;
if (vp->v_type == VREG) {
#ifdef __ILP32__
vm_object_t obj = node->tn_reg.tn_aobj;
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c
--- a/sys/kern/kern_descrip.c
+++ b/sys/kern/kern_descrip.c
@@ -1620,6 +1620,7 @@
AUDIT_ARG_FILE(td->td_proc, fp);
+ sbp->st_filerev = 0;
error = fo_stat(fp, sbp, td->td_ucred);
fdrop(fp, td);
#ifdef __STAT_TIME_T_EXT
diff --git a/sys/kern/vfs_default.c b/sys/kern/vfs_default.c
--- a/sys/kern/vfs_default.c
+++ b/sys/kern/vfs_default.c
@@ -1587,6 +1587,7 @@
sb->st_flags = vap->va_flags;
sb->st_blocks = vap->va_bytes / S_BLKSIZE;
sb->st_gen = vap->va_gen;
+ sb->st_filerev = vap->va_filerev;
out:
return (vop_stat_helper_post(a, error));
}
diff --git a/sys/sys/stat.h b/sys/sys/stat.h
--- a/sys/sys/stat.h
+++ b/sys/sys/stat.h
@@ -185,7 +185,8 @@
blksize_t st_blksize; /* optimal blocksize for I/O */
fflags_t st_flags; /* user defined flags for file */
__uint64_t st_gen; /* file generation number */
- __uint64_t st_spare[10];
+ __uint64_t st_filerev; /* file revision, incr on changes */
+ __uint64_t st_spare[9];
};
#ifdef _KERNEL
diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c
--- a/sys/ufs/ufs/ufs_vnops.c
+++ b/sys/ufs/ufs/ufs_vnops.c
@@ -549,6 +549,7 @@
sb->st_birthtim.tv_sec = -1;
sb->st_birthtim.tv_nsec = 0;
sb->st_blocks = dbtob((uint64_t)ip->i_din1->di_blocks) / S_BLKSIZE;
+ sb->st_filerev = ip->i_din1->di_modrev;
} else {
sb->st_rdev = ip->i_din2->di_rdev;
sb->st_size = ip->i_din2->di_size;
@@ -559,6 +560,7 @@
sb->st_birthtim.tv_sec = ip->i_din2->di_birthtime;
sb->st_birthtim.tv_nsec = ip->i_din2->di_birthnsec;
sb->st_blocks = dbtob((uint64_t)ip->i_din2->di_blocks) / S_BLKSIZE;
+ sb->st_filerev = ip->i_din2->di_modrev;
}
sb->st_blksize = max(PAGE_SIZE, vp->v_mount->mnt_stat.f_iosize);

File Metadata

Mime Type
text/plain
Expires
Wed, Jan 15, 5:26 PM (3 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15813326
Default Alt Text
D48452.diff (2 KB)

Event Timeline