#include <lunaix/foptions.h>
#include <lunaix/fs.h>
#include <lunaix/mm/cake.h>
-#include <lunaix/mm/page.h>
#include <lunaix/mm/valloc.h>
#include <lunaix/process.h>
#include <lunaix/spike.h>
// 确保低位更加随机
_hash = _hash ^ (_hash >> VFS_HASHBITS);
// 与parent的指针值做加法,来减小碰撞的可能性。
- _hash += (u32_t)parent;
+ _hash += (u32_t)__ptr(parent);
*hash = _hash;
return &dnode_cache[_hash & VFS_HASH_MASK];
}
file->inode->atime = clock_unixtime();
if ((file->inode->itype & VFS_IFSEQDEV) || (fd_s->flags & FO_DIRECT)) {
- errno = file->ops->read(file->inode, buf, count, file->f_pos);
+ errno = file->ops->read(file->inode, buf, count, file->f_pos);
} else {
errno = pcache_read(file->inode, buf, count, file->f_pos);
}
ret_ptr = buf;
done:
- __current->k_status = errno;
+ syscall_result(errno);
return ret_ptr;
}
.st_blocks = vino->lb_usage,
.st_size = vino->fsize,
.mode = vino->itype,
- .st_ioblksize = PG_SIZE,
+ .st_ioblksize = PAGE_SIZE,
.st_blksize = vino->sb->blksize};
if (VFS_DEVFILE(vino->itype)) {