Skip to content

Commit

Permalink
pool: Fix failure to destroy pool
Browse files Browse the repository at this point in the history
The code that determines the base bdev type inadvertently used
lvs_bdev_ptr after it had already been destroyed. Switch to base_bdev
instead so that that the base bdev type can be determined.

Fixes: bcb1cc2 ("pool: Return base bdev type in list pools")
  • Loading branch information
jonathan-teh authored and Jan Kryl committed May 15, 2020
1 parent c68ef5c commit f2de53b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mayastor/src/pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ impl Pool {
return Ok(());
}
};
let base_bdev_type = self.get_base_bdev().driver();
let base_bdev_type = base_bdev.driver();
debug!("Destroying bdev type {}", base_bdev_type);

let (sender, receiver) = oneshot::channel::<i32>();
Expand Down

0 comments on commit f2de53b

Please sign in to comment.