Skip to content

Conversation

@mulkieran
Copy link
Member

No description provided.

@mulkieran mulkieran self-assigned this Jul 10, 2024
@mulkieran mulkieran marked this pull request as ready for review July 10, 2024 14:32

(ext.is_ok(), ext)
match ext {
Ok(Sectors(0)) | Err(_) => (false, ext),
Copy link
Member

Choose a reason for hiding this comment

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

Isn't this unreachable?

Copy link
Member Author

Choose a reason for hiding this comment

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

@jbaublitz You might be misreading the diff.

Copy link
Member

Choose a reason for hiding this comment

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

Ah I see, so this is an optimization to not save the metadata if it's not extended at all? I am failing to see a case where this will ever be reached. Unreachable might be the wrong term, because it could be reached, but meta_growth is guaranteed to be larger than 0. I don't see a case where this will be reached with the current implementation. I was originally thinking that ext could be 0 but I don't see a case where meta_growth would be non-zero but ext would be zero.

Copy link
Member

Choose a reason for hiding this comment

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

Let me dig into do_extend and see if maybe it's rounding down. That could potentially cause the behavior you're seeing.

Copy link
Member Author

Choose a reason for hiding this comment

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

I understand your argument. I think we can leave this in pending for now and work on simplifying it later.

@mulkieran mulkieran force-pushed the avoid-changed-if-0-extension-meta branch from c75bd89 to b7aa992 Compare July 11, 2024 00:38
@mulkieran mulkieran requested a review from jbaublitz July 11, 2024 02:23
@jbaublitz
Copy link
Member

Is this still relevant or can it be closed?

@mulkieran
Copy link
Member Author

Is this still relevant or can it be closed?

It may be. I need to take another look.

@mulkieran mulkieran added this to the Metadata-related milestone Sep 18, 2024
@mulkieran mulkieran force-pushed the avoid-changed-if-0-extension-meta branch from d7c94f8 to 9cc1fbe Compare October 31, 2024 18:11
@packit-as-a-service
Copy link

Congratulations! One of the builds has completed. 🍾

You can install the built RPMs by following these steps:

  • sudo yum install -y dnf-plugins-core on RHEL 8
  • sudo dnf install -y dnf-plugins-core on Fedora
  • dnf copr enable packit/stratis-storage-stratisd-3648
  • And now you can install the packages.

Please note that the RPMs should be used only in a testing environment.

2 similar comments
@packit-as-a-service
Copy link

Congratulations! One of the builds has completed. 🍾

You can install the built RPMs by following these steps:

  • sudo yum install -y dnf-plugins-core on RHEL 8
  • sudo dnf install -y dnf-plugins-core on Fedora
  • dnf copr enable packit/stratis-storage-stratisd-3648
  • And now you can install the packages.

Please note that the RPMs should be used only in a testing environment.

@packit-as-a-service
Copy link

Congratulations! One of the builds has completed. 🍾

You can install the built RPMs by following these steps:

  • sudo yum install -y dnf-plugins-core on RHEL 8
  • sudo dnf install -y dnf-plugins-core on Fedora
  • dnf copr enable packit/stratis-storage-stratisd-3648
  • And now you can install the packages.

Please note that the RPMs should be used only in a testing environment.

@mulkieran
Copy link
Member Author

mulkieran commented Oct 31, 2024

To do this better we should just save the thinpool's metadata at the start of the check method and see if it has change when the check method is about to return, thereby eliminating complexity.

Necessary instead to do this in both the meta and data extend methods, rather than in the check method.

Return true only if the method returned without error AND the amount to
extend is non-zero.

This is the same condition already used in extend_thin_data_device.

Signed-off-by: mulhern <[email protected]>
alloc() return None if there is not enough space to satisfy the request.

Signed-off-by: mulhern <[email protected]>
@mulkieran mulkieran force-pushed the avoid-changed-if-0-extension-meta branch from 9cc1fbe to 4f81cc9 Compare November 15, 2024 03:40
@mulkieran mulkieran removed this from 2025February Mar 5, 2025
@mulkieran mulkieran moved this to Pending in 2025March Mar 5, 2025
@mulkieran mulkieran removed this from 2025March Mar 31, 2025
@mulkieran mulkieran moved this to Pending in 2025April Mar 31, 2025
@mulkieran mulkieran moved this from Pending to In Progress (long term) in 2025April Mar 31, 2025
@mulkieran mulkieran removed this from 2025April May 4, 2025
@mulkieran mulkieran added this to 2025May May 4, 2025
@mulkieran mulkieran moved this to In Progress (long term) in 2025May May 4, 2025
@mulkieran mulkieran removed this from 2025May Jun 9, 2025
@mulkieran mulkieran moved this to In Progress (long term) in 2025June Jun 9, 2025
@jbaublitz jbaublitz removed this from the Metadata-related milestone Jun 17, 2025
@mulkieran mulkieran removed this from 2025June Jul 8, 2025
@mulkieran mulkieran moved this to In Progress (long term) in 2025July Jul 8, 2025
@mulkieran mulkieran removed this from 2025July Aug 11, 2025
@mulkieran mulkieran moved this to In Progress (long term) in 2025August Aug 11, 2025
@mulkieran mulkieran removed this from 2025August Sep 2, 2025
@mulkieran mulkieran moved this to In Progress (long term) in 2025September Sep 2, 2025
@mulkieran mulkieran removed this from 2025October Oct 11, 2025
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