BlueStore requires that min_alloc_size must be power of 2 aligned.
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
min_alloc_size = cct->_conf->bluestore_min_alloc_size_ssd;
}
}
+
+ // make sure min_alloc_size is power of 2 aligned.
+ if (!ISP2(min_alloc_size)) {
+ derr << __func__ << " min_alloc_size 0x"
+ << std::hex << min_alloc_size << std::dec
+ << " is not power of 2 aligned!"
+ << dendl;
+ r = -EINVAL;
+ goto out_close_fm;
+ }
+
{
bufferlist bl;
::encode((uint64_t)min_alloc_size, bl);