Skip to content

Commit

Permalink
fix mds log level
Browse files Browse the repository at this point in the history
Change-Id: I2af8c457ec00ab048a229ce8ca330bc1f995619a
  • Loading branch information
hzchenwei7 committed Jul 17, 2019
1 parent c7a7e6a commit 7b59e34
Show file tree
Hide file tree
Showing 3 changed files with 525 additions and 198 deletions.
22 changes: 11 additions & 11 deletions src/mds/nameserver2/curvefs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ StatusCode CurveFS::DeleteFile(const std::string & filename, uint64_t fileId,
}

if (fileId != kUnitializedFileID && fileId != fileInfo.id()) {
LOG(ERROR) << "delete file, file id missmatch"
LOG(WARNING) << "delete file, file id missmatch"
<< ", fileName = " << filename
<< ", fileInfo.id() = " << fileInfo.id()
<< ", para fileId = " << fileId;
Expand Down Expand Up @@ -512,7 +512,7 @@ StatusCode CurveFS::RenameFile(const std::string & oldFileName,
}

if (oldFileId != kUnitializedFileID && oldFileId != oldFileInfo.id()) {
LOG(ERROR) << "rename file, oldFileId missmatch"
LOG(WARNING) << "rename file, oldFileId missmatch"
<< ", oldFileName = " << oldFileName
<< ", newFileName = " << newFileName
<< ", oldFileInfo.id() = " << oldFileInfo.id()
Expand Down Expand Up @@ -541,7 +541,7 @@ StatusCode CurveFS::RenameFile(const std::string & oldFileName,
std::string lastEntry;
auto ret2 = WalkPath(newFileName, &parentFileInfo, &lastEntry);
if (ret2 != StatusCode::kOK) {
LOG(INFO) << "dest middle dir not exist";
LOG(WARNING) << "dest middle dir not exist";
return StatusCode::kFileNotExists;
}

Expand All @@ -550,7 +550,7 @@ StatusCode CurveFS::RenameFile(const std::string & oldFileName,
if (ret3 == StatusCode::kOK) {
if (newFileId != kUnitializedFileID
&& newFileId != existNewFileInfo.id()) {
LOG(ERROR) << "rename file, newFileId missmatch"
LOG(WARNING) << "rename file, newFileId missmatch"
<< ", oldFileName = " << oldFileName
<< ", newFileName = " << newFileName
<< ", newFileInfo.id() = " << existNewFileInfo.id()
Expand Down Expand Up @@ -1029,13 +1029,13 @@ StatusCode CurveFS::GetSnapShotFileSegment(
}

if (offset % snapShotFileInfo.segmentsize() != 0) {
LOG(ERROR) << "offset not align with segment, fileName = "
LOG(WARNING) << "offset not align with segment, fileName = "
<< fileName << ", seq = " << seq;
return StatusCode::kParaError;
}

if (offset + snapShotFileInfo.segmentsize() > snapShotFileInfo.length()) {
LOG(ERROR) << "bigger than file length, fileName = "
LOG(WARNING) << "bigger than file length, fileName = "
<< fileName << ", seq = " << seq;
return StatusCode::kParaError;
}
Expand All @@ -1049,14 +1049,14 @@ StatusCode CurveFS::GetSnapShotFileSegment(
}

if (offset % fileInfo.segmentsize() != 0) {
LOG(ERROR) << "origin file offset not align with segment, fileName = "
LOG(WARNING) << "origin file offset not align with segment, fileName = "
<< fileName << ", offset = " << offset
<< ", file segmentsize = " << fileInfo.segmentsize();
return StatusCode::kParaError;
}

if (offset + fileInfo.segmentsize() > fileInfo.length()) {
LOG(ERROR) << "bigger than origin file length, fileName = "
LOG(WARNING) << "bigger than origin file length, fileName = "
<< fileName << ", offset = " << offset
<< ", file segmentsize = " << fileInfo.segmentsize()
<< ", file length = " << fileInfo.length();
Expand Down Expand Up @@ -1224,13 +1224,13 @@ StatusCode CurveFS::CreateCloneFile(const std::string &fileName,
FileInfo *retFileInfo) {
// 检查基本参数
if (filetype != FileType::INODE_PAGEFILE) {
LOG(ERROR) << "CreateCloneFile err, filename = " << fileName
LOG(WARNING) << "CreateCloneFile err, filename = " << fileName
<< ", filetype not support";
return StatusCode::kParaError;
}

if (length < kMiniFileLength || seq < kStartSeqNum) {
LOG(ERROR) << "CreateCloneFile err, filename = " << fileName
LOG(WARNING) << "CreateCloneFile err, filename = " << fileName
<< "file Length < MinFileLength " << kMiniFileLength
<< ", length = " << length;
return StatusCode::kParaError;
Expand Down Expand Up @@ -1390,7 +1390,7 @@ StatusCode CurveFS::CheckPathOwnerInternal(const std::string &filename,
return StatusCode::kOwnerAuthFail;
}
} else if (ret == StoreStatus::KeyNotExist) {
LOG(ERROR) << paths[i] << " not exist";
LOG(WARNING) << paths[i] << " not exist";
return StatusCode::kFileNotExists;
} else {
LOG(ERROR) << "GetFile " << paths[i] << " error, errcode = " << ret;
Expand Down
Loading

0 comments on commit 7b59e34

Please sign in to comment.