From: Igor Fedotov Date: Wed, 15 Jun 2016 11:57:10 +0000 (+0300) Subject: os/bluestore: fixes assert on unaligned writes when csum verification is disabled X-Git-Tag: v11.0.0~163^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=99b5b83e73b1298956fa850ae0327dbae84b18dc;p=ceph.git os/bluestore: fixes assert on unaligned writes when csum verification is disabled Signed-off-by: Igor Fedotov --- diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index c58779101fea..64a739c1a911 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -5700,8 +5700,7 @@ void BlueStore::_do_write_small( if (b->get_ondisk_length() >= b_off + b_len && b->is_unused(b_off, b_len) && b->is_allocated(b_off, b_len) && - (!b->has_csum_data() || (b_off % b->get_csum_block_size() == 0 && - b_len % b->get_csum_block_size() == 0))) { + (b_off % chunk_size == 0 && b_len % chunk_size == 0)) { dout(20) << __func__ << " write to unused 0x" << std::hex << b_off << "~" << b_len << " pad 0x" << head_pad << " + 0x" << tail_pad