Fixed a bug - issue#5

This commit is contained in:
Takeshi Nakatani 2014-01-16 16:04:41 +00:00
parent 1d1e8f3e7d
commit 5fd33405af
2 changed files with 3 additions and 0 deletions

View File

@ -425,6 +425,7 @@ bool convert_header_to_stat(const char* path, headers_t& meta, struct stat* pst,
if(S_ISREG(pst->st_mode)){
pst->st_blocks = get_blocks(pst->st_size);
}
pst->st_blksize = 4096;
// mtime
pst->st_mtime = get_mtime(meta);

View File

@ -708,6 +708,8 @@ static int s3fs_getattr(const char* path, struct stat* stbuf)
}
FdManager::get()->Close(ent);
}
stbuf->st_blksize = 4096;
stbuf->st_blocks = get_blocks(stbuf->st_size);
}
FPRNINFO("[path=%s] uid=%u, gid=%u, mode=%04o", path, (unsigned int)(stbuf->st_uid), (unsigned int)(stbuf->st_gid), stbuf->st_mode);
S3FS_MALLOCTRIM(0);