-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
homed: report actual home dir access mode and fs type in effect #21333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
homed: report actual home dir access mode and fs type in effect #21333
Conversation
| `accessMode` → The access mode currently in effect for the home directory iself. | ||
|
|
||
| `fileSystemType` → The file system type backing the home directory: a short | ||
| string, such as "btrfs", "ext4", "xfs". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we have an authoritative list we can point to beside these examples? or is this the one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So right now homed only supports these three file systems inside the LUKS volumes, hence I added support for them, but nothing else.
I figure sooner or later we should have a table somewhere which can translate the various file system magics into their string identifiers, using the same names as /proc/filesystems would use, building on the infra we have in src/basic/filesystems.[ch] already (and which already looks at the magic but doesn't include it in the generated tables).
Once we have that we should drop this manual translation function and just use that.
I'll add an explicit TODO list item for this. It requires some work and I don't really think it fits into this PR.
…N from it We later want to query per-home free status for implementing automatic grow/shrink of home directories, hence let's separate the JSON generation from the disk free status determination.
…on of user record So far we have two properties for the intended fstype + access mode of home dirs, but they might differ from what is actually used (because the user record changed from the home dir, after it was created, or vice versa). Let's hence add these props also to the "status" section of user record, which report the status quo. That way we can always show the correct, current settings.
|
Force pushed a new version, with the suggested assert(), and the mentioned TODO list entry. Upgrading green label. |
55da9bd to
e0c311b
Compare
So far we only reported access mode and fs type that is supposed to be used for a home dir when it is created. Let's also report what actually is currently used, as part of the "status" part of the user record.
Also split out of #21253