HomeFreeBSD

tarfs: 'struct tarfs_fid': Switch 'gen' to 'u_int', avoid packing

Description

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

Details

Provenance
olceAuthored on Fri, Dec 6, 4:35 PM
Reviewer
markj
Differential Revision
D47954: tarfs: 'struct tarfs_fid': Switch 'gen' to 'u_int', avoid packing
Parents
rGa1097094c4c5: newvers: Set explicit git revision length
Branches
Unknown
Tags
Unknown