Skip to content

Disabled XFS rmapbt and reflink flags for reducing overhead #2562

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

gnana997
Copy link

Description of your changes:
Added changes to support disabling XFS flags rmapbt=0 reflink=0 to reduce the metadata overhead as mentioned in ScyllaDB AMI

Which issue is resolved by this Pull Request:
Resolves #2353

@scylla-operator-bot scylla-operator-bot bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 25, 2025
Copy link
Contributor

Hi @gnana997. Thanks for your PR.

I'm waiting for a scylladb member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: gnana997
Once this PR has been reviewed and has the lgtm label, please assign rzetelskik for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link
Collaborator

@zimnx zimnx left a comment

Choose a reason for hiding this comment

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

Thanks for contribution. Changes are in good place, although API should be more generic. Title and description suggests two flags were disabled, although they are not present anywhere in the change.

@@ -70,6 +70,11 @@ spec:
type:
description: type is a desired filesystem type.
type: string
xfsFlags:
Copy link
Collaborator

Choose a reason for hiding this comment

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

autogenerated changes should be part of separate commit - please check the contribution guide.

Copy link
Author

Choose a reason for hiding this comment

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

I have removed the changes from the yaml file. I will create a seperate pr once this pr get's merged.
Thanks!

@scylla-operator-bot scylla-operator-bot bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Mar 26, 2025
@gnana997 gnana997 requested a review from zimnx March 26, 2025 16:35
Copy link
Collaborator

@zimnx zimnx left a comment

Choose a reason for hiding this comment

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

Please squash commits into one carrying implementation and create second one with autogenerated changes only. You can read more in contribution guide.

Comment on lines +38 to +44
// Add default flags for XFS filesystem
flags := fs.Flags
if fs.Type == scyllav1alpha1.XFSFilesystem {
flags = append(flags, "rmapbt=0", "reflink=0")
}

changed, err := disks.MakeFS(ctx, nsc.executor, device, blockSize, string(fs.Type), flags)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not sure it's intended, how would i enable those flags via fs.Flags if I wanted to?
Pass along only those which are in the API, those two (rmapbt=0 and reflin=0) should be part of the examples, not implementation.

@@ -12,7 +12,7 @@ import (
"k8s.io/utils/exec"
)

func MakeFS(ctx context.Context, executor exec.Interface, device string, blockSize int, fsType string) (bool, error) {
func MakeFS(ctx context.Context, executor exec.Interface, device string, blockSize int, fsType string, xfsFlags []string) (bool, error) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

these are not xfs flags anymore

Comment on lines +41 to +45
if fsType == "xfs" {
for _, flag := range xfsFlags {
args = append(args, "-m", flag)
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

shouldn't -m be part of flags? Why this is only for xfs?

Comment on lines +180 to +183

// flags contains filesystem-specific flags to be used during filesystem creation
// +optional
Flags []string `json:"flags,omitempty"`
Copy link
Collaborator

Choose a reason for hiding this comment

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

API changes requires regenerating autogenerated code.

@rzetelskik
Copy link
Member

/ok-to-test

@scylla-operator-bot scylla-operator-bot bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 27, 2025
Copy link
Contributor

@gnana997: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/verify eb295e2 link true /test verify
ci/prow/e2e-gke-serial eb295e2 link true /test e2e-gke-serial

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reduce XFS metadata overhead
3 participants