]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore/BlueFS: do not _flush_range deleted files 40581/head
authorweixinwei <weixw3@lenovo.com>
Sun, 4 Apr 2021 05:30:10 +0000 (13:30 +0800)
committerweixinwei <weixw3@lenovo.com>
Wed, 7 Apr 2021 02:58:06 +0000 (10:58 +0800)
Fixes: https://tracker.ceph.com/issues/49861
Signed-off-by: weixinwei <weixw3@lenovo.com>
src/os/bluestore/BlueFS.cc

index 86c7a532980108dce8aba0ce0319c9e3dabb23d3..8be431dfca085088338111b128993e9e701c59eb 100644 (file)
@@ -2685,7 +2685,11 @@ int BlueFS::_flush_range(FileWriter *h, uint64_t offset, uint64_t length)
   dout(10) << __func__ << " " << h << " pos 0x" << std::hex << h->pos
           << " 0x" << offset << "~" << length << std::dec
           << " to " << h->file->fnode << dendl;
-  ceph_assert(!h->file->deleted);
+  if (h->file->deleted) {
+    dout(10) << __func__ << "  deleted, no-op" << dendl;
+    return 0;
+  }
+
   ceph_assert(h->file->num_readers.load() == 0);
 
   bool buffered;