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

Make metadata allocation eager and leave data allocation lazy #3097

Merged
merged 1 commit into from
Oct 3, 2022

Conversation

jbaublitz
Copy link
Member

Related to #3086

@jbaublitz jbaublitz self-assigned this Aug 25, 2022
@jbaublitz jbaublitz marked this pull request as draft August 25, 2022 16:01
@jbaublitz jbaublitz force-pushed the thinp-rework branch 4 times, most recently from 48cc4be to a5e9a35 Compare September 1, 2022 15:14
@jbaublitz jbaublitz marked this pull request as ready for review September 1, 2022 20:36
Copy link
Member

@mulkieran mulkieran left a comment

Choose a reason for hiding this comment

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

Looks good! A few requests.

src/engine/strat_engine/thinpool/thinpool.rs Outdated Show resolved Hide resolved
src/engine/strat_engine/thinpool/thinpool.rs Show resolved Hide resolved
src/engine/strat_engine/thinpool/thinpool.rs Outdated Show resolved Hide resolved
Copy link
Member

@bmr-cymru bmr-cymru left a comment

Choose a reason for hiding this comment

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

Ah never mind - I had an old version of the diff open!

src/engine/strat_engine/thinpool/thinpool.rs Outdated Show resolved Hide resolved
data_extend_size: Sectors,
) -> StratisResult<Sectors> {
thinpooldev.suspend(get_dm(), DmOptions::default())?;

Copy link
Member

Choose a reason for hiding this comment

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

What happens in the event of an error in this function? Either one of the not Ok(Some(transaction)) branches, or an early return from say commit_alloc()?

What performs the resume on the thinpooldev, or is it left suspended in that case?

Since we don't start manipulating the thinpooldev until the Ok(Some(...)) branch could the suspend me moved into that branch, leaving the error cases a no-op wrt to the device state?

@mulkieran
Copy link
Member

@jbaublitz Plz rebase and squash as you like and I'll merge.

@jbaublitz
Copy link
Member Author

@mulkieran We decided we'd address this:

What happens in the event of an error in this function? Either one of the not Ok(Some(transaction)) branches, or an early return from say commit_alloc()?

What performs the resume on the thinpooldev, or is it left suspended in that case?

Since we don't start manipulating the thinpooldev until the Ok(Some(...)) branch could the suspend me moved into that branch, leaving the error cases a no-op wrt to the device state?

in another PR, right?

@mulkieran
Copy link
Member

@mulkieran We decided we'd address this:

What happens in the event of an error in this function? Either one of the not Ok(Some(transaction)) branches, or an early return from say commit_alloc()?

What performs the resume on the thinpooldev, or is it left suspended in that case?

Since we don't start manipulating the thinpooldev until the Ok(Some(...)) branch could the suspend me moved into that branch, leaving the error cases a no-op wrt to the device state?

in another PR, right?

Yes. That was my understanding.

This commit builds on the previous thin provisioning rework. The
simplified, eager metadata allocation allows us to decrease
fragmentation introduced into the previous change and the lazy data
allocation allows us to provide users with the same flexibility around
changing requirements that we previously provided.
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.

3 participants