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

Rebuild refactoring #1581

Merged
merged 4 commits into from
Jan 30, 2024
Merged

Rebuild refactoring #1581

merged 4 commits into from
Jan 30, 2024

Conversation

tiagolobocastro
Copy link
Contributor

refactor(rebuild): make the rebuild more generic

A rebuild is essentially a copy from one bdev to another.
However, we can have different variations on this.
This change aims to make the rebuild more generic, removing the nexus specific
bits from the core rebuild logic and allowing us to compose different types of
rebuild in the future, whilst being able to reuse the shared bits.

To achieve this the rebuild backend is split into a rebuild manager which is the
generic component responsible for running and managing the rebuild and its tasks.
We can then implement different rebuild backends as we see fit, example a nexus
rebuild which locks ranges or a regular bdev to bdev rebuild.

Signed-off-by: Tiago Castro <tiagolobocastro@gmail.com>

fix(rebuild): send final rebuild state on drop

Signed-off-by: Tiago Castro <tiagolobocastro@gmail.com>

@tiagolobocastro
Copy link
Contributor Author

bors try

bors-openebs-mayastor bot pushed a commit that referenced this pull request Jan 19, 2024
@bors-openebs-mayastor
Copy link

try

Build succeeded:

Copy link
Contributor

@hrudaya21 hrudaya21 left a comment

Choose a reason for hiding this comment

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

lgtm.
We can have the entity relation diagram for bdev and nexus rebuild abstraction in LLD for future reference.

io-engine/src/rebuild/bdev_rebuild.rs Outdated Show resolved Hide resolved
io-engine/src/rebuild/bdev_rebuild.rs Outdated Show resolved Hide resolved
io-engine/src/rebuild/bdev_rebuild.rs Show resolved Hide resolved
io-engine/src/rebuild/bdev_rebuild.rs Show resolved Hide resolved
io-engine/src/rebuild/nexus_rebuild.rs Show resolved Hide resolved
io-engine/src/rebuild/nexus_rebuild.rs Show resolved Hide resolved
io-engine/src/rebuild/rebuild_instances.rs Outdated Show resolved Hide resolved
Signed-off-by: Tiago Castro <tiagolobocastro@gmail.com>
A rebuild is essentially a copy from one bdev to another.
However, we can have different variations on this.
This change aims to make the rebuild more generic, removing the nexus specific
bits from the core rebuild logic and allowing us to compose different types of
rebuild in the future, whilst being able to reuse the shared bits.

To achieve this the rebuild backend is split into a rebuild manager which is the
generic component responsible for running and managing the rebuild and its tasks.
We can then implement different rebuild backends as we see fit, example a nexus
rebuild which locks ranges or a regular bdev to bdev rebuild.

Signed-off-by: Tiago Castro <tiagolobocastro@gmail.com>
Signed-off-by: Tiago Castro <tiagolobocastro@gmail.com>
Signed-off-by: Tiago Castro <tiagolobocastro@gmail.com>
@tiagolobocastro
Copy link
Contributor Author

bors merge

bors-openebs-mayastor bot pushed a commit that referenced this pull request Jan 30, 2024
1581: Rebuild refactoring r=tiagolobocastro a=tiagolobocastro

    refactor(rebuild): make the rebuild more generic
    
    A rebuild is essentially a copy from one bdev to another.
    However, we can have different variations on this.
    This change aims to make the rebuild more generic, removing the nexus specific
    bits from the core rebuild logic and allowing us to compose different types of
    rebuild in the future, whilst being able to reuse the shared bits.
    
    To achieve this the rebuild backend is split into a rebuild manager which is the
    generic component responsible for running and managing the rebuild and its tasks.
    We can then implement different rebuild backends as we see fit, example a nexus
    rebuild which locks ranges or a regular bdev to bdev rebuild.
    
    Signed-off-by: Tiago Castro <tiagolobocastro@gmail.com>

---

    fix(rebuild): send final rebuild state on drop
    
    Signed-off-by: Tiago Castro <tiagolobocastro@gmail.com>


Co-authored-by: Tiago Castro <tiagolobocastro@gmail.com>
@tiagolobocastro
Copy link
Contributor Author

Had forgotten to resolve comment :(
bors should complain right away, not sure if possible though!
bors merge

@bors-openebs-mayastor
Copy link

Build succeeded:

@bors-openebs-mayastor bors-openebs-mayastor bot merged commit 11b4689 into develop Jan 30, 2024
4 checks passed
@bors-openebs-mayastor bors-openebs-mayastor bot deleted the rebuild-ref branch January 30, 2024 17:40
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