]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: mark_used for wctx->writes
authorSage Weil <sage@redhat.com>
Tue, 4 Apr 2017 13:52:22 +0000 (09:52 -0400)
committerSage Weil <sage@redhat.com>
Tue, 4 Apr 2017 16:12:25 +0000 (12:12 -0400)
The refactored blob reuse code needs to mark blobs used when
processing wctx->writes.

Signed-off-by: Sage Weil <sage@redhat.com>
src/os/bluestore/BlueStore.cc

index 53e31d4c7c5da7863816c269b8ee6c7c62df2dfb..d4a382f1bb0543082fc0bd039fb42032c7dc16f5 100644 (file)
@@ -9120,11 +9120,12 @@ int BlueStore::_do_alloc_write(
                                            wi.length0,
                                            wi.b,
                                            nullptr);
+    wi.b->dirty_blob().mark_used(le->blob_offset, le->length);
     txc->statfs_delta.stored() += le->length;
     dout(20) << __func__ << "  lex " << *le << dendl;
     _buffer_cache_write(txc, wi.b, b_off, wi.bl,
                         wctx->buffered ? 0 : Buffer::FLAG_NOCACHE);
-    
+
     // queue io
     if (!g_conf->bluestore_debug_omit_block_device_write) {
       if (l->length() <= prefer_deferred_size) {