For the loader to verify files we need stat(2) to
provide st_dev, st_ino, and st_mtime.
Details
- Reviewers
imp tsoome emaste kevans - Commits
- rS334868: Add st_mtime, st_ino and st_dev for ufs_stat
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 17045 Build 16908: arc lint + arc unit
Event Timeline
For future uploads please include full context - see https://wiki.freebsd.org/action/show/Phabricator
stand/libsa/ufs.c | ||
---|---|---|
847 | st_dev differentiates one device from another, st_ino by itself is not unique. fs_id is supposed to be unique per filesystem so can satisfy the requirement, but it is 64bit vs 32bit for st_dev. |
stand/libsa/ufs.c | ||
---|---|---|
847 | I guess I should have been more direct. Does it need to be stable from boot to boot, or just stable within a boot? |
stand/libsa/ufs.c | ||
---|---|---|
847 | There is no need for stability beyond the current boot. |
stand/libsa/ufs.c | ||
---|---|---|
847 | I would like to ask another way still - why should the boot loader care about st_dev and specifically in case of one file system (out of ~8)? Sure, we can fill the fields in hope that maybe there will be some use case in the future, or do you have some followup planned? We would like to avoid implementing inconsistent behavior too - if those fields are to be filled in case of ufs, why not for other file systems? |
Is there a
stand/libsa/ufs.c | ||
---|---|---|
847 | To add to that last bit- I'd like to see at least the ZFS analog of this, though I'm not sure how easy it would be to break out inumber (not that familiar with ZFS, didn't seem readily available at a glance). |
stand/libsa/ufs.c | ||
---|---|---|
847 | ok, that explains it. |
stand/libsa/ufs.c | ||
---|---|---|
847 | I'd start with zfsimp in the poorly conceived stand/zfs directory. |
stand/libsa/ufs.c | ||
---|---|---|
847 | imp; did you have any better idea that my trying to squeeze fs_id into st_dev ? |