refactor(fsck): reduce debug log for fsck gc comand. #22958547

Signed-off-by: Victor1319 <zengxuewei@oppo.com>
This commit is contained in:
Victor1319 2025-01-06 16:04:52 +08:00 committed by Victor1319
parent 5fb94fec97
commit b67ac4dec5

View File

@ -467,7 +467,7 @@ func getExtentsByMpId(dir string, volname string, mpId string) {
StorageClass: proto.StorageClass_Unspecified,
HybridCloudExtents: metanode.NewSortedHybridCloudExtents(),
}
slog.Printf("[getExtentsByMpId] host(%v) mpId(%v) get inode(%v): %v", addr, mpId, ino.Inode, ino.String())
// slog.Printf("[getExtentsByMpId] host(%v) mpId(%v) get inode(%v): %v", addr, mpId, ino.Inode, ino.String())
if err = ino.Unmarshal(inoBuf); err != nil {
slog.Fatalf("loadInode failed, unmarshal error, mp %s, host %s, err %s", mpId, addr, err.Error())
}
@ -479,8 +479,8 @@ func getExtentsByMpId(dir string, volname string, mpId string) {
var walkBuf *bytes.Buffer
walkFunc := func(_ int, ek proto.ExtentKey) bool {
slog.Printf("[getExtentsByMpId.walkFunc] ######## mpId(%v) dpId(%v) extentId(%v) size(%v)",
mpId, ek.PartitionId, ek.ExtentId, ek.Size)
// slog.Printf("[getExtentsByMpId.walkFunc] ######## mpId(%v) dpId(%v) extentId(%v) size(%v)",
// mpId, ek.PartitionId, ek.ExtentId, ek.Size)
if storage.IsTinyExtent(ek.ExtentId) {
return true
@ -509,7 +509,7 @@ func getExtentsByMpId(dir string, volname string, mpId string) {
replicaExtents := se.(*metanode.SortedExtents)
walkBuf = normalBuf
replicaExtents.Range(walkFunc)
} else {
} else if proto.IsRegular(ino.Type) {
// TODO:tangjignyu check if dir then not error
log.LogErrorf("HybridCloudExtents is nil, mpId(%v) inode(%v) host(%v) storageClass(%v)",
mpId, ino.Inode, addr, proto.StorageClassString(ino.StorageClass))