]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
os/bluestore: fix using incomplete bluefs log when dumping it.
authorIgor Fedotov <ifedotov@suse.com>
Tue, 9 Feb 2021 15:16:09 +0000 (18:16 +0300)
committerIgor Fedotov <ifedotov@suse.com>
Wed, 18 Aug 2021 11:23:33 +0000 (14:23 +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>
src/os/bluestore/BlueFS.cc

index 3a653f425d043392016acae6c17c1aad8f0c2e94..385d9ef671d59427892eb18e241a0c8daecaa240 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;
 }