-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
occ commands for listing and refreshing mounts #56447
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
Conversation
8ca315e to
59fa307
Compare
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.
Looks good besides one small question
| $mounts = $this->mountProviderCollection->getMountsForUser($user); | ||
| $mounts[] = $this->mountProviderCollection->getHomeMountForUser($user); | ||
| /** @var array<string, IMountPoint> $cachedByMountpoint */ | ||
| $mountsByMountpoint = array_combine(array_map(fn (IMountPoint $mount) => $mount->getMountPoint(), $mounts), $mounts); |
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.
Will this override mounts that target the same mount points?
Should we make it so that "duplicate" mounts are displayed?
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.
Ah, seems like later, you output all the mounts, and cachedMounts, which answers my question :).
But then, could there be a conflict, if two mounts target the same mountPoints, then in the for loops, one cachedMount will win and be displayed for two different mounts?
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.
cachedMounts are unique by mountpoint
Signed-off-by: Robin Appelman <[email protected]>
Signed-off-by: Robin Appelman <[email protected]>
59fa307 to
ef5e014
Compare
Add commands to list mounts (both cached and provided) and command to refresh the cached mounts for a user.
primarily intended for helping during authoritative mountpoint debugging, but might be useful outside of it.