-
Notifications
You must be signed in to change notification settings - Fork 20
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
Add Btrfs quotas to the Partitioner UI #1165
Conversation
bb66e1b
to
949c861
Compare
949c861
to
91e9a18
Compare
# | ||
# @return [DiskSize] | ||
def fallback_referenced_limit | ||
subvolume&.former_referenced_limit || filesystem.blk_devices.first.size |
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.
I am not sure whether to use the first block device is a good idea in case of a multi-device Btrfs. Why not something like filesystem.blk_devices.map(&:size).min
?
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.
BTW, what happens when the limit is bigger than the size of the filesystem? Is there something like thin provisioning?
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.
There is nothing like thin provisioning. But that's not a problem here. It's a max quota in a subdirectory. It implies no promises about that subdirectory being bigger than the container file system.
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.
I mean, adding a max quota of 100GiB in a subdirectory of a partition that is only 50GiB will give me no extra space. :-)
def validate | ||
return true if value | ||
|
||
Yast::Popup.Error(_("The size entered is invalid.")) |
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.
NP: I understood we prefer to use Yast2::Popup
in the new code.
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.
Well, for very simple cases like this, the old API is more straightforward... and we have another 27 usages of Yast::Popup
in the Partitioner anyways.
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.
LGTM
Problem
We want to add support for Btrfs quotas to the Partitioner. See Jira entry SLE-7742
This is the second part of https://trello.com/c/Ypt6X2VA/2118-3-partitioner-support-for-btrfs-quotas (the first part was #1163).
Solution
Click here to see two screenshots about it
Click here to see two screenshots about it
Note: the help text was extended in 167bcff
Click here to see two screenshots about it
Note: the help texts were slightly modified in 167bcff
Testing