]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: fix using incomplete bluefs log when dumping it. 43007/head
authorIgor Fedotov <ifedotov@suse.com>
Tue, 9 Feb 2021 15:16:09 +0000 (18:16 +0300)
committerIgor Fedotov <ifedotov@suse.com>
Wed, 1 Sep 2021 09:56:25 +0000 (12:56 +0300)
BlueFS superblock might contain incomplete list of physical extents for
bluefs log. Hence we should alway replay ops for ino 1 to get them properly.

Fixes: https://tracker.ceph.com/issues/52311
Signed-off-by: Igor Fedotov <ifedotov@suse.com>
(cherry picked from commit 47632fe9baf7f20921c3e6888e29c4478fa5ff2d)

src/os/bluestore/BlueFS.cc

index 874c51ace7d3ce94bf145cd40f7faa8d398e9360..f322a9b11f3e6d102538545fd0639c7d8948b521 100644 (file)
@@ -1421,6 +1421,9 @@ int BlueFS::_replay(bool noop, bool to_stdout)
                 return r;
               }
             }
+         } else if (noop && fnode.ino == 1) {
+           FileRef f = _get_file(fnode.ino);
+           f->fnode = fnode;
          }
         }
        break;
@@ -3300,6 +3303,10 @@ void BlueFS::_close_writer(FileWriter *h)
       }
     }
   }
+  // sanity
+  if (h->file->fnode.size >= (1ull << 30)) {
+    dout(10) << __func__ << " file is unexpectedly large:" << h->file->fnode << dendl;
+  }
   delete h;
 }