opnsense-src/sys/fs/tarfs
Olivier Certner 4634282f89
tarfs: 'struct tarfs_fid': Switch 'gen' to 'u_int', avoid packing
As the 'gen' field in 'struct tarfs_node' (and then 'struct tarfs_fid')
is filled with arc4random() which returns an unsigned int, change its
type in both structures.  This allows reordering fields in 'struct
tarfs_fid' to reduce its size, finally avoiding the use of '__packed' to
ensure it fits into 'struct fid'.

While here, remove the 'data0' field which wasn't necessary from the
start.

Reviewed by:    markj, rmacklem, des
Approved by:    markj (mentor)
MFC after:      5 days
Differential Revision:  https://reviews.freebsd.org/D47954

(cherry picked from commit cf0ede720391de986e350f23229da21c13bc7e9d)

Sponsored by:   The FreeBSD Foundation
2025-01-17 14:51:32 +01:00
..
tarfs.h tarfs: 'struct tarfs_fid': Switch 'gen' to 'u_int', avoid packing 2025-01-17 14:51:32 +01:00
tarfs_dbg.h tarfs: Use a separate debug bit for bounce buffer usage. 2023-02-16 00:40:45 +00:00
tarfs_io.c tarfs: Don't use IO_DIRECT when reading from tarball. 2023-06-20 10:02:10 +00:00
tarfs_subr.c vfs: use __enum_uint8 for vtype and vstate 2023-07-05 15:06:30 +00:00
tarfs_vfsops.c tarfs: Inherit mnt_iosize_max from the lower vnode 2024-04-15 10:05:13 -04:00
tarfs_vnops.c tarfs: Fix the size of struct tarfs_fid and add a static assert 2025-01-17 14:50:46 +01:00