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)
Fri, Oct 4, 4:38 AM
Unknown Object (File)
Wed, Oct 2, 7:51 AM
Unknown Object (File)
Tue, Oct 1, 8:32 PM
Unknown Object (File)
Tue, Oct 1, 6:07 PM
Unknown Object (File)
Tue, Oct 1, 8:12 AM
Unknown Object (File)
Sat, Sep 21, 6:41 AM
Unknown Object (File)
Sat, Sep 7, 6:31 PM
Unknown Object (File)
Sat, Sep 7, 12:54 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 Skipped
Unit
Tests Skipped
Build Status
Buildable 5804

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.