性能测试用例和结果更新

This commit is contained in:
1iaan
2026-03-30 21:17:25 +08:00
parent 224d813499
commit ea64511f95
17 changed files with 706 additions and 65 deletions

View File

@@ -207,12 +207,37 @@ zvfs_open_impl(int real_fd, const char *abspath, int flags, mode_t mode)
struct zvfs_inode *inode = NULL;
uint64_t blob_id = 0;
uint64_t handle_id = 0;
int create_new = 0;
zvfs_debug_open_log(abspath, NULL,
"open_impl enter real_fd=%d path=%s flags=0x%x mode=%#o",
real_fd, zvfs_dbg_str(abspath), flags, (unsigned)mode);
if (flags & O_CREAT) {
/*
* O_CREAT does not imply the file is newly created.
* fio, for example, may open an existing file with O_CREAT again
* during the worker phase. Only create a new blob when the backing
* file does not already carry a ZVFS blob_id xattr.
*/
if (zvfs_xattr_read_blob_id(real_fd, &blob_id) == 0) {
create_new = 0;
} else if (errno == ENODATA
#ifdef ENOATTR
|| errno == ENOATTR
#endif
) {
create_new = 1;
blob_id = 0;
} else {
zvfs_debug_open_log(abspath, NULL,
"open_impl xattr probe fail errno=%d(%s)",
errno, strerror(errno));
goto fail;
}
}
if (create_new) {
/* ---- 创建路径 -------------------------------------------- */
/* 1. 创建 blob */