-
Notifications
You must be signed in to change notification settings - Fork 56
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
btrfs: setting a label is only supported on a mount point #966
Comments
Sorry, this report seems to be wrong, a mounted btrfs partition can't set it's label in udisks likely because it uses the device name
So I suppose the comment in |
This should be avoided whenever possible, we've been banished by the community when doing things like this. Better to find a way around and address the device some other way. Setting label is not that severe comparing to retrieving info though. If available, a private mount namespace should be used for such things (currently unimplemented, see #894). So mountpoint should be passed in when mounted, device file otherwise? I'm not sure whether UDisks is prepared for such things, the libblockdev fs API sounds vague in this specific case too. |
The "generic" FS functions do the temporary mount when needed for the operation so
This is a problem for "automatic" functions (like |
I noticed that setting a label is only supported via a mountpoint for btrfs, while in theory a label can be set on a device.
Most other set_label functions seem to use the device. Which in Cockpit leads a somewhat inconsistent experience when the filesystem is not mounted. (In theory we can work around it by first mounting it temporary, set label and umount).
Changing the API over to a mountpoint would break libblockdev's API so I guess that is a not an option and this isn't a real "breaking" or high priority issue for us. (Read: no issue at all)
The text was updated successfully, but these errors were encountered: