optimization: find(1) is 20-200% faster for disk based and 300-600% faster

for memory cache based directory traversals
master
szaka 2007-09-27 22:15:03 +00:00
parent f557e5f6ba
commit 91604e7edd
1 changed files with 8 additions and 1 deletions

View File

@ -568,7 +568,14 @@ static int ntfs_fuse_filler(ntfs_fuse_fill_context_t *fill_ctx,
if (MREF(mref) == FILE_root || MREF(mref) >= FILE_first_user ||
ctx->show_sys_files) {
struct stat st = { .st_ino = MREF(mref) };
struct stat st = {};
st.st_ino = MREF(mref);
if (dt_type == NTFS_DT_REG)
st.st_mode = S_IFREG | (0777 & ~ctx->fmask);
else if (dt_type == NTFS_DT_DIR)
st.st_mode = S_IFDIR | (0777 & ~ctx->dmask);
ret = fill_ctx->filler(fill_ctx->buf, filename, &st, 0);
}