forked from dm-vdo/vdo-devel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request dm-vdo#182 from bjohnsto/bjohnston_add_lvm_thin
[VDO-5749] Add tests for Thin Pools using VDO as data devices.
- Loading branch information
Showing
18 changed files
with
576 additions
and
170 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
## | ||
# Perl object that represents a Thin pool managed by LVM | ||
# | ||
# $Id$ | ||
## | ||
package Permabit::BlockDevice::LVM::ThinPool; | ||
|
||
use strict; | ||
use warnings FATAL => qw(all); | ||
use English qw(-no_match_vars); | ||
use Log::Log4perl; | ||
use Permabit::Assertions qw(assertNumArgs); | ||
|
||
use base qw(Permabit::BlockDevice::LVM); | ||
|
||
my $log = Log::Log4perl->get_logger(__PACKAGE__); | ||
|
||
######################################################################## | ||
# @inherit | ||
## | ||
sub setup { | ||
my ($self) = assertNumArgs(1, @_); | ||
$self->{volumeGroup}->createThinPool($self->{deviceName}, | ||
$self->{lvmSize}); | ||
$self->SUPER::setup(); | ||
} | ||
|
||
######################################################################## | ||
# @inherit | ||
## | ||
sub teardown { | ||
my ($self) = assertNumArgs(1, @_); | ||
$self->SUPER::teardown(); | ||
$self->{volumeGroup}->deleteLogicalVolume($self->{deviceName}); | ||
} | ||
|
||
1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.