|
libstorage-ng
|
A class to calculate partition alignment based on hardware topology. More...
#include <Topology.h>
Public Member Functions | |
| Topology (long alignment_offset, unsigned long optimal_io_size) | |
| Topology (const Topology &topology) | |
| Topology & | operator= (const Topology &topology) |
| long | get_alignment_offset () const |
| void | set_alignment_offset (long alignment_offset) |
| unsigned long | get_optimal_io_size () const |
| void | set_optimal_io_size (unsigned long optimal_io_size) |
| unsigned long | get_minimal_grain () const |
| void | set_minimal_grain (unsigned long minimal_grain) |
| unsigned long | calculate_grain () const |
| Calculates the grain. | |
| bool | can_be_aligned (const Region ®ion, AlignPolicy align_policy) const |
| Checks whether a region can be aligned. More... | |
| Region | align (const Region ®ion, AlignPolicy align_policy=AlignPolicy::ALIGN_END) const |
| Aligns a region. More... | |
| bool | operator== (const Topology &rhs) const |
| bool | operator!= (const Topology &rhs) const |
| Impl & | get_impl () |
| const Impl & | get_impl () const |
Friends | |
| std::ostream & | operator<< (std::ostream &s, const Topology &topology) |
| bool | getChildValue (const xmlNode *node, const char *name, Topology &topology) |
| void | setChildValue (xmlNode *node, const char *name, const Topology &topology) |
A class to calculate partition alignment based on hardware topology.
The starting sector of a partition must obey the form "sector = offset + X * grain". Alignment may fail is the start of the aligned partition region is after the end of the aligned partition region.
| Region storage::Topology::align | ( | const Region & | region, |
| AlignPolicy | align_policy = AlignPolicy::ALIGN_END |
||
| ) | const |
Aligns a region.
| AlignError |
| bool storage::Topology::can_be_aligned | ( | const Region & | region, |
| AlignPolicy | align_policy | ||
| ) | const |
Checks whether a region can be aligned.
Alignment may fail if the aligned end is before the aligned start.
1.8.12