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:
Heinz Mauelshagen 2013-10-30 14:12:41 +01:00
parent 175e7264e9
commit d2b30b0eac

View File

@ -41,7 +41,7 @@ namespace persistent_data {
// guarantees.
//
// 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 {
public:
BOOST_STATIC_ASSERT((Alignment > 1) & !(Alignment & (Alignment - 1)));