From 045acc3fb06d1b515be15cd0ce26f56380441172 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 4 Apr 2017 09:52:22 -0400 Subject: [PATCH] os/bluestore: mark_used for wctx->writes The refactored blob reuse code needs to mark blobs used when processing wctx->writes. Signed-off-by: Sage Weil --- src/os/bluestore/BlueStore.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 53e31d4c7c5da..d4a382f1bb054 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -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) { -- 2.39.5