Page MenuHomeFreeBSD

Don't use st_gen in struct stat
ClosedPublic

Authored by marcel on Nov 1 2016, 9:26 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jun 29, 9:38 PM
Unknown Object (File)
Sat, Jun 29, 8:59 PM
Unknown Object (File)
May 4 2024, 1:17 AM
Unknown Object (File)
May 4 2024, 1:03 AM
Unknown Object (File)
May 4 2024, 12:41 AM
Unknown Object (File)
May 1 2024, 3:37 AM
Unknown Object (File)
Feb 23 2024, 10:46 PM
Unknown Object (File)
Dec 27 2023, 5:37 PM
Subscribers

Details

Summary

Assign a random number to di_gen (for FFS), instead of extracting it from struct stat. We don't necessarily have permissions to see the generation number and the host OS may not have st_gen in struct stat anyway. Since the kernel assigns random numbers, there's nothing meaningful about the generation that requires us to preserve it when the file system image is created. So, simply assign di_gen by using random().

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

marcel retitled this revision from to Don't use st_gen in struct stat.
marcel updated this object.
marcel edited the test plan for this revision. (Show Details)
marcel added a reviewer: emaste.
marcel set the repository for this revision to rS FreeBSD src repository - subversion.
marcel added a reviewer: marcel.

Self approve.

This revision is now accepted and ready to land.Nov 5 2016, 4:23 PM
This revision was automatically updated to reflect the committed changes.