Fix bz#960284: thin_dump and other persistent-data tools may perform IO to misaligned buffers (on 4K hard sectored evices)
This commit is contained in:
parent
175e7264e9
commit
d2b30b0eac
@ -41,7 +41,7 @@ namespace persistent_data {
|
|||||||
// guarantees.
|
// guarantees.
|
||||||
//
|
//
|
||||||
// Alignment must be a power of two.
|
// Alignment must be a power of two.
|
||||||
template <uint32_t Size = DEFAULT_BUFFER_SIZE, uint32_t Alignment = 512>
|
template <uint32_t Size = DEFAULT_BUFFER_SIZE, uint32_t Alignment = 4096>
|
||||||
class buffer : private boost::noncopyable {
|
class buffer : private boost::noncopyable {
|
||||||
public:
|
public:
|
||||||
BOOST_STATIC_ASSERT((Alignment > 1) & !(Alignment & (Alignment - 1)));
|
BOOST_STATIC_ASSERT((Alignment > 1) & !(Alignment & (Alignment - 1)));
|
||||||
|
Loading…
Reference in New Issue
Block a user