Skip to content
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 option to disable BTRFS quota-qgroups. Fixes #1592 #1903

Conversation

phillxnet
Copy link
Member

@phillxnet phillxnet commented Mar 7, 2018

Adds pool api command to enable / disable quotas. Upon enabling a quota rescan is initiated. In some instances this scan is redundant but is robust to those instances and simply info logs the prior existence of an ongoing quota rescan and skips the rescan requested. Similarly provision is made to deal elegantly with quota rescan requests on read only filesystems. UI is by way of bootstrap inline editable as per current compression and custom mount options settings.

Summary:

  • Add backend pool quota enable/disable command.
  • Change existing quota status displays for inline editable elements.
  • Move pool details page quota element from "Details" section to "Compression and extra mount options" section as then all inline edit elements are grouped.
  • Rename compression / extra mount options header to indicate quotas.
  • Allowed quotas enable/disable on the system pool.
  • Initiate a quota rescan when re enabling via the inline edit UI element / api command.
  • Improve user messaging (via tool tips) re 0 usage indication on Shares as a consequence of quotas disabled (currently).
  • Indicate that the default quote state is enabled but provide the performance related argument for them being disabled (via tool tips).

Fixes #1592
Additionally as we initiate a rescan upon enabling quotas on a given pool this pr also:
Fixes #1785

@schakrava Ready for review.

This pr represents the enable/disable api and front end to the work done for issue:
"improve quotas not enabled behaviour #1869"
and it's pr:
"improve quotas not enabled behaviour. Fixes #1869" #1874
re quota groups management / recreation through quota disabled / enabled cycles.

Tested in KVM systems and on a number of small real hw installs in the low TB range of pool size.

Caveats / future enhancements: we currently give no indication of ongoing rescans, this could properly be addressed against it's own issue. The consequence of not surfacing an ongoing quota rescan is potential user confusion re share size reporting which will periodically adjust for a number of minutes after re enabling quotas (with quotas disabled shares are reported as taking 0 space (currently)).

Adds pool api command to enable / disable quotas. Upon enabling a quota
rescan is initiated. In some instances this scan is redundant but is
robust to those instances and simply info logs the prior existence of
an ongoing quota rescan and skips the rescan requested. Similarly
provision is made to deal elegantly with quota rescan requests
on read only filesystems. UI is by way of bootstrap inline editable as
per current compression and custom mount options settings.

Summary:
- Add backend pool quota enable/disable command.
- Change existing quota status displays for inline editable elements.
- Move pool details page quota element from "Details" section to
"Compression and extra mount options" section as then all inline edit
elements are grouped.
- Rename compression / extra mount options header to indicate quotas.
- Allowed quotas enable/disable on the system pool.
# when attempting a rescan.
# Look similar to https://patchwork.kernel.org/patch/9928635/
enable_quota(pool)
enable_quota(pool)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may be useful to open an issue to keep track of future refactoring of this logic.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. I have just created what I think should cover it:
"re-address double enable_quota() call requirement" #1905

@schakrava
Copy link
Member

This is really nice! I am eager to try disabled quotas on our staging boxes and see the performance differences.

@schakrava schakrava merged commit 784644b into rockstor:master Mar 10, 2018
@phillxnet phillxnet deleted the 1592_Add_option_to_disable_BTRFS_quota-qgroups branch March 10, 2018 15:37
@phillxnet
Copy link
Member Author

@schakrava Thanks. I'll try and revisit the sub optimal double quota thing on the next kernel / btrfs-progs update. I was a little surprised by that behaviour and I'm keen to re-address it as soon as we can.
Cheers for the review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants