opnsense-src/sys/fs
Alan Somers 55b80e2ca5 fusefs: fix invalid value for st_birthtime.tv_nsec
If a file system's on-disk format does not support st_birthtime, it
isn't clear what value it should return in stat(2).  Neither our man
page nor the OpenGroup specifies.  But our convention for UFS and
msdosfs is to return { .tv_sec = -1, .tv_nsec = 0 }.  fusefs is
different.  It returns { .tv_sec = -1, .tv_nsec = -1 }.  It's done that
ever since the initial import in SVN r241519.

Most software apparently handles this just fine.  It must, because we've
had no complaints.  But the Rust standard library will panic when
reading such a timestamp during std::fs::metadata, even if the caller
doesn't care about that particular value.  That's a separate bug, and
should be fixed.

Change our invalid value to match msdosfs and ufs, pacifying the Rust
standard library.

PR:		276602
MFC after:	1 week
Sponsored by:	Axcient
Reviewed by:	emaste
Differential Revision: https://reviews.freebsd.org/D43590
2024-02-04 14:01:06 -07:00
..
autofs sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
cd9660 cd9660: Add support for mask,dirmask,uid,gid options 2024-01-12 14:51:31 -08:00
cuse sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
deadfs sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
devfs kcmp(2): implement for devfs files 2024-01-24 07:11:26 +02:00
ext2fs sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
fdescfs sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
fifofs sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
fuse fusefs: fix invalid value for st_birthtime.tv_nsec 2024-02-04 14:01:06 -07:00
mntfs sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
msdosfs msdosfs_remount_ro(): correct vfs_unbusy() loop 2024-01-20 03:36:35 +02:00
nfs nfscl: Only update atime for Copy when noatime is not specified 2024-01-11 16:38:33 -08:00
nfsclient ncl_bioread(): check for vp->v_object before accessing it 2024-01-15 17:19:58 +02:00
nfsserver Add vnode_pager_clean_{a,}sync(9) 2024-01-11 18:44:53 +02:00
nullfs nullfs: do not allow bypass on copy_file_range() 2023-11-28 19:32:53 +02:00
procfs procfs: Add self & exe symlinks like NetBSD does 2024-02-02 18:34:59 -07:00
pseudofs pseudofs: fix off by one in hash iteration in pfs_purge 2023-11-20 05:57:25 +00:00
smbfs Add vnode_pager_clean_{a,}sync(9) 2024-01-11 18:44:53 +02:00
tarfs vfs: use __enum_uint8 for vtype and vstate 2023-07-05 15:06:30 +00:00
tmpfs tmpfs: increase vfs.tmpfs.memory_percent to 100 as workaround 2024-01-23 12:46:31 -06:00
udf sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
unionfs sys/fs/unionfs/union_vnops.c: remove an extra semicolon 2024-02-02 18:35:01 -07:00