]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: remove preextended WAL support. 37373/head
authorIgor Fedotov <ifedotov@suse.com>
Tue, 9 Jun 2020 08:44:31 +0000 (11:44 +0300)
committerNathan Cutler <ncutler@suse.com>
Wed, 23 Sep 2020 13:38:43 +0000 (15:38 +0200)
Fixes: https://tracker.ceph.com/issues/45613
Signed-off-by: Igor Fedotov <ifedotov@suse.com>
(cherry picked from commit 7fdbf61860b9d9deaf8734cdd57cf5c8d5f93f81)

Conflicts:
src/common/options.cc
- option "bluefs_preextend_wal_files" has a different default value
  ("false") in octopus (but the whole option is being deleted, so it
  doesn't matter)

src/common/legacy_config_opts.h
src/common/options.cc
src/os/bluestore/BlueFS.cc

index cd7b78f1018a0d7f2571fd710dada4a01754659b..0af647df560fd1c34003366c826e1dcf8094e7d7 100644 (file)
@@ -911,7 +911,6 @@ OPTION(bluefs_compact_log_sync, OPT_BOOL)  // sync or async log compaction?
 OPTION(bluefs_buffered_io, OPT_BOOL)
 OPTION(bluefs_sync_write, OPT_BOOL)
 OPTION(bluefs_allocator, OPT_STR)     // stupid | bitmap
-OPTION(bluefs_preextend_wal_files, OPT_BOOL)  // this *requires* that rocksdb has recycling enabled
 OPTION(bluefs_log_replay_check_allocations, OPT_BOOL)
 OPTION(bluefs_replay_recovery, OPT_BOOL)
 OPTION(bluefs_replay_recovery_disable_compact, OPT_BOOL)
index f76a623149472867515b343e10ce1c47aec74d50..31353e5540206e73222cc19aa098b9675478a641 100644 (file)
@@ -4014,10 +4014,6 @@ std::vector<Option> get_global_options() {
     .set_enum_allowed({"bitmap", "stupid", "avl", "hybrid"})
     .set_description(""),
 
-    Option("bluefs_preextend_wal_files", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
-    .set_default(false)
-    .set_description("Preextent rocksdb wal files on mkfs to avoid performance penalty"),
-
     Option("bluefs_log_replay_check_allocations", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
       .set_default(true)
       .set_description("Enables checks for allocations consistency during log replay"),
index 417c1e0f68717a52ac5d8baf9b7f4cae9bc449cb..78a3c5a0c83269b730b1608a4678a147d7ad85ad 100644 (file)
@@ -2705,7 +2705,6 @@ int BlueFS::_flush_range(FileWriter *h, uint64_t offset, uint64_t length)
   // do not bother to dirty the file if we are overwriting
   // previously allocated extents.
   bool must_dirty = false;
-  uint64_t clear_upto = 0;
   if (allocated < offset + length) {
     // we should never run out of log space here; see the min runway check
     // in _flush_and_sync_log.
@@ -2721,18 +2720,6 @@ int BlueFS::_flush_range(FileWriter *h, uint64_t offset, uint64_t length)
       ceph_abort_msg("bluefs enospc");
       return r;
     }
-    if (cct->_conf->bluefs_preextend_wal_files &&
-       h->writer_type == WRITER_WAL) {
-      // NOTE: this *requires* that rocksdb also has log recycling
-      // enabled and is therefore doing robust CRCs on the log
-      // records.  otherwise, we will fail to reply the rocksdb log
-      // properly due to garbage on the device.
-      h->file->fnode.size = h->file->fnode.get_allocated();
-      clear_upto = h->file->fnode.size;
-      dout(10) << __func__ << " extending WAL size to 0x" << std::hex
-              << h->file->fnode.size << std::dec << " to include allocated"
-              << dendl;
-    }
     must_dirty = true;
   }
   if (h->file->fnode.size < offset + length) {
@@ -2793,7 +2780,7 @@ int BlueFS::_flush_range(FileWriter *h, uint64_t offset, uint64_t length)
       }
     }
   }
-  if (length == partial + h->buffer.length() || clear_upto != 0) {
+  if (length == partial + h->buffer.length()) {
     /* in case of inital allocation and need to zero, limited flush is unacceptable */
     bl.claim_append_piecewise(h->buffer);
   } else {
@@ -2821,15 +2808,6 @@ int BlueFS::_flush_range(FileWriter *h, uint64_t offset, uint64_t length)
   } else {
     h->tail_block.clear();
   }
-  if (clear_upto != 0) {
-    if (offset + length < clear_upto) {
-      dout(20) << __func__ << " zeroing WAL log up to 0x"
-               << std::hex << clear_upto
-               << std::dec << dendl;
-      bl.append_zero(clear_upto - (offset + length));
-      length += clear_upto - (offset + length);
-    } 
-  } 
   ceph_assert(bl.length() == length);
 
   switch (h->writer_type) {