]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: fixes assert on unaligned writes when csum verification is disabled
authorIgor Fedotov <ifedotov@mirantis.com>
Wed, 15 Jun 2016 11:57:10 +0000 (14:57 +0300)
committerIgor Fedotov <ifedotov@mirantis.com>
Wed, 15 Jun 2016 11:57:10 +0000 (14:57 +0300)
Signed-off-by: Igor Fedotov <ifedotov@mirantis.com>
src/os/bluestore/BlueStore.cc

index c58779101feaf3540a89df759a560dd37ac156e2..64a739c1a9110fe8552948d48058c3d6005f8272 100644 (file)
@@ -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