Merge pull request #1312 from ggtakec/fix_bug_cache

Fixed a bug about serializing from cache file
This commit is contained in:
Takeshi Nakatani 2020-06-19 22:54:39 +09:00 committed by GitHub
commit 9dc4148743
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -908,8 +908,8 @@ bool PageList::Serialize(CacheFileStat& file, bool is_output, ino_t inode)
cache_inode = 0;
}else{
// current head format is "<inode>:<size>\n"
total = cvt_strtoofft(strhead1.c_str(), /* base= */10);
cache_inode = static_cast<ino_t>(cvt_strtoofft(strhead2.c_str(), /* base= */10));
total = cvt_strtoofft(strhead2.c_str(), /* base= */10);
cache_inode = static_cast<ino_t>(cvt_strtoofft(strhead1.c_str(), /* base= */10));
if(0 == cache_inode){
S3FS_PRN_ERR("wrong inode number in parsed cache stats.");
delete[] ptmp;