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

Use devicemapper definition of IEC #566

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions src/engine/consts.rs

This file was deleted.

3 changes: 0 additions & 3 deletions src/engine/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

pub use self::consts::IEC;

pub use self::engine::BlockDev;
pub use self::engine::Engine;
pub use self::engine::Filesystem;
Expand All @@ -28,7 +26,6 @@ mod macros;
// strat_engine is public so that integration tests can access its internals.
pub mod strat_engine;

mod consts;
#[allow(module_inception)]
pub mod engine;
mod errors;
Expand Down
2 changes: 1 addition & 1 deletion src/engine/sim_engine/pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ use std::vec::Vec;
use uuid::Uuid;

use devicemapper::Sectors;
use devicemapper::consts::IEC;

use super::super::consts::IEC;
use super::super::engine::{Filesystem, BlockDev, HasName, HasUuid, Pool};
use super::super::errors::{EngineError, EngineResult, ErrorEnum};
use super::super::structures::Table;
Expand Down
2 changes: 1 addition & 1 deletion src/engine/strat_engine/blockdevmgr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ use rand::{thread_rng, sample};
use uuid::Uuid;

use devicemapper::{Bytes, Device, Sectors, Segment};
use devicemapper::consts::IEC;

use super::super::consts::IEC;
use super::super::engine::BlockDev;
use super::super::errors::{EngineError, EngineResult, ErrorEnum};
use super::super::types::{DevUuid, PoolUuid};
Expand Down
3 changes: 1 addition & 2 deletions src/engine/strat_engine/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@ use std::path::Path;

use nix::sys::stat::{S_IFBLK, S_IFMT};

use devicemapper::consts::SECTOR_SIZE;
use devicemapper::consts::{IEC, SECTOR_SIZE};
use devicemapper::{Bytes, Device, Sectors};

use super::super::consts::IEC;
use super::super::errors::{EngineResult, EngineError, ErrorEnum};

ioctl!(read blkgetsize64 with 0x12, 114; u64);
Expand Down
7 changes: 3 additions & 4 deletions src/engine/strat_engine/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ use crc::crc32;
use uuid::Uuid;

use devicemapper::{Bytes, Sectors};
use devicemapper::consts::SECTOR_SIZE;
use devicemapper::consts::{IEC, SECTOR_SIZE};

use super::super::consts::IEC;
use super::super::errors::{EngineResult, EngineError, ErrorEnum};
use super::super::types::{DevUuid, PoolUuid};

Expand Down Expand Up @@ -753,11 +752,11 @@ mod tests {
use std::io::Cursor;

use devicemapper::{Bytes, Sectors};
use devicemapper::consts::IEC;

use quickcheck::{QuickCheck, TestResult};
use uuid::Uuid;

use super::super::super::consts::IEC;

use super::super::engine::DevOwnership;
use super::*;

Expand Down
2 changes: 1 addition & 1 deletion src/engine/strat_engine/thinpool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ use uuid::Uuid;
use devicemapper as dm;
use devicemapper::{DM, DataBlocks, DmDevice, DmError, LinearDev, MetaBlocks, Sectors, Segment,
ThinDev, ThinDevId, ThinPoolDev, ThinPoolWorkingStatus};
use devicemapper::consts::IEC;
use devicemapper::ErrorEnum::CheckFailed;

use super::super::consts::IEC;
use super::super::engine::{Filesystem, HasName};
use super::super::errors::{EngineError, EngineResult, ErrorEnum};
use super::super::structures::Table;
Expand Down
2 changes: 1 addition & 1 deletion tests/loopbacked_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ use loopdev::{LoopControl, LoopDevice};
use tempdir::TempDir;

use devicemapper::{Bytes, Sectors};
use devicemapper::consts::IEC;

use libstratis::engine::IEC;
use libstratis::engine::strat_engine::device::wipe_sectors;

use util::logger::init_logger;
Expand Down
2 changes: 1 addition & 1 deletion tests/real_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ use std::path::{Path, PathBuf};
use serde_json::{Value, from_reader};

use self::devicemapper::{Bytes, Sectors};
use self::devicemapper::consts::IEC;

use libstratis::engine::IEC;
use libstratis::engine::strat_engine::device::wipe_sectors;

use util::logger::init_logger;
Expand Down