]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore/BlueFS: do not _flush_range deleted files 40677/head
authorweixinwei <weixw3@lenovo.com>
Sun, 4 Apr 2021 05:30:10 +0000 (13:30 +0800)
committersinguliere <singuliere@autistici.org>
Fri, 9 Apr 2021 05:24:35 +0000 (07:24 +0200)
Fixes: https://tracker.ceph.com/issues/49861
Signed-off-by: weixinwei <weixw3@lenovo.com>
(cherry picked from commit 744bd5271cfcd2d84bc908a1893bbdfd51d2f8f0)

src/os/bluestore/BlueFS.cc

index b87bc4fd50b299e166e99c56bc4d79c8ff6a95fc..3f19597292c8ffd7c863189e6cafdef9e812c723 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;