diff --git a/scorpio/Cargo.toml b/scorpio/Cargo.toml index 2fcac108d..e357a9a1e 100644 --- a/scorpio/Cargo.toml +++ b/scorpio/Cargo.toml @@ -31,11 +31,19 @@ futures = "0.3.31" fuse3 = { version = "0.8.1" ,features = ["tokio-runtime","unprivileged"]} vmm-sys-util = { version = "0.11" } futures-util = { version = "0.3.30", features = ["sink"] } +quote = "1.0.38" +proc-macro2 = "1.0.93" +syn = { version = "2.0.98", features = ["full", "extra-traits"] } -[features] +logging_macros = { path = "src/passthrough/logging_macros" } +uuid = "1.14.0" + + +[features] async-io = [] [workspace] +members = ["src/passthrough/logging_macros"] [package.metadata.docs.rs] all-features = true diff --git a/scorpio/README.md b/scorpio/README.md index 0deca472a..2225532ce 100644 --- a/scorpio/README.md +++ b/scorpio/README.md @@ -56,7 +56,7 @@ The following interfaces are currently available: curl -X POST http://localhost:2725/api/fs/mount -H "Content-Type: application/json" -d '{"path": "third-part/mega/scorpio"}' curl -X GET http://localhost:2725/api/fs/mpoint curl -X POST http://localhost:2725/api/fs/umount -H "Content-Type: application/json" -d '{"path": "third-part/mega/scorpio"}' - +curl -X POST http://localhost:2725/api/fs/mount -H "Content-Type: application/json" -d '{"path": "third-part/mega/ts"}' ``` ### How to Contribute? diff --git a/scorpio/config.toml b/scorpio/config.toml index 7ac61f085..bd93f6065 100644 --- a/scorpio/config.toml +++ b/scorpio/config.toml @@ -3,4 +3,8 @@ workspace = "/home/luxian/megadir/mount" store_path = "/home/luxian/megadir/store" git_author = "MEGA" git_email = "admin@mega.org" -works = [] + +[[works]] +path = "third-part/buck-hello" +node = 8 +hash = "5f70f0f460d92d73eac0ea09ef2edb3840bfc68f" diff --git a/scorpio/script/.gitignore b/scorpio/script/.gitignore new file mode 100644 index 000000000..8cdcbba4b --- /dev/null +++ b/scorpio/script/.gitignore @@ -0,0 +1 @@ +output.txt \ No newline at end of file diff --git a/scorpio/script/input.log b/scorpio/script/input.log new file mode 100644 index 000000000..49e028fcd --- /dev/null +++ b/scorpio/script/input.log @@ -0,0 +1,1273 @@ +warning: /home/luxian/github/mega/scorpio/src/passthrough/logging_macros/Cargo.toml: library `logging_macros` should only specify `proc-macro = true` instead of setting `crate-type` +warning: unused variable: `guard` + --> src/passthrough/async_io.rs:174:14 + | +174 | let (guard, dir) = data.get_file_mut().await; + | ^^^^^ help: if this is intentional, prefix it with an underscore: `_guard` + | + = note: `#[warn(unused_variables)]` on by default + +warning: method `get_children` is never used + --> src/dicfuse/tree_store.rs:32:12 + | +25 | impl StorageItem { + | ---------------- method in this implementation +... +32 | pub fn get_children(&self)->Vec{ + | ^^^^^^^^^^^^ + | + = note: `#[warn(dead_code)]` on by default + +warning: function `push` is never used + --> src/manager/push.rs:36:14 + | +36 | pub async fn push(path:PathBuf,monopath:PathBuf){ + | ^^^^ + +warning: method `fetch` is never used + --> src/manager/fetch.rs:20:14 + | +18 | pub trait CheckHash{ + | --------- method in this trait +19 | async fn check(&mut self); +20 | async fn fetch+ std::marker::Send >(&mut self,inode:u64,monopath :P)-> Wor... + | ^^^^^ + +warning: methods `store_commit` and `get_commit` are never used + --> src/manager/store.rs:30:8 + | +29 | pub trait CommitStore{ + | ----------- methods in this trait +30 | fn store_commit(&self,commit:Commit) -> Result<()>; + | ^^^^^^^^^^^^ +31 | fn get_commit(&self) -> Result; + | ^^^^^^^^^^ + +warning: `scorpio` (bin "scorpio") generated 5 warnings + Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.20s + Running `target/debug/scorpio` +Hello, world! +readdir:.. +readdir:. +readdir:toolchains +readdir:main.cpp +readdir:.buckconfig +readdir:.. +readdir:.buckroot +readdir:. +readdir:.gitignore +readdir:BUCK +readdir:ping_task.sh +server running...ID:0355f129-61b2-4058-8541-73b1bf33e15c|[init] - Call: +fetch path :third-part +import item :Item { name: ".mega_cedar.json", path: "/third-part/.mega_cedar.json", content_type: "file" } +import item :Item { name: "buck-hello", path: "/third-part/buck-hello", content_type: "directory" } +fetch path :project +import item :Item { name: ".mega_cedar.json", path: "/project/.mega_cedar.json", content_type: "file" } +fetch path :doc +import item :Item { name: ".mega_cedar.json", path: "/doc/.mega_cedar.json", content_type: "file" } +fetch path :release +import item :Item { name: ".mega_cedar.json", path: "/release/.mega_cedar.json", content_type: "file" } +fetch path :third-part/buck-hello +import item :Item { name: ".buckconfig", path: "/third-part/buck-hello/.buckconfig", content_type: "file" } +import item :Item { name: ".buckroot", path: "/third-part/buck-hello/.buckroot", content_type: "file" } +import item :Item { name: ".gitignore", path: "/third-part/buck-hello/.gitignore", content_type: "file" } +import item :Item { name: "BUCK", path: "/third-part/buck-hello/BUCK", content_type: "file" } +import item :Item { name: "main.cpp", path: "/third-part/buck-hello/main.cpp", content_type: "file" } +import item :Item { name: "ping_task.sh", path: "/third-part/buck-hello/ping_task.sh", content_type: "file" } +import item :Item { name: "toolchains", path: "/third-part/buck-hello/toolchains", content_type: "directory" } +fetch path :third-part/buck-hello/toolchains +import item :Item { name: "BUCK", path: "/third-part/buck-hello/toolchains/BUCK", content_type: "file" } +readdir:.. +readdir:. +readdir:toolchains +readdir:main.cpp +readdir:.buckconfig +readdir:.. +readdir:.buckroot +readdir:. +readdir:.gitignore +readdir:BUCK +readdir:ping_task.sh +ID:0355f129-61b2-4058-8541-73b1bf33e15c [init] - Success: ReplyInit { max_write: 131072 } +ID:b0a8dd9d-7feb-4016-a9c6-173975b404d8|[getattr] - Call: inode=1, fh=, flags=0 + readonly inode root +ID:b0a8dd9d-7feb-4016-a9c6-173975b404d8 [getattr] - Success: ReplyAttr { ttl: 500s, attr: FileAttr { ino: 1, size: 0, blocks: 0, atime: Timestamp { sec: 0, nsec: 0 }, mtime: Timestamp { sec: 0, nsec: 0 }, ctime: Timestamp { sec: 0, nsec: 0 }, kind: Directory, perm: 493, nlink: 0, uid: 0, gid: 0, rdev: 0, blksize: 0 } } +ID:4b3d3daa-12ab-4e7f-bbcc-031b9873f132|[lookup] - Call: parent=1, name=third-part + readonly inode root +ID:4b3d3daa-12ab-4e7f-bbcc-031b9873f132 [lookup] - Success: ReplyEntry { ttl: 500s, attr: FileAttr { ino: 3, size: 0, blocks: 0, atime: Timestamp { sec: 0, nsec: 0 }, mtime: Timestamp { sec: 0, nsec: 0 }, ctime: Timestamp { sec: 0, nsec: 0 }, kind: Directory, perm: 493, nlink: 0, uid: 0, gid: 0, rdev: 0, blksize: 0 }, generation: 0 } +ID:4b141cd9-297a-49bc-9f5a-b7eb1f7a39d4|[access] - Call: inode=3, mask=1 + readonly inode root +ID:4b141cd9-297a-49bc-9f5a-b7eb1f7a39d4 [access] - Success: () +ID:d1e46d3a-5021-4ddd-9aaa-724b74564b52|[opendir] - Call: inode=3, flags=100352 + readonly inode root +ID:d1e46d3a-5021-4ddd-9aaa-724b74564b52 [scorpio::fuse::MegaFuse] opendir - Obtained fh: 0 +ID:d1e46d3a-5021-4ddd-9aaa-724b74564b52 [opendir] - Success: ReplyOpen { fh: 0, flags: 0 } +ID:c2ae8dbc-5048-443b-b1f6-660653173c8b|[readdirplus] - Call: parent=3, fh=0, offset=0, lock_owner=0 + readonly inode root +readdri len :4[Ok(DirectoryEntryPlus { inode: 3, generation: 0, kind: Directory, name: ".", offset: 1, attr: FileAttr { ino: 3, size: 0, blocks: 0, atime: Timestamp { sec: 0, nsec: 0 }, mtime: Timestamp { sec: 0, nsec: 0 }, ctime: Timestamp { sec: 0, nsec: 0 }, kind: Directory, perm: 493, nlink: 0, uid: 0, gid: 0, rdev: 0, blksize: 0 }, entry_ttl: 500s, attr_ttl: 500s }), Ok(DirectoryEntryPlus { inode: 1, generation: 0, kind: Directory, name: "..", offset: 2, attr: FileAttr { ino: 1, size: 0, blocks: 0, atime: Timestamp { sec: 0, nsec: 0 }, mtime: Timestamp { sec: 0, nsec: 0 }, ctime: Timestamp { sec: 0, nsec: 0 }, kind: Directory, perm: 493, nlink: 0, uid: 0, gid: 0, rdev: 0, blksize: 0 }, entry_ttl: 500s, attr_ttl: 500s }), Ok(DirectoryEntryPlus { inode: 7, generation: 0, kind: RegularFile, name: ".mega_cedar.json", offset: 3, attr: FileAttr { ino: 7, size: 860, blocks: 0, atime: Timestamp { sec: 0, nsec: 0 }, mtime: Timestamp { sec: 0, nsec: 0 }, ctime: Timestamp { sec: 0, nsec: 0 }, kind: RegularFile, perm: 493, nlink: 0, uid: 0, gid: 0, rdev: 0, blksize: 0 }, entry_ttl: 500s, attr_ttl: 500s }), Ok(DirectoryEntryPlus { inode: 8, generation: 0, kind: Directory, name: "buck-hello", offset: 4, attr: FileAttr { ino: 8, size: 0, blocks: 0, atime: Timestamp { sec: 0, nsec: 0 }, mtime: Timestamp { sec: 0, nsec: 0 }, ctime: Timestamp { sec: 0, nsec: 0 }, kind: Directory, perm: 493, nlink: 0, uid: 0, gid: 0, rdev: 0, blksize: 0 }, entry_ttl: 500s, attr_ttl: 500s })] +ID:c2ae8dbc-5048-443b-b1f6-660653173c8b [readdirplus] - Success: "" +ID:70236377-33e5-4e13-b45a-7f0ed314fe59|[readdirplus] - Call: parent=3, fh=0, offset=4, lock_owner=0 + readonly inode root +readdri len :4[] +ID:70236377-33e5-4e13-b45a-7f0ed314fe59 [readdirplus] - Success: "" +ID:f5dc5390-3e0e-42aa-9977-c3dd6fbb3093|[releasedir] - Call: inode=3, fh=0, flags=100352 + readonly inode root +ID:f5dc5390-3e0e-42aa-9977-c3dd6fbb3093 [releasedir] - Success: () +ID:6ba6ad77-b113-4074-a63b-28eb7d1b0e5b|[lookup] - Call: parent=1, name=third-part$ + readonly inode root +ID:6ba6ad77-b113-4074-a63b-28eb7d1b0e5b [lookup] - Error: Errno(5) +ID:624775c4-6435-4065-835d-e86d9120ad68|[lookup] - Call: parent=1, name=third-part$ + readonly inode root +ID:624775c4-6435-4065-835d-e86d9120ad68 [lookup] - Error: Errno(5) +ID:3225133b-b846-49d7-9608-ec0bb3e5fdcc|[getattr] - Call: inode=3, fh=, flags=0 + readonly inode root +ID:3225133b-b846-49d7-9608-ec0bb3e5fdcc [getattr] - Success: ReplyAttr { ttl: 500s, attr: FileAttr { ino: 3, size: 0, blocks: 0, atime: Timestamp { sec: 0, nsec: 0 }, mtime: Timestamp { sec: 0, nsec: 0 }, ctime: Timestamp { sec: 0, nsec: 0 }, kind: Directory, perm: 493, nlink: 0, uid: 0, gid: 0, rdev: 0, blksize: 0 } } +ID:6e82ea00-e0ae-4db0-954d-269cea11181d|[opendir] - Call: inode=3, flags=100352 + readonly inode root +ID:6e82ea00-e0ae-4db0-954d-269cea11181d [scorpio::fuse::MegaFuse] opendir - Obtained fh: 0 +ID:6e82ea00-e0ae-4db0-954d-269cea11181d [opendir] - Success: ReplyOpen { fh: 0, flags: 0 } +ID:361530f1-e187-4789-b203-5a7f49510822|[readdirplus] - Call: parent=3, fh=0, offset=0, lock_owner=0 + readonly inode root +readdri len :4[Ok(DirectoryEntryPlus { inode: 3, generation: 0, kind: Directory, name: ".", offset: 1, attr: FileAttr { ino: 3, size: 0, blocks: 0, atime: Timestamp { sec: 0, nsec: 0 }, mtime: Timestamp { sec: 0, nsec: 0 }, ctime: Timestamp { sec: 0, nsec: 0 }, kind: Directory, perm: 493, nlink: 0, uid: 0, gid: 0, rdev: 0, blksize: 0 }, entry_ttl: 500s, attr_ttl: 500s }), Ok(DirectoryEntryPlus { inode: 1, generation: 0, kind: Directory, name: "..", offset: 2, attr: FileAttr { ino: 1, size: 0, blocks: 0, atime: Timestamp { sec: 0, nsec: 0 }, mtime: Timestamp { sec: 0, nsec: 0 }, ctime: Timestamp { sec: 0, nsec: 0 }, kind: Directory, perm: 493, nlink: 0, uid: 0, gid: 0, rdev: 0, blksize: 0 }, entry_ttl: 500s, attr_ttl: 500s }), Ok(DirectoryEntryPlus { inode: 7, generation: 0, kind: RegularFile, name: ".mega_cedar.json", offset: 3, attr: FileAttr { ino: 7, size: 860, blocks: 0, atime: Timestamp { sec: 0, nsec: 0 }, mtime: Timestamp { sec: 0, nsec: 0 }, ctime: Timestamp { sec: 0, nsec: 0 }, kind: RegularFile, perm: 493, nlink: 0, uid: 0, gid: 0, rdev: 0, blksize: 0 }, entry_ttl: 500s, attr_ttl: 500s }), Ok(DirectoryEntryPlus { inode: 8, generation: 0, kind: Directory, name: "buck-hello", offset: 4, attr: FileAttr { ino: 8, size: 0, blocks: 0, atime: Timestamp { sec: 0, nsec: 0 }, mtime: Timestamp { sec: 0, nsec: 0 }, ctime: Timestamp { sec: 0, nsec: 0 }, kind: Directory, perm: 493, nlink: 0, uid: 0, gid: 0, rdev: 0, blksize: 0 }, entry_ttl: 500s, attr_ttl: 500s })] +ID:361530f1-e187-4789-b203-5a7f49510822 [readdirplus] - Success: "" +ID:c9923d8a-8d32-45f3-8100-b020cff1c9fa|[readdirplus] - Call: parent=3, fh=0, offset=4, lock_owner=0 + readonly inode root +readdri len :4[] +ID:c9923d8a-8d32-45f3-8100-b020cff1c9fa [readdirplus] - Success: "" +ID:91bf7b89-6f8c-4b3e-ae24-8f5be5c1515f|[releasedir] - Call: inode=3, fh=0, flags=100352 + readonly inode root +ID:91bf7b89-6f8c-4b3e-ae24-8f5be5c1515f [releasedir] - Success: () +ID:18a5bb2b-6630-4515-837b-5ecd5d6cd181|[opendir] - Call: inode=3, flags=100352 + readonly inode root +ID:18a5bb2b-6630-4515-837b-5ecd5d6cd181 [scorpio::fuse::MegaFuse] opendir - Obtained fh: 0 +ID:18a5bb2b-6630-4515-837b-5ecd5d6cd181 [opendir] - Success: ReplyOpen { fh: 0, flags: 0 } +ID:bd1b8c15-eefe-479f-b5e4-7cc13add8590|[getattr] - Call: inode=3, fh=, flags=0 + readonly inode root +ID:bd1b8c15-eefe-479f-b5e4-7cc13add8590 [getattr] - Success: ReplyAttr { ttl: 500s, attr: FileAttr { ino: 3, size: 0, blocks: 0, atime: Timestamp { sec: 0, nsec: 0 }, mtime: Timestamp { sec: 0, nsec: 0 }, ctime: Timestamp { sec: 0, nsec: 0 }, kind: Directory, perm: 493, nlink: 0, uid: 0, gid: 0, rdev: 0, blksize: 0 } } +ID:cc55293e-b807-4d91-b15b-598af1f79ed6|[readdirplus] - Call: parent=3, fh=0, offset=0, lock_owner=0 + readonly inode root +readdri len :4[Ok(DirectoryEntryPlus { inode: 3, generation: 0, kind: Directory, name: ".", offset: 1, attr: FileAttr { ino: 3, size: 0, blocks: 0, atime: Timestamp { sec: 0, nsec: 0 }, mtime: Timestamp { sec: 0, nsec: 0 }, ctime: Timestamp { sec: 0, nsec: 0 }, kind: Directory, perm: 493, nlink: 0, uid: 0, gid: 0, rdev: 0, blksize: 0 }, entry_ttl: 500s, attr_ttl: 500s }), Ok(DirectoryEntryPlus { inode: 1, generation: 0, kind: Directory, name: "..", offset: 2, attr: FileAttr { ino: 1, size: 0, blocks: 0, atime: Timestamp { sec: 0, nsec: 0 }, mtime: Timestamp { sec: 0, nsec: 0 }, ctime: Timestamp { sec: 0, nsec: 0 }, kind: Directory, perm: 493, nlink: 0, uid: 0, gid: 0, rdev: 0, blksize: 0 }, entry_ttl: 500s, attr_ttl: 500s }), Ok(DirectoryEntryPlus { inode: 7, generation: 0, kind: RegularFile, name: ".mega_cedar.json", offset: 3, attr: FileAttr { ino: 7, size: 860, blocks: 0, atime: Timestamp { sec: 0, nsec: 0 }, mtime: Timestamp { sec: 0, nsec: 0 }, ctime: Timestamp { sec: 0, nsec: 0 }, kind: RegularFile, perm: 493, nlink: 0, uid: 0, gid: 0, rdev: 0, blksize: 0 }, entry_ttl: 500s, attr_ttl: 500s }), Ok(DirectoryEntryPlus { inode: 8, generation: 0, kind: Directory, name: "buck-hello", offset: 4, attr: FileAttr { ino: 8, size: 0, blocks: 0, atime: Timestamp { sec: 0, nsec: 0 }, mtime: Timestamp { sec: 0, nsec: 0 }, ctime: Timestamp { sec: 0, nsec: 0 }, kind: Directory, perm: 493, nlink: 0, uid: 0, gid: 0, rdev: 0, blksize: 0 }, entry_ttl: 500s, attr_ttl: 500s })] +ID:cc55293e-b807-4d91-b15b-598af1f79ed6 [readdirplus] - Success: "" +ID:740d6c3b-52a4-4549-b754-5a15ead9d1b6|[readdirplus] - Call: parent=3, fh=0, offset=4, lock_owner=0 + readonly inode root +readdri len :4[] +ID:740d6c3b-52a4-4549-b754-5a15ead9d1b6 [readdirplus] - Success: "" +ID:8234b48c-06f1-4d24-a4ae-abebe17cd72b|[getattr] - Call: inode=3, fh=, flags=0 +ID:34580589-c77a-4113-98ec-e57d29ca2647|[releasedir] - Call: inode=3, fh=0, flags=100352 + readonly inode root +ID:8234b48c-06f1-4d24-a4ae-abebe17cd72b [getattr] - Success: ReplyAttr { ttl: 500s, attr: FileAttr { ino: 3, size: 0, blocks: 0, atime: Timestamp { sec: 0, nsec: 0 }, mtime: Timestamp { sec: 0, nsec: 0 }, ctime: Timestamp { sec: 0, nsec: 0 }, kind: Directory, perm: 493, nlink: 0, uid: 0, gid: 0, rdev: 0, blksize: 0 } } + readonly inode root +ID:34580589-c77a-4113-98ec-e57d29ca2647 [releasedir] - Success: () +ID:3bd485f0-67e3-44fa-ae85-84e86fe7cde7|[access] - Call: inode=8, mask=1 + overlay inode root +ID:3bd485f0-67e3-44fa-ae85-84e86fe7cde7 [access] - Success: () +ID:2f8f6ea3-62e7-4cc4-90fc-2136cbd638fa|[opendir] - Call: inode=8, flags=100352 + overlay inode root +ID:2f8f6ea3-62e7-4cc4-90fc-2136cbd638fa [scorpio::fuse::MegaFuse] opendir - Obtained fh: 2 +ID:2f8f6ea3-62e7-4cc4-90fc-2136cbd638fa [opendir] - Success: ReplyOpen { fh: 2, flags: 100352 } +ID:1df1766a-c6dc-427a-ab31-dadf0b0487ab|[readdirplus] - Call: parent=8, fh=2, offset=0, lock_owner=0 + overlay inode root +--entry name:. +--entry name:.. +--entry name:BUCK +--entry name:.buckroot +--entry name:.. +--entry name:main.cpp +--entry name:ping_task.sh +--entry name:toolchains +--entry name:.gitignore +--entry name:. +--entry name:.buckconfig +ID:1df1766a-c6dc-427a-ab31-dadf0b0487ab [readdirplus] - Success: "" +ID:f4de6ed9-0c86-4583-b258-6f55c9cbfb7b|[readdirplus] - Call: parent=8, fh=2, offset=11, lock_owner=0 + overlay inode root +ID:f4de6ed9-0c86-4583-b258-6f55c9cbfb7b [readdirplus] - Success: "" +ID:bf4d4385-f9f3-486c-a0ca-0c8d7de34d7a|[releasedir] - Call: inode=8, fh=2, flags=100352 + overlay inode root +ID:bf4d4385-f9f3-486c-a0ca-0c8d7de34d7a [releasedir] - Success: () +ID:ad70a022-d6a6-4731-b9ef-d34a7f96eb3c|[opendir] - Call: inode=8, flags=100352 + overlay inode root +ID:ad70a022-d6a6-4731-b9ef-d34a7f96eb3c [scorpio::fuse::MegaFuse] opendir - Obtained fh: 3 +ID:ad70a022-d6a6-4731-b9ef-d34a7f96eb3c [opendir] - Success: ReplyOpen { fh: 3, flags: 100352 } +ID:a123d06a-67b6-4e1e-8edd-33d3c3129af4|[getattr] - Call: inode=8, fh=, flags=0 + overlay inode root +ID:a123d06a-67b6-4e1e-8edd-33d3c3129af4 [getattr] - Success: ReplyAttr { ttl: 5s, attr: FileAttr { ino: 17918, size: 4096, blocks: 8, atime: Timestamp { sec: 1740289277, nsec: 768950578 }, mtime: Timestamp { sec: 1740289247, nsec: 218959710 }, ctime: Timestamp { sec: 1740289247, nsec: 218959710 }, kind: Directory, perm: 511, nlink: 2, uid: 1000, gid: 1000, rdev: 0, blksize: 4096 } } +ID:7718edb0-1fc5-47f5-b483-5811eb619a81|[readdirplus] - Call: parent=8, fh=3, offset=0, lock_owner=0 + overlay inode root +--entry name:. +--entry name:.. +--entry name:BUCK +--entry name:.buckroot +--entry name:.. +--entry name:main.cpp +--entry name:ping_task.sh +--entry name:toolchains +--entry name:.gitignore +--entry name:. +--entry name:.buckconfig +ID:7718edb0-1fc5-47f5-b483-5811eb619a81 [readdirplus] - Success: "" +ID:e6c61c98-4eb3-4db5-a163-93cff8f97865|[getxattr] - Call: inode=8, name=security.selinux, size=255 + overlay inode root +ID:e6c61c98-4eb3-4db5-a163-93cff8f97865 [getxattr] - Error: Errno(61) +ID:18810c0d-b7dc-44a8-8c07-dcbcee777d33|[getxattr] - Call: inode=8, name=system.posix_acl_access, size=0 + overlay inode root +ID:18810c0d-b7dc-44a8-8c07-dcbcee777d33 [getxattr] - Error: Errno(61) +ID:bf219e0e-6e79-4365-90ae-a5fba8ede0ae|[getxattr] - Call: inode=8, name=system.posix_acl_default, size=0 + overlay inode root +ID:bf219e0e-6e79-4365-90ae-a5fba8ede0ae [getxattr] - Error: Errno(61) +ID:f8b471ac-eaf7-4543-8301-e015f5b11d99|[getxattr] - Call: inode=3, name=security.selinux, size=255 + readonly inode root +ID:f8b471ac-eaf7-4543-8301-e015f5b11d99 [getxattr] - Error: Errno(38) +ID:bcffe419-c5ca-4ba9-a95a-7eaab7feb716|[readdirplus] - Call: parent=8, fh=3, offset=11, lock_owner=0 + overlay inode root +ID:bcffe419-c5ca-4ba9-a95a-7eaab7feb716 [readdirplus] - Success: "" +ID:6dfb464f-fe7f-443a-9d29-e2b5d86231d1|[releasedir] - Call: inode=8, fh=3, flags=100352 + overlay inode root +ID:6dfb464f-fe7f-443a-9d29-e2b5d86231d1 [releasedir] - Success: () +ID:574c32b1-5383-4155-ad60-a7a2fcc9823e|[lookup] - Call: parent=8, name=drwxrwxrwx + overlay inode root +LOOKUP: parent: 8, name: drwxrwxrwx + +ID:574c32b1-5383-4155-ad60-a7a2fcc9823e [lookup] - Error: Errno(2) +ID:a8160eed-299f-4d05-84e7-bd2a92c8c092|[lookup] - Call: parent=8, name=drwxrwxrwx + overlay inode root +LOOKUP: parent: 8, name: drwxrwxrwx + +ID:a8160eed-299f-4d05-84e7-bd2a92c8c092 [lookup] - Error: Errno(2) +ID:62d66db8-34e3-4527-b7a1-8f0906f54dbe|[lookup] - Call: parent=8, name=luxian + overlay inode root +LOOKUP: parent: 8, name: luxian + +ID:62d66db8-34e3-4527-b7a1-8f0906f54dbe [lookup] - Error: Errno(2) +ID:a465cb69-29d8-432f-945e-42771b453112|[lookup] - Call: parent=8, name=luxian + overlay inode root +LOOKUP: parent: 8, name: luxian + +ID:a465cb69-29d8-432f-945e-42771b453112 [lookup] - Error: Errno(2) +ID:6dbe117c-0002-485b-ad7d-2e376d5004ba|[lookup] - Call: parent=8, name=Feb + overlay inode root +LOOKUP: parent: 8, name: Feb + +ID:6dbe117c-0002-485b-ad7d-2e376d5004ba [lookup] - Error: Errno(2) +ID:e5b0ef2d-2f29-4732-b80a-cca9d5427b00|[lookup] - Call: parent=8, name=Feb + overlay inode root +LOOKUP: parent: 8, name: Feb + +ID:e5b0ef2d-2f29-4732-b80a-cca9d5427b00 [lookup] - Error: Errno(2) +ID:d598794a-f092-4057-9aa6-866a730c112d|[lookup] - Call: parent=8, name=23 + overlay inode root +LOOKUP: parent: 8, name: 23 + +ID:d598794a-f092-4057-9aa6-866a730c112d [lookup] - Error: Errno(2) +ID:faf70118-92b3-41f6-b5be-7d3735b0f6c8|[lookup] - Call: parent=8, name=23 + overlay inode root +LOOKUP: parent: 8, name: 23 + +ID:faf70118-92b3-41f6-b5be-7d3735b0f6c8 [lookup] - Error: Errno(2) +ID:a24f1bc1-1d89-4da8-adf0-89e15b88b67d|[lookup] - Call: parent=8, name=drwxr-xr-x + overlay inode root +LOOKUP: parent: 8, name: drwxr-xr-x + +ID:a24f1bc1-1d89-4da8-adf0-89e15b88b67d [lookup] - Error: Errno(2) +ID:ab737d25-052f-40e3-b47a-11b0c7a556ba|[lookup] - Call: parent=8, name=drwxr-xr-x + overlay inode root +LOOKUP: parent: 8, name: drwxr-xr-x + +ID:ab737d25-052f-40e3-b47a-11b0c7a556ba [lookup] - Error: Errno(2) +ID:da5f4e2f-c2a6-43a9-8e6f-f78270d1be28|[lookup] - Call: parent=8, name=-rw-r--r-- + overlay inode root +LOOKUP: parent: 8, name: -rw-r--r-- + +ID:da5f4e2f-c2a6-43a9-8e6f-f78270d1be28 [lookup] - Error: Errno(2) +ID:bfaa22f7-8def-4668-9b4b-91d54bb7a656|[lookup] - Call: parent=8, name=-rw-r--r-- + overlay inode root +LOOKUP: parent: 8, name: -rw-r--r-- + +ID:bfaa22f7-8def-4668-9b4b-91d54bb7a656 [lookup] - Error: Errno(2) +ID:24b69370-bdf6-4b49-b3ad-f3d8dbf47745|[getattr] - Call: inode=8, fh=, flags=0 + overlay inode root +ID:24b69370-bdf6-4b49-b3ad-f3d8dbf47745 [getattr] - Success: ReplyAttr { ttl: 5s, attr: FileAttr { ino: 17918, size: 4096, blocks: 8, atime: Timestamp { sec: 1740289277, nsec: 768950578 }, mtime: Timestamp { sec: 1740289247, nsec: 218959710 }, ctime: Timestamp { sec: 1740289247, nsec: 218959710 }, kind: Directory, perm: 511, nlink: 2, uid: 1000, gid: 1000, rdev: 0, blksize: 4096 } } +ID:db918d08-2235-4cfe-b241-7aa30f64dffd|[lookup] - Call: parent=8, name=.buckconfig + overlay inode root +LOOKUP: parent: 8, name: .buckconfig + +ID:db918d08-2235-4cfe-b241-7aa30f64dffd [lookup] - Success: ReplyEntry { ttl: 5s, attr: FileAttr { ino: 8589934592, size: 603, blocks: 8, atime: Timestamp { sec: 1740289246, nsec: 938959781 }, mtime: Timestamp { sec: 1740289246, nsec: 938959781 }, ctime: Timestamp { sec: 1740289246, nsec: 938959781 }, kind: RegularFile, perm: 420, nlink: 1, uid: 1000, gid: 1000, rdev: 0, blksize: 4096 }, generation: 0 } +ID:70600904-9479-4c4e-ab4a-f681c0aed58b|[lookup] - Call: parent=8, name=.buckroot + overlay inode root +LOOKUP: parent: 8, name: .buckroot + +ID:70600904-9479-4c4e-ab4a-f681c0aed58b [lookup] - Success: ReplyEntry { ttl: 5s, attr: FileAttr { ino: 8589934594, size: 0, blocks: 0, atime: Timestamp { sec: 1740289246, nsec: 968959772 }, mtime: Timestamp { sec: 1740289246, nsec: 968959772 }, ctime: Timestamp { sec: 1740289246, nsec: 968959772 }, kind: RegularFile, perm: 420, nlink: 1, uid: 1000, gid: 1000, rdev: 0, blksize: 4096 }, generation: 0 } +ID:82245a2b-907f-446a-b155-189f460e8dc8|[lookup] - Call: parent=8, name=.buckconfig.d + overlay inode root +LOOKUP: parent: 8, name: .buckconfig.d + +ID:82245a2b-907f-446a-b155-189f460e8dc8 [lookup] - Error: Errno(2) +ID:43103d8b-6fac-4ace-85a2-8db925d109cf|[open] - Call: inode=8589934592, flags=32768 + overlay child inode root +open handle:4 +ID:43103d8b-6fac-4ace-85a2-8db925d109cf [scorpio::fuse::MegaFuse] open - Obtained fh: 4 +ID:43103d8b-6fac-4ace-85a2-8db925d109cf [open] - Success: ReplyOpen { fh: 4, flags: 163840 } +ID:c815ccb1-e379-4b03-89ce-9978d75bb132|[read] - Call: inode=8589934592, fh=4, offset=0, size=4096 + overlay child inode root +ID:c815ccb1-e379-4b03-89ce-9978d75bb132 [scorpio::fuse::MegaFuse] read - Read 603 bytes +ID:c815ccb1-e379-4b03-89ce-9978d75bb132 [read] - Success: ReplyData { data: b"[cells]\n root = .\n prelude = prelude\n toolchains = toolchains\n none = none\n\n[cell_aliases]\n config = prelude\n ovr_config = prelude\n fbcode = none\n fbsource = none\n fbcode_macros = none\n buck = none\n\n# Uses a copy of the prelude bundled with the buck2 binary. You can alternatively delete this\n# section and vendor a copy of the prelude to the `prelude` directory of your project.\n[external_cells]\n prelude = bundled\n\n[parser]\n target_platform_detector_spec = target:root//...->prelude//platforms:default\n\n[build]\n execution_platforms = prelude//platforms:default\n\n[project]\n ignore = .git\n" } +ID:0aa0516d-2978-4907-9951-b454f0ece6cf|[flush] - Call: inode=8589934592, fh=4, lock_owner=3710658822195295651 + overlay child inode root +ID:0aa0516d-2978-4907-9951-b454f0ece6cf [flush] - Success: () +ID:173ca1fc-6930-4546-9e77-7dbca0fc80c7|[lookup] - Call: parent=8, name=.buckconfig.local + overlay inode root +LOOKUP: parent: 8, name: .buckconfig.local + +ID:173ca1fc-6930-4546-9e77-7dbca0fc80c7 [lookup] - Error: Errno(2) +ID:ed130e7c-c1fb-459d-b194-0736e3022ceb|[release] - Call: inode=8589934592, fh=4, flags=32768, lock_owner=0, flush=false + overlay child inode root +ID:ed130e7c-c1fb-459d-b194-0736e3022ceb [release] - Success: () +ID:16a92d5d-f815-4625-8e6d-291ed8dc1a4a|[lookup] - Call: parent=8, name=.buckconfig.d + overlay inode root +LOOKUP: parent: 8, name: .buckconfig.d + +ID:16a92d5d-f815-4625-8e6d-291ed8dc1a4a [lookup] - Error: Errno(2) +ID:ae989859-2a8c-4e48-a4fd-2a65efa46e21|[open] - Call: inode=8589934592, flags=32768 + overlay child inode root +open handle:5 +ID:ae989859-2a8c-4e48-a4fd-2a65efa46e21 [scorpio::fuse::MegaFuse] open - Obtained fh: 5 +ID:ae989859-2a8c-4e48-a4fd-2a65efa46e21 [open] - Success: ReplyOpen { fh: 5, flags: 163840 } +ID:efdfe7d7-6585-4ac1-b58a-9bf689d1e4e5|[read] - Call: inode=8589934592, fh=5, offset=0, size=4096 + overlay child inode root +ID:efdfe7d7-6585-4ac1-b58a-9bf689d1e4e5 [scorpio::fuse::MegaFuse] read - Read 603 bytes +ID:efdfe7d7-6585-4ac1-b58a-9bf689d1e4e5 [read] - Success: ReplyData { data: b"[cells]\n root = .\n prelude = prelude\n toolchains = toolchains\n none = none\n\n[cell_aliases]\n config = prelude\n ovr_config = prelude\n fbcode = none\n fbsource = none\n fbcode_macros = none\n buck = none\n\n# Uses a copy of the prelude bundled with the buck2 binary. You can alternatively delete this\n# section and vendor a copy of the prelude to the `prelude` directory of your project.\n[external_cells]\n prelude = bundled\n\n[parser]\n target_platform_detector_spec = target:root//...->prelude//platforms:default\n\n[build]\n execution_platforms = prelude//platforms:default\n\n[project]\n ignore = .git\n" } +ID:528edfd9-9be0-4107-b9cb-849915aae9eb|[flush] - Call: inode=8589934592, fh=5, lock_owner=3710658822195295651 + overlay child inode root +ID:528edfd9-9be0-4107-b9cb-849915aae9eb [flush] - Success: () +ID:cc91470a-458a-4c8b-8ec7-babd9b310cab|[lookup] - Call: parent=8, name=.buckconfig.local + overlay inode root +LOOKUP: parent: 8, name: .buckconfig.local + +ID:cc91470a-458a-4c8b-8ec7-babd9b310cab [lookup] - Error: Errno(2) +ID:79efa1df-2940-40f5-9f0c-e8b49cf40288|[release] - Call: inode=8589934592, fh=5, flags=32768, lock_owner=0, flush=false + overlay child inode root +ID:79efa1df-2940-40f5-9f0c-e8b49cf40288 [release] - Success: () +ID:49edb771-b83d-42c2-8b1c-00f31bedc2e9|[access] - Call: inode=8, mask=1 + overlay inode root +ID:49edb771-b83d-42c2-8b1c-00f31bedc2e9 [access] - Success: () +ID:eff098e9-e7b9-4015-81da-d7e5394f5c73|[getattr] - Call: inode=8589934592, fh=, flags=0 + overlay child inode root +ID:eff098e9-e7b9-4015-81da-d7e5394f5c73 [getattr] - Success: ReplyAttr { ttl: 5s, attr: FileAttr { ino: 13056, size: 603, blocks: 8, atime: Timestamp { sec: 1740289305, nsec: 778944217 }, mtime: Timestamp { sec: 1740289246, nsec: 938959781 }, ctime: Timestamp { sec: 1740289246, nsec: 938959781 }, kind: RegularFile, perm: 420, nlink: 1, uid: 1000, gid: 1000, rdev: 0, blksize: 4096 } } +ID:22d4dd05-1443-4093-ab3b-49ac79757d29|[access] - Call: inode=8, mask=1 + overlay inode root +ID:22d4dd05-1443-4093-ab3b-49ac79757d29 [access] - Success: () +ID:fc789f9e-4cc0-459d-a9fb-44529e20fc5e|[lookup] - Call: parent=8, name=buck-out + overlay inode root +LOOKUP: parent: 8, name: buck-out + +ID:fc789f9e-4cc0-459d-a9fb-44529e20fc5e [lookup] - Error: Errno(2) +ID:c714b706-a3c2-4222-b9c3-d3bd5fed136c|[lookup] - Call: parent=8, name=buck-out + overlay inode root +LOOKUP: parent: 8, name: buck-out + +ID:c714b706-a3c2-4222-b9c3-d3bd5fed136c [lookup] - Error: Errno(2) +ID:4ce096e7-737a-4995-beb9-90be79d620f3|[mkdir] - Call: parent=8, name=buck-out, mode=493, umask=18 + overlay inode root +readdir:.. +readdir:. +ID:4ce096e7-737a-4995-beb9-90be79d620f3 [mkdir] - Success: ReplyEntry { ttl: 5s, attr: FileAttr { ino: 12884901888, size: 4096, blocks: 8, atime: Timestamp { sec: 1740289305, nsec: 878944194 }, mtime: Timestamp { sec: 1740289305, nsec: 878944194 }, ctime: Timestamp { sec: 1740289305, nsec: 878944194 }, kind: Directory, perm: 493, nlink: 2, uid: 1000, gid: 1000, rdev: 0, blksize: 4096 }, generation: 0 } +ID:6142a525-d85f-4aeb-9438-bb4e64577530|[lookup] - Call: parent=12884901888, name=v2 + overlay child inode root +LOOKUP: parent: 12884901888, name: v2 + +ID:6142a525-d85f-4aeb-9438-bb4e64577530 [lookup] - Error: Errno(2) +ID:c24bbb5e-daad-4c9e-8624-b38f915e090b|[mkdir] - Call: parent=12884901888, name=v2, mode=493, umask=18 + overlay child inode root +readdir:.. +readdir:. +ID:c24bbb5e-daad-4c9e-8624-b38f915e090b [mkdir] - Success: ReplyEntry { ttl: 5s, attr: FileAttr { ino: 12884901891, size: 4096, blocks: 8, atime: Timestamp { sec: 1740289305, nsec: 878944194 }, mtime: Timestamp { sec: 1740289305, nsec: 878944194 }, ctime: Timestamp { sec: 1740289305, nsec: 878944194 }, kind: Directory, perm: 493, nlink: 2, uid: 1000, gid: 1000, rdev: 0, blksize: 4096 }, generation: 0 } +ID:61d9abae-d9e8-4be8-8840-809eb7c2bf49|[lookup] - Call: parent=12884901891, name=CACHEDIR.TAG + overlay child inode root +LOOKUP: parent: 12884901891, name: CACHEDIR.TAG + +ID:61d9abae-d9e8-4be8-8840-809eb7c2bf49 [lookup] - Error: Errno(2) +ID:56aceb43-bea6-4041-b9eb-991fc8071e3d|[create] - Call: parent=12884901891, name=CACHEDIR.TAG, mode=33188, flags=32962 + overlay child inode root +ID:56aceb43-bea6-4041-b9eb-991fc8071e3d [create] - Success: ReplyCreated { ttl: 5s, attr: FileAttr { ino: 12884901894, size: 0, blocks: 0, atime: Timestamp { sec: 1740289305, nsec: 878944194 }, mtime: Timestamp { sec: 1740289305, nsec: 878944194 }, ctime: Timestamp { sec: 1740289305, nsec: 878944194 }, kind: RegularFile, perm: 420, nlink: 1, uid: 1000, gid: 1000, rdev: 0, blksize: 4096 }, generation: 0, fh: 6, flags: 164034 } +ID:0670824b-342a-4905-943c-2a925f312ef9|[write] - Call: inode=12884901894, fh=6, offset=0, data_len=192, write_flags=0, flags=32770 + overlay child inode root +ID:0670824b-342a-4905-943c-2a925f312ef9 [scorpio::fuse::MegaFuse] write - Wrote 192 bytes +ID:0670824b-342a-4905-943c-2a925f312ef9 [write] - Success: ReplyWrite { written: 192 } +ID:e43f7c9d-b102-4324-bc55-0dfef40ae9dd|[flush] - Call: inode=12884901894, fh=6, lock_owner=7625110741495926769 + overlay child inode root +ID:e43f7c9d-b102-4324-bc55-0dfef40ae9dd [flush] - Success: () +ID:d6ef452e-da85-498e-b216-405cea0a0a3c|[release] - Call: inode=12884901894, fh=6, flags=32770, lock_owner=0, flush=false + overlay child inode root +ID:d6ef452e-da85-498e-b216-405cea0a0a3c [release] - Success: () +ID:b7f094b6-96a6-41f1-9dba-e8cc4c6e026d|[lookup] - Call: parent=12884901888, name=v2 + overlay child inode root +LOOKUP: parent: 12884901888, name: v2 + +ID:b7f094b6-96a6-41f1-9dba-e8cc4c6e026d [lookup] - Success: ReplyEntry { ttl: 5s, attr: FileAttr { ino: 12884901891, size: 4096, blocks: 8, atime: Timestamp { sec: 1740289305, nsec: 878944194 }, mtime: Timestamp { sec: 1740289305, nsec: 878944194 }, ctime: Timestamp { sec: 1740289305, nsec: 878944194 }, kind: Directory, perm: 493, nlink: 2, uid: 1000, gid: 1000, rdev: 0, blksize: 4096 }, generation: 0 } +ID:54e1de77-260a-4175-8c8c-cf3e4b8366d8|[opendir] - Call: inode=12884901891, flags=98304 + overlay child inode root +ID:54e1de77-260a-4175-8c8c-cf3e4b8366d8 [scorpio::fuse::MegaFuse] opendir - Obtained fh: 7 +ID:54e1de77-260a-4175-8c8c-cf3e4b8366d8 [opendir] - Success: ReplyOpen { fh: 7, flags: 98304 } +ID:b1e5b7cf-aebb-49af-ad96-fc97e87f5b5b|[access] - Call: inode=12884901891, mask=1 + overlay child inode root +ID:b1e5b7cf-aebb-49af-ad96-fc97e87f5b5b [access] - Success: () +ID:ddd73671-6ff9-446f-af00-e467d1ada1b0|[lookup] - Call: parent=8, name=.buckconfig.d + overlay inode root +LOOKUP: parent: 8, name: .buckconfig.d + +ID:ddd73671-6ff9-446f-af00-e467d1ada1b0 [lookup] - Error: Errno(2) +ID:8a0e2611-fe0a-45c4-8a4a-4c607f07e967|[open] - Call: inode=8589934592, flags=32768 + overlay child inode root +open handle:6 +ID:8a0e2611-fe0a-45c4-8a4a-4c607f07e967 [scorpio::fuse::MegaFuse] open - Obtained fh: 8 +ID:8a0e2611-fe0a-45c4-8a4a-4c607f07e967 [open] - Success: ReplyOpen { fh: 8, flags: 163840 } +ID:e61d9559-eaea-44e3-86ba-e1c7d41d26e5|[read] - Call: inode=8589934592, fh=8, offset=0, size=4096 + overlay child inode root +ID:e61d9559-eaea-44e3-86ba-e1c7d41d26e5 [scorpio::fuse::MegaFuse] read - Read 603 bytes +ID:e61d9559-eaea-44e3-86ba-e1c7d41d26e5 [read] - Success: ReplyData { data: b"[cells]\n root = .\n prelude = prelude\n toolchains = toolchains\n none = none\n\n[cell_aliases]\n config = prelude\n ovr_config = prelude\n fbcode = none\n fbsource = none\n fbcode_macros = none\n buck = none\n\n# Uses a copy of the prelude bundled with the buck2 binary. You can alternatively delete this\n# section and vendor a copy of the prelude to the `prelude` directory of your project.\n[external_cells]\n prelude = bundled\n\n[parser]\n target_platform_detector_spec = target:root//...->prelude//platforms:default\n\n[build]\n execution_platforms = prelude//platforms:default\n\n[project]\n ignore = .git\n" } +ID:6bfcc8d8-1288-4068-ae4a-fc88ab418656|[flush] - Call: inode=8589934592, fh=8, lock_owner=7625110741495926769 + overlay child inode root +ID:6bfcc8d8-1288-4068-ae4a-fc88ab418656 [flush] - Success: () +ID:f21952a8-5c9e-494d-be1f-180b9c809ca0|[lookup] - Call: parent=8, name=.buckconfig.local + overlay inode root +LOOKUP: parent: 8, name: .buckconfig.local + +ID:ce6b02f4-42a1-4bed-87ff-4b87ab2ff982|[release] - Call: inode=8589934592, fh=8, flags=32768, lock_owner=0, flush=false +ID:f21952a8-5c9e-494d-be1f-180b9c809ca0 [lookup] - Error: Errno(2) + overlay child inode root +ID:ce6b02f4-42a1-4bed-87ff-4b87ab2ff982 [release] - Success: () +ID:27e46175-64b2-4bbc-8e10-ca4162aaceda|[lookup] - Call: parent=8, name=.buckconfig.d + overlay inode root +LOOKUP: parent: 8, name: .buckconfig.d + +ID:27e46175-64b2-4bbc-8e10-ca4162aaceda [lookup] - Error: Errno(2) +ID:43d48ff0-9eed-40ff-a2a2-729ad8eaa30d|[open] - Call: inode=8589934592, flags=32768 + overlay child inode root +open handle:7 +ID:43d48ff0-9eed-40ff-a2a2-729ad8eaa30d [scorpio::fuse::MegaFuse] open - Obtained fh: 9 +ID:43d48ff0-9eed-40ff-a2a2-729ad8eaa30d [open] - Success: ReplyOpen { fh: 9, flags: 163840 } +ID:5c805f51-2b36-4f89-8a76-2de931fff098|[read] - Call: inode=8589934592, fh=9, offset=0, size=4096 + overlay child inode root +ID:5c805f51-2b36-4f89-8a76-2de931fff098 [scorpio::fuse::MegaFuse] read - Read 603 bytes +ID:5c805f51-2b36-4f89-8a76-2de931fff098 [read] - Success: ReplyData { data: b"[cells]\n root = .\n prelude = prelude\n toolchains = toolchains\n none = none\n\n[cell_aliases]\n config = prelude\n ovr_config = prelude\n fbcode = none\n fbsource = none\n fbcode_macros = none\n buck = none\n\n# Uses a copy of the prelude bundled with the buck2 binary. You can alternatively delete this\n# section and vendor a copy of the prelude to the `prelude` directory of your project.\n[external_cells]\n prelude = bundled\n\n[parser]\n target_platform_detector_spec = target:root//...->prelude//platforms:default\n\n[build]\n execution_platforms = prelude//platforms:default\n\n[project]\n ignore = .git\n" } +ID:37334b45-1987-4044-b93f-2b5b857193cd|[flush] - Call: inode=8589934592, fh=9, lock_owner=7625110741495926769 + overlay child inode root +ID:37334b45-1987-4044-b93f-2b5b857193cd [flush] - Success: () +ID:b7f2cd6b-0424-495a-acbb-4a548bebc8f7|[lookup] - Call: parent=8, name=.buckconfig.local + overlay inode root +LOOKUP: parent: 8, name: .buckconfig.local + +ID:b7f2cd6b-0424-495a-acbb-4a548bebc8f7 [lookup] - Error: Errno(2) +ID:7f31b5eb-0412-4874-97b1-e3e8e61b9126|[release] - Call: inode=8589934592, fh=9, flags=32768, lock_owner=0, flush=false + overlay child inode root +ID:7f31b5eb-0412-4874-97b1-e3e8e61b9126 [release] - Success: () +ID:1c1e4347-f60e-4fbd-9c0f-1a04c6509379|[lookup] - Call: parent=8, name=.buckconfig.d + overlay inode root +LOOKUP: parent: 8, name: .buckconfig.d + +ID:1c1e4347-f60e-4fbd-9c0f-1a04c6509379 [lookup] - Error: Errno(2) +ID:eedcbacf-3dc5-472f-aaa4-827ac0383c16|[open] - Call: inode=8589934592, flags=32768 + overlay child inode root +open handle:8 +ID:eedcbacf-3dc5-472f-aaa4-827ac0383c16 [scorpio::fuse::MegaFuse] open - Obtained fh: 10 +ID:eedcbacf-3dc5-472f-aaa4-827ac0383c16 [open] - Success: ReplyOpen { fh: 10, flags: 163840 } +ID:0f2734bf-09ad-4581-a55e-db2a631733bd|[read] - Call: inode=8589934592, fh=10, offset=0, size=4096 + overlay child inode root +ID:0f2734bf-09ad-4581-a55e-db2a631733bd [scorpio::fuse::MegaFuse] read - Read 603 bytes +ID:0f2734bf-09ad-4581-a55e-db2a631733bd [read] - Success: ReplyData { data: b"[cells]\n root = .\n prelude = prelude\n toolchains = toolchains\n none = none\n\n[cell_aliases]\n config = prelude\n ovr_config = prelude\n fbcode = none\n fbsource = none\n fbcode_macros = none\n buck = none\n\n# Uses a copy of the prelude bundled with the buck2 binary. You can alternatively delete this\n# section and vendor a copy of the prelude to the `prelude` directory of your project.\n[external_cells]\n prelude = bundled\n\n[parser]\n target_platform_detector_spec = target:root//...->prelude//platforms:default\n\n[build]\n execution_platforms = prelude//platforms:default\n\n[project]\n ignore = .git\n" } +ID:71936435-f66e-4799-b0c5-f6c182183567|[flush] - Call: inode=8589934592, fh=10, lock_owner=7625110741495926769 + overlay child inode root +ID:71936435-f66e-4799-b0c5-f6c182183567 [flush] - Success: () +ID:31b4ad34-3b25-4e05-8dec-2c255ae5b879|[lookup] - Call: parent=8, name=.buckconfig.local + overlay inode root +LOOKUP: parent: 8, name: .buckconfig.local + +ID:2e82e7df-2994-4de0-a9e7-bafc0a78d265|[release] - Call: inode=8589934592, fh=10, flags=32768, lock_owner=0, flush=false +ID:31b4ad34-3b25-4e05-8dec-2c255ae5b879 [lookup] - Error: Errno(2) + overlay child inode root +ID:2e82e7df-2994-4de0-a9e7-bafc0a78d265 [release] - Success: () +ID:9ffca937-366d-4f50-80be-46ecda48e4fa|[lookup] - Call: parent=8, name=toolchains + overlay inode root +LOOKUP: parent: 8, name: toolchains + +readdir:.. +readdir:. +readdir:BUCK +ID:9ffca937-366d-4f50-80be-46ecda48e4fa [lookup] - Success: ReplyEntry { ttl: 5s, attr: FileAttr { ino: 8589934600, size: 4096, blocks: 8, atime: Timestamp { sec: 1740289247, nsec: 128959730 }, mtime: Timestamp { sec: 1740289247, nsec: 208959710 }, ctime: Timestamp { sec: 1740289247, nsec: 208959710 }, kind: Directory, perm: 493, nlink: 2, uid: 1000, gid: 1000, rdev: 0, blksize: 4096 }, generation: 0 } +ID:a851869f-b224-4c7b-85da-9ed020a7fe28|[lookup] - Call: parent=8589934600, name=.buckconfig.d + overlay child inode root +LOOKUP: parent: 8589934600, name: .buckconfig.d + +ID:a851869f-b224-4c7b-85da-9ed020a7fe28 [lookup] - Error: Errno(2) +ID:ae08fdc5-bd56-411f-bf41-e4b0bae2df0e|[lookup] - Call: parent=8589934600, name=.buckconfig + overlay child inode root +LOOKUP: parent: 8589934600, name: .buckconfig + +ID:ae08fdc5-bd56-411f-bf41-e4b0bae2df0e [lookup] - Error: Errno(2) +ID:36d34fdc-9e70-4993-9f74-e86eb2019c56|[lookup] - Call: parent=8589934600, name=.buckconfig.local + overlay child inode root +LOOKUP: parent: 8589934600, name: .buckconfig.local + +ID:36d34fdc-9e70-4993-9f74-e86eb2019c56 [lookup] - Error: Errno(2) +ID:9bd6865d-0c42-4c96-9d45-9f2be5278d18|[lookup] - Call: parent=8, name=prelude + overlay inode root +LOOKUP: parent: 8, name: prelude + +ID:9bd6865d-0c42-4c96-9d45-9f2be5278d18 [lookup] - Error: Errno(2) +ID:b387bc37-dd07-494d-9004-a96bbea639ed|[lookup] - Call: parent=8, name=prelude + overlay inode root +LOOKUP: parent: 8, name: prelude + +ID:b387bc37-dd07-494d-9004-a96bbea639ed [lookup] - Error: Errno(2) +ID:5ef0679a-9cd9-4bab-877f-a1df3ef5e105|[lookup] - Call: parent=8, name=prelude + overlay inode root +LOOKUP: parent: 8, name: prelude + +ID:5ef0679a-9cd9-4bab-877f-a1df3ef5e105 [lookup] - Error: Errno(2) +ID:9b219fd7-24d3-4056-9a08-54dc39291646|[lookup] - Call: parent=8, name=none + overlay inode root +LOOKUP: parent: 8, name: none + +ID:9b219fd7-24d3-4056-9a08-54dc39291646 [lookup] - Error: Errno(2) +ID:94afd0d6-d5d1-49f7-b761-12cf4bc2ca8f|[lookup] - Call: parent=8, name=none + overlay inode root +LOOKUP: parent: 8, name: none + +ID:94afd0d6-d5d1-49f7-b761-12cf4bc2ca8f [lookup] - Error: Errno(2) +ID:e3724b16-1456-49b8-8a7f-aed6e23950f8|[lookup] - Call: parent=8, name=none + overlay inode root +LOOKUP: parent: 8, name: none + +ID:e3724b16-1456-49b8-8a7f-aed6e23950f8 [lookup] - Error: Errno(2) +ID:750b415e-ccc9-4332-8d2f-88fd3e40208d|[lookup] - Call: parent=12884901891, name=cache + overlay child inode root +LOOKUP: parent: 12884901891, name: cache + +ID:750b415e-ccc9-4332-8d2f-88fd3e40208d [lookup] - Error: Errno(2) +ID:b031bba2-64a1-4f6a-b0bb-d5d824269fe1|[lookup] - Call: parent=12884901891, name=cache + overlay child inode root +LOOKUP: parent: 12884901891, name: cache + +ID:b031bba2-64a1-4f6a-b0bb-d5d824269fe1 [lookup] - Error: Errno(2) +ID:51ed4e24-508c-49d0-a9a1-fad2e3430b8d|[lookup] - Call: parent=12884901891, name=.buckconfig + overlay child inode root +LOOKUP: parent: 12884901891, name: .buckconfig + +ID:51ed4e24-508c-49d0-a9a1-fad2e3430b8d [lookup] - Error: Errno(2) +ID:c99eb99f-9a63-47ba-b377-70f8f77b89ad|[lookup] - Call: parent=12884901891, name=.buckroot + overlay child inode root +LOOKUP: parent: 12884901891, name: .buckroot + +ID:c99eb99f-9a63-47ba-b377-70f8f77b89ad [lookup] - Error: Errno(2) +ID:043c3ee3-d127-4e3e-9cc6-e250c5a7e7ad|[lookup] - Call: parent=12884901888, name=.buckconfig + overlay child inode root +LOOKUP: parent: 12884901888, name: .buckconfig + +ID:043c3ee3-d127-4e3e-9cc6-e250c5a7e7ad [lookup] - Error: Errno(2) +ID:d1af895e-2606-487d-a255-63ac24c0a2c3|[lookup] - Call: parent=12884901888, name=.buckroot + overlay child inode root +LOOKUP: parent: 12884901888, name: .buckroot + +ID:d1af895e-2606-487d-a255-63ac24c0a2c3 [lookup] - Error: Errno(2) +ID:9973c595-977e-4c6b-bb19-bd67e1d121c9|[getattr] - Call: inode=8589934592, fh=, flags=0 + overlay child inode root +ID:9973c595-977e-4c6b-bb19-bd67e1d121c9 [getattr] - Success: ReplyAttr { ttl: 5s, attr: FileAttr { ino: 13056, size: 603, blocks: 8, atime: Timestamp { sec: 1740289305, nsec: 778944217 }, mtime: Timestamp { sec: 1740289246, nsec: 938959781 }, ctime: Timestamp { sec: 1740289246, nsec: 938959781 }, kind: RegularFile, perm: 420, nlink: 1, uid: 1000, gid: 1000, rdev: 0, blksize: 4096 } } +ID:b4c23480-0429-4351-ae32-fae359f3b6cc|[getattr] - Call: inode=8, fh=, flags=0 + overlay inode root +ID:b4c23480-0429-4351-ae32-fae359f3b6cc [getattr] - Success: ReplyAttr { ttl: 5s, attr: FileAttr { ino: 17918, size: 4096, blocks: 8, atime: Timestamp { sec: 1740289277, nsec: 768950578 }, mtime: Timestamp { sec: 1740289305, nsec: 878944194 }, ctime: Timestamp { sec: 1740289305, nsec: 878944194 }, kind: Directory, perm: 511, nlink: 3, uid: 1000, gid: 1000, rdev: 0, blksize: 4096 } } +ID:044c7647-defa-4369-878d-1d42890f2b5a|[lookup] - Call: parent=12884901891, name=forkserver + overlay child inode root +LOOKUP: parent: 12884901891, name: forkserver + +ID:8fbb67b0-32e5-4be6-bb5b-d7a1059bed56|[opendir] - Call: inode=8, flags=100352 +ID:044c7647-defa-4369-878d-1d42890f2b5a [lookup] - Error: Errno(2) + overlay inode root +ID:8fbb67b0-32e5-4be6-bb5b-d7a1059bed56 [scorpio::fuse::MegaFuse] opendir - Obtained fh: 11 +ID:8fbb67b0-32e5-4be6-bb5b-d7a1059bed56 [opendir] - Success: ReplyOpen { fh: 11, flags: 100352 } +ID:b5e0c8b3-fe1f-45da-9b30-bad0d29ca7a5|[mkdir] - Call: parent=12884901891, name=forkserver, mode=493, umask=18 + overlay child inode root +ID:48283082-0308-497f-8f5e-2622f187a314|[readdirplus] - Call: parent=8, fh=11, offset=0, lock_owner=0 +readdir:.. +readdir:. +ID:b5e0c8b3-fe1f-45da-9b30-bad0d29ca7a5 [mkdir] - Success: ReplyEntry { ttl: 5s, attr: FileAttr { ino: 12884901898, size: 4096, blocks: 8, atime: Timestamp { sec: 1740289305, nsec: 928944182 }, mtime: Timestamp { sec: 1740289305, nsec: 928944182 }, ctime: Timestamp { sec: 1740289305, nsec: 928944182 }, kind: Directory, perm: 493, nlink: 2, uid: 1000, gid: 1000, rdev: 0, blksize: 4096 }, generation: 0 } + overlay inode root +--entry name:. +--entry name:.. +--entry name:BUCK +--entry name:.buckroot +--entry name:.. +--entry name:main.cpp +--entry name:ping_task.sh +--entry name:buck-out +--entry name:toolchains +--entry name:.gitignore +--entry name:. +--entry name:.buckconfig +ID:48283082-0308-497f-8f5e-2622f187a314 [readdirplus] - Success: "" +ID:ee4b5c7a-2793-42a6-88f6-943d9bd7c2ba|[opendir] - Call: inode=12884901888, flags=100352 + overlay child inode root +ID:ee4b5c7a-2793-42a6-88f6-943d9bd7c2ba [scorpio::fuse::MegaFuse] opendir - Obtained fh: 12 +ID:ee4b5c7a-2793-42a6-88f6-943d9bd7c2ba [opendir] - Success: ReplyOpen { fh: 12, flags: 100352 } +ID:26864189-088e-4e64-95e0-901a6ad0eef3|[readdirplus] - Call: parent=12884901888, fh=12, offset=0, lock_owner=0 + overlay child inode root +--entry name:. +--entry name:.. +--entry name:.. +--entry name:. +--entry name:v2 +ID:26864189-088e-4e64-95e0-901a6ad0eef3 [readdirplus] - Success: "" +ID:dde3f0f6-2b5c-4121-9215-963eebf532f4|[opendir] - Call: inode=12884901891, flags=100352 + overlay child inode root +ID:dde3f0f6-2b5c-4121-9215-963eebf532f4 [scorpio::fuse::MegaFuse] opendir - Obtained fh: 13 +ID:dde3f0f6-2b5c-4121-9215-963eebf532f4 [opendir] - Success: ReplyOpen { fh: 13, flags: 100352 } +ID:a7feaf5f-b3e1-4a03-be9a-5d6c394c1a30|[readdirplus] - Call: parent=12884901891, fh=13, offset=0, lock_owner=0 + overlay child inode root +--entry name:. +--entry name:.. +--entry name:.. +--entry name:forkserver +--entry name:CACHEDIR.TAG +--entry name:. +ID:a7feaf5f-b3e1-4a03-be9a-5d6c394c1a30 [readdirplus] - Success: "" +ID:8c8a81c2-308e-462f-bb7e-57396f6073db|[opendir] - Call: inode=12884901898, flags=100352 + overlay child inode root +ID:8c8a81c2-308e-462f-bb7e-57396f6073db [scorpio::fuse::MegaFuse] opendir - Obtained fh: 14 +ID:8c8a81c2-308e-462f-bb7e-57396f6073db [opendir] - Success: ReplyOpen { fh: 14, flags: 100352 } +ID:0714b566-590e-4b42-8207-764d155290ae|[readdirplus] - Call: parent=12884901898, fh=14, offset=0, lock_owner=0 + overlay child inode root +--entry name:. +--entry name:.. +--entry name:.. +--entry name:. +ID:0714b566-590e-4b42-8207-764d155290ae [readdirplus] - Success: "" +ID:1d8694ad-d48a-4fa2-a9c3-379e5cb72488|[readdirplus] - Call: parent=12884901898, fh=14, offset=4, lock_owner=0 + overlay child inode root +ID:1d8694ad-d48a-4fa2-a9c3-379e5cb72488 [readdirplus] - Success: "" +ID:ac8da7ce-629e-4167-b351-90983f850927|[readdirplus] - Call: parent=12884901891, fh=13, offset=6, lock_owner=0 + overlay child inode root +ID:503eba76-bd68-451d-8bc7-2436846dcb5d|[releasedir] - Call: inode=12884901898, fh=14, flags=100352 +ID:ac8da7ce-629e-4167-b351-90983f850927 [readdirplus] - Success: "" + overlay child inode root +ID:503eba76-bd68-451d-8bc7-2436846dcb5d [releasedir] - Success: () +ID:37cc87b7-e0b1-42ce-a798-3d45a5fc4d47|[releasedir] - Call: inode=12884901891, fh=13, flags=100352 +ID:696d0fb9-dd93-4edc-8da8-2b273148520d|[readdirplus] - Call: parent=12884901888, fh=12, offset=5, lock_owner=0 + overlay child inode root +ID:37cc87b7-e0b1-42ce-a798-3d45a5fc4d47 [releasedir] - Success: () + overlay child inode root +ID:696d0fb9-dd93-4edc-8da8-2b273148520d [readdirplus] - Success: "" +ID:d699c8d4-e03d-4fe1-8521-e1f86e0f3b75|[opendir] - Call: inode=8589934600, flags=100352 +ID:567daa00-70f1-4a38-afb4-d1eb299dc53d|[releasedir] - Call: inode=12884901888, fh=12, flags=100352 + overlay child inode root +ID:d699c8d4-e03d-4fe1-8521-e1f86e0f3b75 [scorpio::fuse::MegaFuse] opendir - Obtained fh: 15 +ID:d699c8d4-e03d-4fe1-8521-e1f86e0f3b75 [opendir] - Success: ReplyOpen { fh: 15, flags: 100352 } + overlay child inode root +ID:567daa00-70f1-4a38-afb4-d1eb299dc53d [releasedir] - Success: () +ID:cf06c133-8682-4c43-b03f-b08871b7e9e7|[readdirplus] - Call: parent=8589934600, fh=15, offset=0, lock_owner=0 + overlay child inode root +--entry name:. +--entry name:.. +--entry name:.. +--entry name:. +--entry name:BUCK +ID:cf06c133-8682-4c43-b03f-b08871b7e9e7 [readdirplus] - Success: "" +ID:a8ed51bd-f53f-4d52-a13a-d48e16afa15e|[readdirplus] - Call: parent=8589934600, fh=15, offset=5, lock_owner=0 + overlay child inode root +ID:a8ed51bd-f53f-4d52-a13a-d48e16afa15e [readdirplus] - Success: "" +ID:3167dba6-18a0-4a8e-9111-911a2daf8f2d|[readdirplus] - Call: parent=8, fh=11, offset=12, lock_owner=0 + overlay inode root +ID:23c7ead4-0d7e-4ed5-b499-2cbe9d694f80|[releasedir] - Call: inode=8589934600, fh=15, flags=100352 +ID:3167dba6-18a0-4a8e-9111-911a2daf8f2d [readdirplus] - Success: "" + overlay child inode root +ID:23c7ead4-0d7e-4ed5-b499-2cbe9d694f80 [releasedir] - Success: () +ID:240c105b-3413-45f7-a388-8ec4bdf3a9e0|[releasedir] - Call: inode=8, fh=11, flags=100352 + overlay inode root +ID:240c105b-3413-45f7-a388-8ec4bdf3a9e0 [releasedir] - Success: () +ID:499ad0e5-d90f-44f9-91ee-7c26b9207089|[getattr] - Call: inode=12884901891, fh=, flags=0 + overlay child inode root +ID:499ad0e5-d90f-44f9-91ee-7c26b9207089 [getattr] - Success: ReplyAttr { ttl: 5s, attr: FileAttr { ino: 27122, size: 4096, blocks: 8, atime: Timestamp { sec: 1740289305, nsec: 878944194 }, mtime: Timestamp { sec: 1740289305, nsec: 928944182 }, ctime: Timestamp { sec: 1740289305, nsec: 928944182 }, kind: Directory, perm: 493, nlink: 3, uid: 1000, gid: 1000, rdev: 0, blksize: 4096 } } +ID:20ad3e47-72f3-480e-9977-feea1b4a96d3|[statfs] - Call: inode=12884901891 + overlay child inode root +ID:20ad3e47-72f3-480e-9977-feea1b4a96d3 [statfs] - Success: ReplyStatFs { blocks: 263940717, bfree: 230156488, bavail: 216730620, files: 67108864, ffree: 65965033, bsize: 4096, namelen: 255, frsize: 4096 } +ID:bce3a76a-73df-463b-8ed4-951d30cbab41|[statfs] - Call: inode=12884901891 + overlay child inode root +ID:bce3a76a-73df-463b-8ed4-951d30cbab41 [statfs] - Success: ReplyStatFs { blocks: 263940717, bfree: 230156488, bavail: 216730620, files: 67108864, ffree: 65965033, bsize: 4096, namelen: 255, frsize: 4096 } +ID:4018b38b-a401-4ff8-b636-51a99cf240a2|[lookup] - Call: parent=12884901891, name=hgQ1Yjgh5HsNllCO + overlay child inode root +LOOKUP: parent: 12884901891, name: hgQ1Yjgh5HsNllCO + +ID:4018b38b-a401-4ff8-b636-51a99cf240a2 [lookup] - Error: Errno(2) +ID:07bb40aa-6581-4b48-8157-b3d188cedbc1|[lookup] - Call: parent=12884901891, name=log + overlay child inode root +LOOKUP: parent: 12884901891, name: log + +ID:07bb40aa-6581-4b48-8157-b3d188cedbc1 [lookup] - Error: Errno(2) +ID:c18f493b-f4c2-4d07-933e-9ad86e71e4d1|[lookup] - Call: parent=8, name=.buckconfig.d + overlay inode root +LOOKUP: parent: 8, name: .buckconfig.d + +ID:bae45f45-0453-4800-a9e8-7ac935894154|[statfs] - Call: inode=12884901891 +ID:c18f493b-f4c2-4d07-933e-9ad86e71e4d1 [lookup] - Error: Errno(2) + overlay child inode root +ID:8c6a9491-5263-4266-945d-6bfc495e6a20|[mkdir] - Call: parent=12884901891, name=log, mode=493, umask=18 + overlay child inode root +ID:ad43463b-bfee-458f-8319-1a9de9be0c0c|[open] - Call: inode=8589934592, flags=32768 +ID:bae45f45-0453-4800-a9e8-7ac935894154 [statfs] - Success: ReplyStatFs { blocks: 263940717, bfree: 230156488, bavail: 216730620, files: 67108864, ffree: 65965033, bsize: 4096, namelen: 255, frsize: 4096 } +readdir:.. +readdir:. +ID:8c6a9491-5263-4266-945d-6bfc495e6a20 [mkdir] - Success: ReplyEntry { ttl: 5s, attr: FileAttr { ino: 12884901901, size: 4096, blocks: 8, atime: Timestamp { sec: 1740289305, nsec: 998944165 }, mtime: Timestamp { sec: 1740289305, nsec: 998944165 }, ctime: Timestamp { sec: 1740289305, nsec: 998944165 }, kind: Directory, perm: 493, nlink: 2, uid: 1000, gid: 1000, rdev: 0, blksize: 4096 }, generation: 0 } + overlay child inode root +open handle:10 +ID:ad43463b-bfee-458f-8319-1a9de9be0c0c [scorpio::fuse::MegaFuse] open - Obtained fh: 16 +ID:ad43463b-bfee-458f-8319-1a9de9be0c0c [open] - Success: ReplyOpen { fh: 16, flags: 163840 } +ID:d3473803-d123-48e5-8f1e-7ed0c328bc31|[read] - Call: inode=8589934592, fh=16, offset=0, size=4096 + overlay child inode root +ID:d3473803-d123-48e5-8f1e-7ed0c328bc31 [scorpio::fuse::MegaFuse] read - Read 603 bytes +ID:d3473803-d123-48e5-8f1e-7ed0c328bc31 [read] - Success: ReplyData { data: b"[cells]\n root = .\n prelude = prelude\n toolchains = toolchains\n none = none\n\n[cell_aliases]\n config = prelude\n ovr_config = prelude\n fbcode = none\n fbsource = none\n fbcode_macros = none\n buck = none\n\n# Uses a copy of the prelude bundled with the buck2 binary. You can alternatively delete this\n# section and vendor a copy of the prelude to the `prelude` directory of your project.\n[external_cells]\n prelude = bundled\n\n[parser]\n target_platform_detector_spec = target:root//...->prelude//platforms:default\n\n[build]\n execution_platforms = prelude//platforms:default\n\n[project]\n ignore = .git\n" } +ID:898a2ecd-0a40-43f4-a3be-4810737824c4|[flush] - Call: inode=8589934592, fh=16, lock_owner=7625110741495926769 + overlay child inode root +ID:d4a7d0f4-5802-46f4-bb3c-ed8355e1711b|[opendir] - Call: inode=12884901901, flags=100352 +ID:898a2ecd-0a40-43f4-a3be-4810737824c4 [flush] - Success: () + overlay child inode root +ID:d4a7d0f4-5802-46f4-bb3c-ed8355e1711b [scorpio::fuse::MegaFuse] opendir - Obtained fh: 17 +ID:d4a7d0f4-5802-46f4-bb3c-ed8355e1711b [opendir] - Success: ReplyOpen { fh: 17, flags: 100352 } +ID:7b62eb9e-b80e-4040-a38b-733036a6381a|[opendir] - Call: inode=12884901901, flags=100352 + overlay child inode root +ID:7b62eb9e-b80e-4040-a38b-733036a6381a [scorpio::fuse::MegaFuse] opendir - Obtained fh: 18 +ID:7b62eb9e-b80e-4040-a38b-733036a6381a [opendir] - Success: ReplyOpen { fh: 18, flags: 100352 } +ID:a83091fd-dbcc-4860-9837-9354c2f9f54d|[lookup] - Call: parent=8, name=.buckconfig.local + overlay inode root +LOOKUP: parent: 8, name: .buckconfig.local + +ID:a83091fd-dbcc-4860-9837-9354c2f9f54d [lookup] - Error: Errno(2) +ID:bca74b95-9358-46d2-8e41-b6e1bcce65ec|[release] - Call: inode=8589934592, fh=16, flags=32768, lock_owner=0, flush=false + overlay child inode root +ID:9549d961-4e96-4acc-92b9-307d8c2edad5|[readdirplus] - Call: parent=12884901901, fh=18, offset=0, lock_owner=0 +ID:bca74b95-9358-46d2-8e41-b6e1bcce65ec [release] - Success: () + overlay child inode root +--entry name:. +--entry name:.. +--entry name:. +ID:43aeb1fd-9716-48c9-ace4-2cec6fb165c0|[readdirplus] - Call: parent=12884901901, fh=17, offset=0, lock_owner=0 +--entry name:.. +ID:9549d961-4e96-4acc-92b9-307d8c2edad5 [readdirplus] - Success: "" + overlay child inode root +--entry name:. +--entry name:.. +--entry name:. +--entry name:.. +ID:43aeb1fd-9716-48c9-ace4-2cec6fb165c0 [readdirplus] - Success: "" +ID:51f5c7e4-ed8d-41fc-9e63-c6a8b2a39c4e|[readdirplus] - Call: parent=12884901901, fh=17, offset=4, lock_owner=0 +ID:c0fc1216-dac2-464d-bd33-538a8378e9ea|[readdirplus] - Call: parent=12884901901, fh=18, offset=4, lock_owner=0 + overlay child inode root +ID:51f5c7e4-ed8d-41fc-9e63-c6a8b2a39c4e [readdirplus] - Success: "" +ID:4b32b023-4f22-4880-a11f-b9549d5ab0de|[statfs] - Call: inode=12884901891 + overlay child inode root +ID:c0fc1216-dac2-464d-bd33-538a8378e9ea [readdirplus] - Success: "" + overlay child inode root +ID:4b32b023-4f22-4880-a11f-b9549d5ab0de [statfs] - Success: ReplyStatFs { blocks: 263940717, bfree: 230156485, bavail: 216730617, files: 67108864, ffree: 65965032, bsize: 4096, namelen: 255, frsize: 4096 } +ID:86969a1f-e7b8-4dfd-832d-d30b7af2625d|[releasedir] - Call: inode=12884901901, fh=17, flags=100352 +ID:b0c48ac8-92ad-4349-b76e-f15d416abcbf|[releasedir] - Call: inode=12884901901, fh=18, flags=100352 + overlay child inode root +ID:86969a1f-e7b8-4dfd-832d-d30b7af2625d [releasedir] - Success: () + overlay child inode root +ID:b0c48ac8-92ad-4349-b76e-f15d416abcbf [releasedir] - Success: () +ID:ae26afdc-0308-4ae5-835f-0f6632bec11b|[getattr] - Call: inode=8589934592, fh=, flags=0 + overlay child inode root +ID:ae26afdc-0308-4ae5-835f-0f6632bec11b [getattr] - Success: ReplyAttr { ttl: 5s, attr: FileAttr { ino: 13056, size: 603, blocks: 8, atime: Timestamp { sec: 1740289305, nsec: 778944217 }, mtime: Timestamp { sec: 1740289246, nsec: 938959781 }, ctime: Timestamp { sec: 1740289246, nsec: 938959781 }, kind: RegularFile, perm: 420, nlink: 1, uid: 1000, gid: 1000, rdev: 0, blksize: 4096 } } +ID:95141cf7-a98a-4d53-8722-d36127b33e9c|[lookup] - Call: parent=8, name=.buckconfig.d + overlay inode root +LOOKUP: parent: 8, name: .buckconfig.d + +ID:95141cf7-a98a-4d53-8722-d36127b33e9c [lookup] - Error: Errno(2) +ID:36adfc4c-a5ce-4219-b1d9-fe4cc7d2bc1d|[open] - Call: inode=8589934592, flags=32768 + overlay child inode root +open handle:11 +ID:36adfc4c-a5ce-4219-b1d9-fe4cc7d2bc1d [scorpio::fuse::MegaFuse] open - Obtained fh: 19 +ID:36adfc4c-a5ce-4219-b1d9-fe4cc7d2bc1d [open] - Success: ReplyOpen { fh: 19, flags: 163840 } +ID:d1ae6739-b4d0-4ac6-b38c-ae1d0ca6a29e|[read] - Call: inode=8589934592, fh=19, offset=0, size=4096 + overlay child inode root +ID:d1ae6739-b4d0-4ac6-b38c-ae1d0ca6a29e [scorpio::fuse::MegaFuse] read - Read 603 bytes +ID:d1ae6739-b4d0-4ac6-b38c-ae1d0ca6a29e [read] - Success: ReplyData { data: b"[cells]\n root = .\n prelude = prelude\n toolchains = toolchains\n none = none\n\n[cell_aliases]\n config = prelude\n ovr_config = prelude\n fbcode = none\n fbsource = none\n fbcode_macros = none\n buck = none\n\n# Uses a copy of the prelude bundled with the buck2 binary. You can alternatively delete this\n# section and vendor a copy of the prelude to the `prelude` directory of your project.\n[external_cells]\n prelude = bundled\n\n[parser]\n target_platform_detector_spec = target:root//...->prelude//platforms:default\n\n[build]\n execution_platforms = prelude//platforms:default\n\n[project]\n ignore = .git\n" } +ID:d7144206-c7c2-44c1-b401-aaf9bb4e5efc|[flush] - Call: inode=8589934592, fh=19, lock_owner=7625110741495926769 + overlay child inode root +ID:d7144206-c7c2-44c1-b401-aaf9bb4e5efc [flush] - Success: () +ID:4c7c451e-206f-4d6d-bcfe-60f6c8bdc553|[release] - Call: inode=8589934592, fh=19, flags=32768, lock_owner=0, flush=false + overlay child inode root +ID:4c7c451e-206f-4d6d-bcfe-60f6c8bdc553 [release] - Success: () +ID:3f652693-1e95-46fb-8e6d-00b313535cf1|[lookup] - Call: parent=12884901901, name=20250223-054146_build_925d8b33-a145-4ae8-9e02-218bb2e1da02_events.pb.zst + overlay child inode root +LOOKUP: parent: 12884901901, name: 20250223-054146_build_925d8b33-a145-4ae8-9e02-218bb2e1da02_events.pb.zst + +ID:3f652693-1e95-46fb-8e6d-00b313535cf1 [lookup] - Error: Errno(2) +ID:f93aa5d4-a01d-4134-8dbd-4d57be0e0ee6|[create] - Call: parent=12884901901, name=20250223-054146_build_925d8b33-a145-4ae8-9e02-218bb2e1da02_events.pb.zst, mode=33188, flags=33858 + overlay child inode root +ID:8590adbd-8541-406a-a48b-b2e393f048a6|[lookup] - Call: parent=8, name=.buckconfig.local +ID:f93aa5d4-a01d-4134-8dbd-4d57be0e0ee6 [create] - Success: ReplyCreated { ttl: 5s, attr: FileAttr { ino: 12884901904, size: 0, blocks: 0, atime: Timestamp { sec: 1740289306, nsec: 18944160 }, mtime: Timestamp { sec: 1740289306, nsec: 18944160 }, ctime: Timestamp { sec: 1740289306, nsec: 18944160 }, kind: RegularFile, perm: 420, nlink: 1, uid: 1000, gid: 1000, rdev: 0, blksize: 4096 }, generation: 0, fh: 20, flags: 164930 } + overlay inode root +LOOKUP: parent: 8, name: .buckconfig.local + +ID:8590adbd-8541-406a-a48b-b2e393f048a6 [lookup] - Error: Errno(2) +ID:3381791d-ab14-4f7a-929e-6321015420db|[opendir] - Call: inode=8, flags=100352 + overlay inode root +ID:3381791d-ab14-4f7a-929e-6321015420db [scorpio::fuse::MegaFuse] opendir - Obtained fh: 21 +ID:3381791d-ab14-4f7a-929e-6321015420db [opendir] - Success: ReplyOpen { fh: 21, flags: 100352 } +ID:d4e34117-5cf3-48ca-8729-06dc5402233d|[getattr] - Call: inode=8, fh=, flags=0 + overlay inode root +ID:d4e34117-5cf3-48ca-8729-06dc5402233d [getattr] - Success: ReplyAttr { ttl: 5s, attr: FileAttr { ino: 17918, size: 4096, blocks: 8, atime: Timestamp { sec: 1740289277, nsec: 768950578 }, mtime: Timestamp { sec: 1740289305, nsec: 878944194 }, ctime: Timestamp { sec: 1740289305, nsec: 878944194 }, kind: Directory, perm: 511, nlink: 3, uid: 1000, gid: 1000, rdev: 0, blksize: 4096 } } +ID:0f76c8fb-09d4-4062-82b8-7a3f542e24ff|[readdirplus] - Call: parent=8, fh=21, offset=0, lock_owner=0 + overlay inode root +--entry name:. +--entry name:.. +--entry name:BUCK +--entry name:.buckroot +--entry name:.. +--entry name:main.cpp +--entry name:ping_task.sh +--entry name:buck-out +--entry name:toolchains +--entry name:.gitignore +--entry name:. +--entry name:.buckconfig +ID:0f76c8fb-09d4-4062-82b8-7a3f542e24ff [readdirplus] - Success: "" +ID:e0b96fad-7f39-4633-ba2e-7f862a39d348|[readdirplus] - Call: parent=8, fh=21, offset=12, lock_owner=0 + overlay inode root +ID:e0b96fad-7f39-4633-ba2e-7f862a39d348 [readdirplus] - Success: "" +ID:7f2a2d71-1815-4dd0-b7c1-fde0ddc58a2e|[releasedir] - Call: inode=8, fh=21, flags=100352 + overlay inode root +ID:7f2a2d71-1815-4dd0-b7c1-fde0ddc58a2e [releasedir] - Success: () +ID:18014f96-219d-4ece-a3d9-924e723b882b|[open] - Call: inode=8589934597, flags=32768 + overlay child inode root +open handle:12 +ID:18014f96-219d-4ece-a3d9-924e723b882b [scorpio::fuse::MegaFuse] open - Obtained fh: 22 +ID:18014f96-219d-4ece-a3d9-924e723b882b [open] - Success: ReplyOpen { fh: 22, flags: 163840 } +ID:a8190d46-d551-4256-bdb4-c83798b395a7|[read] - Call: inode=8589934597, fh=22, offset=0, size=4096 + overlay child inode root +ID:a8190d46-d551-4256-bdb4-c83798b395a7 [scorpio::fuse::MegaFuse] read - Read 157 bytes +ID:a8190d46-d551-4256-bdb4-c83798b395a7 [read] - Success: ReplyData { data: b"# BUCK\ncxx_binary(\n name = \"main\",\n srcs = [\"main.cpp\"],\n link_style = \"static\",\n)\n\nsh_binary(\n name = \"ping_task\",\n main = \"ping_task.sh\",\n)\n" } +ID:16dc64e1-6664-48e7-b7ba-e30799230f96|[flush] - Call: inode=8589934597, fh=22, lock_owner=7625110741495926769 + overlay child inode root +ID:16dc64e1-6664-48e7-b7ba-e30799230f96 [flush] - Success: () +ID:c861dd77-d046-4d6a-95dc-182737a0377a|[release] - Call: inode=8589934597, fh=22, flags=32768, lock_owner=0, flush=false + overlay child inode root +ID:6ad4f5e7-d2d1-481c-a143-8fe1f38f62bc|[lookup] - Call: parent=12884901891, name=\Users\HXY\AppData\Roaming\Code\User\globalStorage\github.copilot-chat\debugCommand +ID:c861dd77-d046-4d6a-95dc-182737a0377a [release] - Success: () + overlay child inode root +LOOKUP: parent: 12884901891, name: \Users\HXY\AppData\Roaming\Code\User\globalStorage\github.copilot-chat\debugCommand + +ID:6ad4f5e7-d2d1-481c-a143-8fe1f38f62bc [lookup] - Error: Errno(2) +ID:3148d35f-9914-406b-a39f-605ae1702f64|[lookup] - Call: parent=12884901891, name=external_cells + overlay child inode root +LOOKUP: parent: 12884901891, name: external_cells + +ID:3148d35f-9914-406b-a39f-605ae1702f64 [lookup] - Error: Errno(2) +ID:cbcb66b4-2cc0-43e9-88d1-27bbe36cc88b|[lookup] - Call: parent=12884901891, name=external_cells + overlay child inode root +LOOKUP: parent: 12884901891, name: external_cells + +ID:cbcb66b4-2cc0-43e9-88d1-27bbe36cc88b [lookup] - Error: Errno(2) +ID:e5ff623c-5f28-45a8-b82b-ffd5f8702b24|[lookup] - Call: parent=12884901891, name=external_cells + overlay child inode root +LOOKUP: parent: 12884901891, name: external_cells + +ID:e5ff623c-5f28-45a8-b82b-ffd5f8702b24 [lookup] - Error: Errno(2) +ID:176db485-a78c-456a-baa4-e7183839ef71|[lookup] - Call: parent=12884901891, name=external_cells + overlay child inode root +LOOKUP: parent: 12884901891, name: external_cells + +ID:176db485-a78c-456a-baa4-e7183839ef71 [lookup] - Error: Errno(2) +ID:d203f207-2d5f-4466-88ca-862e101126d8|[lookup] - Call: parent=12884901891, name=external_cells + overlay child inode root +LOOKUP: parent: 12884901891, name: external_cells + +ID:d203f207-2d5f-4466-88ca-862e101126d8 [lookup] - Error: Errno(2) +ID:5a34c7b7-ea0e-4061-95be-2922e1200468|[mkdir] - Call: parent=12884901891, name=external_cells, mode=493, umask=18 + overlay child inode root +readdir:.. +readdir:. +ID:5a34c7b7-ea0e-4061-95be-2922e1200468 [mkdir] - Success: ReplyEntry { ttl: 5s, attr: FileAttr { ino: 12884901905, size: 4096, blocks: 8, atime: Timestamp { sec: 1740289306, nsec: 58944149 }, mtime: Timestamp { sec: 1740289306, nsec: 58944149 }, ctime: Timestamp { sec: 1740289306, nsec: 58944149 }, kind: Directory, perm: 493, nlink: 2, uid: 1000, gid: 1000, rdev: 0, blksize: 4096 }, generation: 0 } +ID:02de8b7d-c487-4efc-be46-70d5654aebbe|[opendir] - Call: inode=12884901905, flags=100352 +ID:1cd6a326-f74b-4916-9977-44c73792754d|[lookup] - Call: parent=12884901905, name=bundled + overlay child inode root +ID:02de8b7d-c487-4efc-be46-70d5654aebbe [scorpio::fuse::MegaFuse] opendir - Obtained fh: 23 +ID:02de8b7d-c487-4efc-be46-70d5654aebbe [opendir] - Success: ReplyOpen { fh: 23, flags: 100352 } + overlay child inode root +LOOKUP: parent: 12884901905, name: bundled + +ID:1cd6a326-f74b-4916-9977-44c73792754d [lookup] - Error: Errno(2) +ID:90585556-06c8-4ed3-859f-62d17b6d1248|[mkdir] - Call: parent=12884901905, name=bundled, mode=493, umask=18 + overlay child inode root +readdir:.. +readdir:. +ID:90585556-06c8-4ed3-859f-62d17b6d1248 [mkdir] - Success: ReplyEntry { ttl: 5s, attr: FileAttr { ino: 12884901908, size: 4096, blocks: 8, atime: Timestamp { sec: 1740289306, nsec: 58944149 }, mtime: Timestamp { sec: 1740289306, nsec: 58944149 }, ctime: Timestamp { sec: 1740289306, nsec: 58944149 }, kind: Directory, perm: 493, nlink: 2, uid: 1000, gid: 1000, rdev: 0, blksize: 4096 }, generation: 0 } +ID:e4b5eef0-8a77-46e1-a486-11ba957d4f0d|[readdirplus] - Call: parent=12884901905, fh=23, offset=0, lock_owner=0 +ID:6a504daa-ec89-4d56-94ff-d948ab9705d3|[lookup] - Call: parent=12884901908, name=prelude + overlay child inode root +--entry name:. +--entry name:.. +--entry name:. +--entry name:bundled +--entry name:.. +ID:e4b5eef0-8a77-46e1-a486-11ba957d4f0d [readdirplus] - Success: "" + overlay child inode root +LOOKUP: parent: 12884901908, name: prelude + +ID:6a504daa-ec89-4d56-94ff-d948ab9705d3 [lookup] - Error: Errno(2) +ID:a0933e2e-869b-4e77-8cf1-8716fe04ed5c|[mkdir] - Call: parent=12884901908, name=prelude, mode=493, umask=18 +ID:483d7ad0-54ee-4b0d-9df2-4972d4dfdeed|[opendir] - Call: inode=12884901908, flags=100352 + overlay child inode root +readdir:.. +readdir:. +ID:a0933e2e-869b-4e77-8cf1-8716fe04ed5c [mkdir] - Success: ReplyEntry { ttl: 5s, attr: FileAttr { ino: 12884901911, size: 4096, blocks: 8, atime: Timestamp { sec: 1740289306, nsec: 58944149 }, mtime: Timestamp { sec: 1740289306, nsec: 58944149 }, ctime: Timestamp { sec: 1740289306, nsec: 58944149 }, kind: Directory, perm: 493, nlink: 2, uid: 1000, gid: 1000, rdev: 0, blksize: 4096 }, generation: 0 } + overlay child inode root +ID:483d7ad0-54ee-4b0d-9df2-4972d4dfdeed [scorpio::fuse::MegaFuse] opendir - Obtained fh: 24 +ID:483d7ad0-54ee-4b0d-9df2-4972d4dfdeed [opendir] - Success: ReplyOpen { fh: 24, flags: 100352 } +ID:019774bb-8dff-46db-bc0c-04286a40cd4e|[readdirplus] - Call: parent=12884901908, fh=24, offset=0, lock_owner=0 + overlay child inode root +--entry name:. +--entry name:.. +--entry name:.. +--entry name:prelude +--entry name:. +ID:019774bb-8dff-46db-bc0c-04286a40cd4e [readdirplus] - Success: "" +ID:2e81baa7-2cdb-4cee-bc35-e6aeb95a3c44|[opendir] - Call: inode=12884901911, flags=100352 + overlay child inode root +ID:2e81baa7-2cdb-4cee-bc35-e6aeb95a3c44 [scorpio::fuse::MegaFuse] opendir - Obtained fh: 25 +ID:2e81baa7-2cdb-4cee-bc35-e6aeb95a3c44 [opendir] - Success: ReplyOpen { fh: 25, flags: 100352 } +ID:019a7647-2cc4-4bb1-8e9a-45fa901b14f3|[readdirplus] - Call: parent=12884901911, fh=25, offset=0, lock_owner=0 + overlay child inode root +--entry name:. +--entry name:.. +--entry name:. +--entry name:.. +ID:019a7647-2cc4-4bb1-8e9a-45fa901b14f3 [readdirplus] - Success: "" +ID:605b750f-a4c3-4d96-b940-35d5bd58f0b9|[readdirplus] - Call: parent=12884901911, fh=25, offset=4, lock_owner=0 + overlay child inode root +ID:605b750f-a4c3-4d96-b940-35d5bd58f0b9 [readdirplus] - Success: "" +ID:f1ebba31-bd1e-4638-b360-e4004ecde855|[readdirplus] - Call: parent=12884901908, fh=24, offset=5, lock_owner=0 + overlay child inode root +ID:f1ebba31-bd1e-4638-b360-e4004ecde855 [readdirplus] - Success: "" +ID:77cf9f40-c69a-450f-aa77-36742deace93|[releasedir] - Call: inode=12884901911, fh=25, flags=100352 +ID:efe292df-1e17-4ea0-9858-0832c6b4e994|[lookup] - Call: parent=12884901911, name=.buckconfig + overlay child inode root +ID:77cf9f40-c69a-450f-aa77-36742deace93 [releasedir] - Success: () +ID:1386538d-d229-40a3-9c34-e2cecb204377|[readdirplus] - Call: parent=12884901905, fh=23, offset=5, lock_owner=0 + overlay child inode root +LOOKUP: parent: 12884901911, name: .buckconfig + +ID:e02721ba-b7ec-4caa-9d6c-b16da33a826c|[releasedir] - Call: inode=12884901908, fh=24, flags=100352 +ID:efe292df-1e17-4ea0-9858-0832c6b4e994 [lookup] - Error: Errno(2) + overlay child inode root +ID:1386538d-d229-40a3-9c34-e2cecb204377 [readdirplus] - Success: "" +ID:e3f3eef7-342c-4f85-91da-bd2145912a12|[create] - Call: parent=12884901911, name=.buckconfig, mode=33188, flags=33345 + overlay child inode root +ID:e02721ba-b7ec-4caa-9d6c-b16da33a826c [releasedir] - Success: () + overlay child inode root +ID:e3f3eef7-342c-4f85-91da-bd2145912a12 [create] - Success: ReplyCreated { ttl: 5s, attr: FileAttr { ino: 12884901914, size: 0, blocks: 0, atime: Timestamp { sec: 1740289306, nsec: 68944148 }, mtime: Timestamp { sec: 1740289306, nsec: 68944148 }, ctime: Timestamp { sec: 1740289306, nsec: 68944148 }, kind: RegularFile, perm: 420, nlink: 1, uid: 1000, gid: 1000, rdev: 0, blksize: 4096 }, generation: 0, fh: 26, flags: 164417 } +ID:b7a12442-5894-4fc1-8001-e17007e0928f|[getattr] - Call: inode=12884901908, fh=, flags=0 + overlay child inode root +ID:c98abfeb-20c4-4874-8eb7-cb215a082c35|[releasedir] - Call: inode=12884901905, fh=23, flags=100352 +ID:b7a12442-5894-4fc1-8001-e17007e0928f [getattr] - Success: ReplyAttr { ttl: 5s, attr: FileAttr { ino: 27128, size: 4096, blocks: 8, atime: Timestamp { sec: 1740289306, nsec: 58944149 }, mtime: Timestamp { sec: 1740289306, nsec: 58944149 }, ctime: Timestamp { sec: 1740289306, nsec: 58944149 }, kind: Directory, perm: 493, nlink: 3, uid: 1000, gid: 1000, rdev: 0, blksize: 4096 } } +ID:f3b37ea1-e75f-4069-a91b-efb8f2beab1f|[write] - Call: inode=12884901914, fh=26, offset=0, data_len=402, write_flags=6, flags=32769 + overlay child inode root +ID:c98abfeb-20c4-4874-8eb7-cb215a082c35 [releasedir] - Success: () + overlay child inode root +ID:f3b37ea1-e75f-4069-a91b-efb8f2beab1f [scorpio::fuse::MegaFuse] write - Wrote 402 bytes +ID:f3b37ea1-e75f-4069-a91b-efb8f2beab1f [write] - Success: ReplyWrite { written: 402 } +ID:aab0413e-c841-4a0a-b199-2289b4e0040d|[flush] - Call: inode=12884901914, fh=26, lock_owner=7625110741495926769 +ID:07c014e7-5fca-46a5-829a-6c45b2487c01|[opendir] - Call: inode=12884901908, flags=100352 + overlay child inode root +ID:aab0413e-c841-4a0a-b199-2289b4e0040d [flush] - Success: () + overlay child inode root +ID:07c014e7-5fca-46a5-829a-6c45b2487c01 [scorpio::fuse::MegaFuse] opendir - Obtained fh: 27 +ID:07c014e7-5fca-46a5-829a-6c45b2487c01 [opendir] - Success: ReplyOpen { fh: 27, flags: 100352 } +ID:a8d28ec5-1180-4579-a269-91fddacb3d87|[release] - Call: inode=12884901914, fh=26, flags=32769, lock_owner=0, flush=false +ID:ee1f1cb7-a935-4890-b84c-2bbdd4343fcf|[readdirplus] - Call: parent=12884901908, fh=27, offset=0, lock_owner=0 + overlay child inode root +ID:a8d28ec5-1180-4579-a269-91fddacb3d87 [release] - Success: () +ID:060c60c0-1d88-43ed-bbd5-c2f616b68716|[lookup] - Call: parent=12884901911, name=.gitignore + overlay child inode root +--entry name:. +--entry name:.. +--entry name:.. +--entry name:prelude +--entry name:. +ID:ee1f1cb7-a935-4890-b84c-2bbdd4343fcf [readdirplus] - Success: "" + overlay child inode root +LOOKUP: parent: 12884901911, name: .gitignore + +ID:060c60c0-1d88-43ed-bbd5-c2f616b68716 [lookup] - Error: Errno(2) +ID:ed2c4986-3e27-4acc-9370-01d2f44b27b9|[lookup] - Call: parent=12884901908, name=prelude +ID:c40c5f79-8098-4cea-8e4b-b76aa5e67efa|[opendir] - Call: inode=12884901911, flags=100352 + overlay child inode root +LOOKUP: parent: 12884901908, name: prelude + +ID:ed2c4986-3e27-4acc-9370-01d2f44b27b9 [lookup] - Success: ReplyEntry { ttl: 5s, attr: FileAttr { ino: 12884901911, size: 4096, blocks: 8, atime: Timestamp { sec: 1740289306, nsec: 58944149 }, mtime: Timestamp { sec: 1740289306, nsec: 68944148 }, ctime: Timestamp { sec: 1740289306, nsec: 68944148 }, kind: Directory, perm: 493, nlink: 2, uid: 1000, gid: 1000, rdev: 0, blksize: 4096 }, generation: 0 } + overlay child inode root +ID:c40c5f79-8098-4cea-8e4b-b76aa5e67efa [scorpio::fuse::MegaFuse] opendir - Obtained fh: 28 +ID:c40c5f79-8098-4cea-8e4b-b76aa5e67efa [opendir] - Success: ReplyOpen { fh: 28, flags: 100352 } +ID:626cda42-cb44-4881-81d7-c7dbdc770997|[lookup] - Call: parent=12884901911, name=.gitignore + overlay child inode root +LOOKUP: parent: 12884901911, name: .gitignore + +ID:626cda42-cb44-4881-81d7-c7dbdc770997 [lookup] - Error: Errno(2) +ID:0c8b37da-579a-4cd8-a49f-5d3707d605d9|[create] - Call: parent=12884901911, name=.gitignore, mode=33188, flags=33345 + overlay child inode root +ID:0c8b37da-579a-4cd8-a49f-5d3707d605d9 [create] - Success: ReplyCreated { ttl: 5s, attr: FileAttr { ino: 12884901915, size: 0, blocks: 0, atime: Timestamp { sec: 1740289306, nsec: 68944148 }, mtime: Timestamp { sec: 1740289306, nsec: 68944148 }, ctime: Timestamp { sec: 1740289306, nsec: 68944148 }, kind: RegularFile, perm: 420, nlink: 1, uid: 1000, gid: 1000, rdev: 0, blksize: 4096 }, generation: 0, fh: 29, flags: 164417 } +ID:22343e85-0305-4002-8c57-465adfc9b645|[write] - Call: inode=12884901915, fh=29, offset=0, data_len=73, write_flags=6, flags=32769 + overlay child inode root +ID:94f2f33d-49b6-4ee5-9673-d1becb920891|[readdirplus] - Call: parent=12884901911, fh=28, offset=0, lock_owner=0 +ID:22343e85-0305-4002-8c57-465adfc9b645 [scorpio::fuse::MegaFuse] write - Wrote 73 bytes +ID:22343e85-0305-4002-8c57-465adfc9b645 [write] - Success: ReplyWrite { written: 73 } + overlay child inode root +--entry name:. +--entry name:.. +--entry name:.gitignore +--entry name:.buckconfig +--entry name:. +--entry name:.. +ID:94f2f33d-49b6-4ee5-9673-d1becb920891 [readdirplus] - Success: "" +ID:0cd82d0d-a2b1-4b4f-beb6-bfcc62d11f4e|[flush] - Call: inode=12884901915, fh=29, lock_owner=7625110741495926769 +ID:a8e79aac-0f96-4800-9934-13d04c356481|[getattr] - Call: inode=12884901915, fh=, flags=0 + overlay child inode root +ID:0cd82d0d-a2b1-4b4f-beb6-bfcc62d11f4e [flush] - Success: () + overlay child inode root +ID:a8e79aac-0f96-4800-9934-13d04c356481 [getattr] - Success: ReplyAttr { ttl: 5s, attr: FileAttr { ino: 27185, size: 73, blocks: 8, atime: Timestamp { sec: 1740289306, nsec: 68944148 }, mtime: Timestamp { sec: 1740289306, nsec: 68944148 }, ctime: Timestamp { sec: 1740289306, nsec: 68944148 }, kind: RegularFile, perm: 420, nlink: 1, uid: 1000, gid: 1000, rdev: 0, blksize: 4096 } } +ID:4e61e6ac-452a-42de-ad74-77c304886c23|[release] - Call: inode=12884901915, fh=29, flags=32769, lock_owner=0, flush=false + overlay child inode root +ID:48ec1f03-7d7e-4bd9-a5be-e31284711cd3|[readdirplus] - Call: parent=12884901911, fh=28, offset=6, lock_owner=0 +ID:4e61e6ac-452a-42de-ad74-77c304886c23 [release] - Success: () + overlay child inode root +ID:dc9cf26d-7582-4300-8866-0c2320a8c4b3|[lookup] - Call: parent=12884901911, name=BUCK +ID:48ec1f03-7d7e-4bd9-a5be-e31284711cd3 [readdirplus] - Success: "" + overlay child inode root +LOOKUP: parent: 12884901911, name: BUCK + +ID:dc9cf26d-7582-4300-8866-0c2320a8c4b3 [lookup] - Error: Errno(2) +ID:053e3276-db14-49f9-a161-569f29e9d713|[getattr] - Call: inode=12884901911, fh=, flags=0 +ID:09a95f5f-fe99-4bd9-970f-3a253a25c099|[releasedir] - Call: inode=12884901911, fh=28, flags=100352 + overlay child inode root +ID:17549bbb-9c8e-458e-b095-6a3282d4a72a|[readdirplus] - Call: parent=12884901908, fh=27, offset=5, lock_owner=0 +ID:053e3276-db14-49f9-a161-569f29e9d713 [getattr] - Success: ReplyAttr { ttl: 5s, attr: FileAttr { ino: 27131, size: 4096, blocks: 8, atime: Timestamp { sec: 1740289306, nsec: 58944149 }, mtime: Timestamp { sec: 1740289306, nsec: 68944148 }, ctime: Timestamp { sec: 1740289306, nsec: 68944148 }, kind: Directory, perm: 493, nlink: 2, uid: 1000, gid: 1000, rdev: 0, blksize: 4096 } } + overlay child inode root +ID:09a95f5f-fe99-4bd9-970f-3a253a25c099 [releasedir] - Success: () + overlay child inode root +ID:17549bbb-9c8e-458e-b095-6a3282d4a72a [readdirplus] - Success: "" +ID:a299db17-dcda-4459-9319-204a87049ba4|[opendir] - Call: inode=12884901911, flags=100352 +ID:c058ba1c-ddf2-414b-a81a-c31c708fc1c8|[lookup] - Call: parent=12884901908, name=prelude + overlay child inode root +LOOKUP: parent: 12884901908, name: prelude + +ID:758787a7-0da8-42b2-9c61-3380754597eb|[releasedir] - Call: inode=12884901908, fh=27, flags=100352 +ID:c058ba1c-ddf2-414b-a81a-c31c708fc1c8 [lookup] - Success: ReplyEntry { ttl: 5s, attr: FileAttr { ino: 12884901911, size: 4096, blocks: 8, atime: Timestamp { sec: 1740289306, nsec: 58944149 }, mtime: Timestamp { sec: 1740289306, nsec: 68944148 }, ctime: Timestamp { sec: 1740289306, nsec: 68944148 }, kind: Directory, perm: 493, nlink: 2, uid: 1000, gid: 1000, rdev: 0, blksize: 4096 }, generation: 0 } + overlay child inode root +ID:a299db17-dcda-4459-9319-204a87049ba4 [scorpio::fuse::MegaFuse] opendir - Obtained fh: 30 +ID:a299db17-dcda-4459-9319-204a87049ba4 [opendir] - Success: ReplyOpen { fh: 30, flags: 100352 } +ID:7a42bf83-a90f-43df-8b9c-b86c31af283e|[lookup] - Call: parent=12884901911, name=BUCK + overlay child inode root +ID:758787a7-0da8-42b2-9c61-3380754597eb [releasedir] - Success: () + overlay child inode root +LOOKUP: parent: 12884901911, name: BUCK + +ID:7a42bf83-a90f-43df-8b9c-b86c31af283e [lookup] - Error: Errno(2) +ID:74494c3c-2114-44e0-9749-71d004c3a111|[create] - Call: parent=12884901911, name=BUCK, mode=33188, flags=33345 + overlay child inode root +ID:74494c3c-2114-44e0-9749-71d004c3a111 [create] - Success: ReplyCreated { ttl: 5s, attr: FileAttr { ino: 12884901916, size: 0, blocks: 0, atime: Timestamp { sec: 1740289306, nsec: 68944148 }, mtime: Timestamp { sec: 1740289306, nsec: 68944148 }, ctime: Timestamp { sec: 1740289306, nsec: 68944148 }, kind: RegularFile, perm: 420, nlink: 1, uid: 1000, gid: 1000, rdev: 0, blksize: 4096 }, generation: 0, fh: 31, flags: 164417 } +ID:b35320b9-6f87-4636-8839-db0076b9cd29|[readdirplus] - Call: parent=12884901911, fh=30, offset=0, lock_owner=0 + overlay child inode root +--entry name:. +--entry name:.. +ID:497c664c-4197-4e5c-8dcb-0a04af47afab|[write] - Call: inode=12884901916, fh=31, offset=0, data_len=1516, write_flags=6, flags=32769 +--entry name:.gitignore +--entry name:BUCK +--entry name:.buckconfig +--entry name:. +--entry name:.. +ID:b35320b9-6f87-4636-8839-db0076b9cd29 [readdirplus] - Success: "" + overlay child inode root +ID:497c664c-4197-4e5c-8dcb-0a04af47afab [scorpio::fuse::MegaFuse] write - Wrote 1516 bytes +ID:497c664c-4197-4e5c-8dcb-0a04af47afab [write] - Success: ReplyWrite { written: 1516 } +ID:5d0ea533-ba55-434f-b8bc-a2c05a3d9dd4|[readdirplus] - Call: parent=12884901911, fh=30, offset=7, lock_owner=0 + overlay child inode root +ID:5d0ea533-ba55-434f-b8bc-a2c05a3d9dd4 [readdirplus] - Success: "" +ID:d4c597b8-3630-4751-b758-0c8940c43d23|[flush] - Call: inode=12884901916, fh=31, lock_owner=7625110741495926769 + overlay child inode root +ID:d4c597b8-3630-4751-b758-0c8940c43d23 [flush] - Success: () +ID:bc2abd5c-8b8c-492c-a70a-1a472ddbeea2|[releasedir] - Call: inode=12884901911, fh=30, flags=100352 + overlay child inode root +ID:bc2abd5c-8b8c-492c-a70a-1a472ddbeea2 [releasedir] - Success: () +ID:fecc5913-a931-4c13-aa85-a4b073d97fce|[lookup] - Call: parent=12884901911, name=abi +ID:128a2c74-bbfc-4fe6-b4af-9c871e7a9abf|[release] - Call: inode=12884901916, fh=31, flags=32769, lock_owner=0, flush=false + overlay child inode root +LOOKUP: parent: 12884901911, name: abi + +ID:fecc5913-a931-4c13-aa85-a4b073d97fce [lookup] - Error: Errno(2) + overlay child inode root +ID:128a2c74-bbfc-4fe6-b4af-9c871e7a9abf [release] - Success: () +ID:3c53f2fb-77da-41c7-9753-a5f39569b504|[lookup] - Call: parent=12884901911, name=abi + overlay child inode root +LOOKUP: parent: 12884901911, name: abi + +ID:3c53f2fb-77da-41c7-9753-a5f39569b504 [lookup] - Error: Errno(2) +ID:279ec560-5410-4369-ba53-42c2287460dc|[lookup] - Call: parent=12884901911, name=abi + overlay child inode root +LOOKUP: parent: 12884901911, name: abi + +ID:279ec560-5410-4369-ba53-42c2287460dc [lookup] - Error: Errno(2) +ID:d5f0e0b3-4659-418d-8cff-b8a84b1b5de5|[mkdir] - Call: parent=12884901911, name=abi, mode=493, umask=18 + overlay child inode root +readdir:.. +readdir:. +ID:d5f0e0b3-4659-418d-8cff-b8a84b1b5de5 [mkdir] - Success: ReplyEntry { ttl: 5s, attr: FileAttr { ino: 12884901917, size: 4096, blocks: 8, atime: Timestamp { sec: 1740289306, nsec: 68944148 }, mtime: Timestamp { sec: 1740289306, nsec: 68944148 }, ctime: Timestamp { sec: 1740289306, nsec: 68944148 }, kind: Directory, perm: 493, nlink: 2, uid: 1000, gid: 1000, rdev: 0, blksize: 4096 }, generation: 0 } +ID:3bf2635b-e6f7-4dfd-9d5d-cf0991ad8e3c|[opendir] - Call: inode=12884901917, flags=100352 +ID:55be4e6a-0be8-447e-b3df-06d68235cdd0|[lookup] - Call: parent=12884901917, name=BUCK.v2 + overlay child inode root +ID:3bf2635b-e6f7-4dfd-9d5d-cf0991ad8e3c [scorpio::fuse::MegaFuse] opendir - Obtained fh: 32 +ID:3bf2635b-e6f7-4dfd-9d5d-cf0991ad8e3c [opendir] - Success: ReplyOpen { fh: 32, flags: 100352 } + overlay child inode root +LOOKUP: parent: 12884901917, name: BUCK.v2 + +ID:55be4e6a-0be8-447e-b3df-06d68235cdd0 [lookup] - Error: Errno(2) +ID:1ebbba75-de97-4915-a5ed-0ab088955122|[create] - Call: parent=12884901917, name=BUCK.v2, mode=33188, flags=33345 + overlay child inode root +ID:1ebbba75-de97-4915-a5ed-0ab088955122 [create] - Success: ReplyCreated { ttl: 5s, attr: FileAttr { ino: 12884901920, size: 0, blocks: 0, atime: Timestamp { sec: 1740289306, nsec: 68944148 }, mtime: Timestamp { sec: 1740289306, nsec: 68944148 }, ctime: Timestamp { sec: 1740289306, nsec: 68944148 }, kind: RegularFile, perm: 420, nlink: 1, uid: 1000, gid: 1000, rdev: 0, blksize: 4096 }, generation: 0, fh: 33, flags: 164417 } +ID:5a7c6bbe-0ce2-43e6-8454-561a567eabea|[readdirplus] - Call: parent=12884901917, fh=32, offset=0, lock_owner=0 +ID:be22f904-b9cd-459e-b95c-b17544d7c6ab|[write] - Call: inode=12884901920, fh=33, offset=0, data_len=523, write_flags=6, flags=32769 + overlay child inode root +--entry name:. +--entry name:.. +--entry name:. +--entry name:.. +--entry name:BUCK.v2 +ID:5a7c6bbe-0ce2-43e6-8454-561a567eabea [readdirplus] - Success: "" + overlay child inode root +ID:be22f904-b9cd-459e-b95c-b17544d7c6ab [scorpio::fuse::MegaFuse] write - Wrote 523 bytes +ID:be22f904-b9cd-459e-b95c-b17544d7c6ab [write] - Success: ReplyWrite { written: 523 } +ID:04a40a32-ce45-4d80-8cf1-e8d38bf78d4c|[readdirplus] - Call: parent=12884901917, fh=32, offset=5, lock_owner=0 + overlay child inode root +ID:04a40a32-ce45-4d80-8cf1-e8d38bf78d4c [readdirplus] - Success: "" +ID:32adb4b2-9d2d-46a9-b4e4-75bbf53e39fe|[flush] - Call: inode=12884901920, fh=33, lock_owner=7625110741495926769 + overlay child inode root +ID:32adb4b2-9d2d-46a9-b4e4-75bbf53e39fe [flush] - Success: () +ID:859ab2b5-cfcd-452d-87ca-15da63de1935|[lookup] - Call: parent=12884901917, name=constraints +ID:a47897c1-433a-4529-b6bc-ce4aa3c6b473|[release] - Call: inode=12884901920, fh=33, flags=32769, lock_owner=0, flush=false + overlay child inode root +LOOKUP: parent: 12884901917, name: constraints + +ID:b2e5a8d3-0f42-4be5-ac5f-1422884d6e05|[releasedir] - Call: inode=12884901917, fh=32, flags=100352 +ID:859ab2b5-cfcd-452d-87ca-15da63de1935 [lookup] - Error: Errno(2) + overlay child inode root +ID:a47897c1-433a-4529-b6bc-ce4aa3c6b473 [release] - Success: () + overlay child inode root +ID:b2e5a8d3-0f42-4be5-ac5f-1422884d6e05 [releasedir] - Success: () +ID:d2e41b35-535a-410d-9252-bddd4ea050de|[lookup] - Call: parent=12884901917, name=constraints + overlay child inode root +LOOKUP: parent: 12884901917, name: constraints + +ID:d2e41b35-535a-410d-9252-bddd4ea050de [lookup] - Error: Errno(2) +ID:a1f2b684-8a6c-479f-a156-5a8c685f1a0d|[lookup] - Call: parent=12884901917, name=constraints + overlay child inode root +LOOKUP: parent: 12884901917, name: constraints + +ID:a1f2b684-8a6c-479f-a156-5a8c685f1a0d [lookup] - Error: Errno(2) +ID:8131ffed-e83e-491f-8703-c81dc1d632c4|[mkdir] - Call: parent=12884901917, name=constraints, mode=493, umask=18 + overlay child inode root +readdir:.. +readdir:. +ID:8131ffed-e83e-491f-8703-c81dc1d632c4 [mkdir] - Success: ReplyEntry { ttl: 5s, attr: FileAttr { ino: 12884901921, size: 4096, blocks: 8, atime: Timestamp { sec: 1740289306, nsec: 68944148 }, mtime: Timestamp { sec: 1740289306, nsec: 68944148 }, ctime: Timestamp { sec: 1740289306, nsec: 68944148 }, kind: Directory, perm: 493, nlink: 2, uid: 1000, gid: 1000, rdev: 0, blksize: 4096 }, generation: 0 } +ID:3b52ae06-a90e-40d2-9e5a-4dc5cb1359c8|[opendir] - Call: inode=12884901921, flags=100352 +ID:30b69c68-a169-48f1-a01a-ab4a70a42460|[lookup] - Call: parent=12884901921, name=BUCK.v2 + overlay child inode root +ID:3b52ae06-a90e-40d2-9e5a-4dc5cb1359c8 [scorpio::fuse::MegaFuse] opendir - Obtained fh: 34 +ID:3b52ae06-a90e-40d2-9e5a-4dc5cb1359c8 [opendir] - Success: ReplyOpen { fh: 34, flags: 100352 } + overlay child inode root +LOOKUP: parent: 12884901921, name: BUCK.v2 + +ID:30b69c68-a169-48f1-a01a-ab4a70a42460 [lookup] - Error: Errno(2) +ID:a1ed85c0-d493-4756-a997-35b97f036f8c|[create] - Call: parent=12884901921, name=BUCK.v2, mode=33188, flags=33345 + overlay child inode root +ID:a1ed85c0-d493-4756-a997-35b97f036f8c [create] - Success: ReplyCreated { ttl: 5s, attr: FileAttr { ino: 12884901924, size: 0, blocks: 0, atime: Timestamp { sec: 1740289306, nsec: 68944148 }, mtime: Timestamp { sec: 1740289306, nsec: 68944148 }, ctime: Timestamp { sec: 1740289306, nsec: 68944148 }, kind: RegularFile, perm: 420, nlink: 1, uid: 1000, gid: 1000, rdev: 0, blksize: 4096 }, generation: 0, fh: 35, flags: 164417 } +ID:b4a7fe83-1b9b-4e77-ab41-d5a7998a8f5f|[readdirplus] - Call: parent=12884901921, fh=34, offset=0, lock_owner=0 + overlay child inode root +ID:c5a4ddb0-39a9-404b-ae7e-f4ea667d7e6f|[write] - Call: inode=12884901924, fh=35, offset=0, data_len=532, write_flags=6, flags=32769 +--entry name:. +--entry name:.. +--entry name:.. +--entry name:. +--entry name:BUCK.v2 +ID:b4a7fe83-1b9b-4e77-ab41-d5a7998a8f5f [readdirplus] - Success: "" + overlay child inode root +ID:c5a4ddb0-39a9-404b-ae7e-f4ea667d7e6f [scorpio::fuse::MegaFuse] write - Wrote 532 bytes +ID:c5a4ddb0-39a9-404b-ae7e-f4ea667d7e6f [write] - Success: ReplyWrite { written: 532 } +ID:18ead7c4-2718-49c7-b4b9-804496a33bc7|[flush] - Call: inode=12884901924, fh=35, lock_owner=7625110741495926769 +ID:c0513314-1327-4a5c-a9c5-90fc488154c8|[readdirplus] - Call: parent=12884901921, fh=34, offset=5, lock_owner=0 + overlay child inode root +ID:18ead7c4-2718-49c7-b4b9-804496a33bc7 [flush] - Success: () + overlay child inode root +ID:c0513314-1327-4a5c-a9c5-90fc488154c8 [readdirplus] - Success: "" +ID:2222b061-e051-4bbf-b785-08a2f836f9f4|[releasedir] - Call: inode=12884901921, fh=34, flags=100352 +ID:5b5c8b3c-d6aa-4c1b-b55c-69901f24d102|[lookup] - Call: parent=12884901911, name=alias.bzl +ID:c454b662-3f2c-488b-b134-08a6bcf86b3b|[release] - Call: inode=12884901924, fh=35, flags=32769, lock_owner=0, flush=false + overlay child inode root +ID:2222b061-e051-4bbf-b785-08a2f836f9f4 [releasedir] - Success: () + overlay child inode root +LOOKUP: parent: 12884901911, name: alias.bzl + +ID:5b5c8b3c-d6aa-4c1b-b55c-69901f24d102 [lookup] - Error: Errno(2) + overlay child inode root +ID:c454b662-3f2c-488b-b134-08a6bcf86b3b [release] - Success: () +ID:5474a225-ecbd-4d9d-a1b2-01406b08255c|[getattr] - Call: inode=12884901911, fh=, flags=0 + overlay child inode root +ID:5474a225-ecbd-4d9d-a1b2-01406b08255c [getattr] - Success: ReplyAttr { ttl: 5s, attr: FileAttr { ino: 27131, size: 4096, blocks: 8, atime: Timestamp { sec: 1740289306, nsec: 58944149 }, mtime: Timestamp { sec: 1740289306, nsec: 68944148 }, ctime: Timestamp { sec: 1740289306, nsec: 68944148 }, kind: Directory, perm: 493, nlink: 3, uid: 1000, gid: 1000, rdev: 0, blksize: 4096 } } +ID:5ccd06cd-5650-4582-b3cc-81e93f974c99|[lookup] - Call: parent=12884901908, name=prelude + overlay child inode root +LOOKUP: parent: 12884901908, name: prelude + +ID:5ccd06cd-5650-4582-b3cc-81e93f974c99 [lookup] - Success: ReplyEntry { ttl: 5s, attr: FileAttr { ino: 12884901911, size: 4096, blocks: 8, atime: Timestamp { sec: 1740289306, nsec: 58944149 }, mtime: Timestamp { sec: 1740289306, nsec: 68944148 }, ctime: Timestamp { sec: 1740289306, nsec: 68944148 }, kind: Directory, perm: 493, nlink: 3, uid: 1000, gid: 1000, rdev: 0, blksize: 4096 }, generation: 0 } +ID:658c681d-46d2-4db3-8b9b-c10e8a1583ae|[lookup] - Call: parent=12884901911, name=alias.bzl + overlay child inode root +LOOKUP: parent: 12884901911, name: alias.bzl + +ID:658c681d-46d2-4db3-8b9b-c10e8a1583ae [lookup] - Error: Errno(2) +ID:29411427-4cfc-4767-bae6-a9fe46778122|[create] - Call: parent=12884901911, name=alias.bzl, mode=33188, flags=33345 + overlay child inode root +ID:29411427-4cfc-4767-bae6-a9fe46778122 [create] - Success: ReplyCreated { ttl: 5s, attr: FileAttr { ino: 12884901925, size: 0, blocks: 0, atime: Timestamp { sec: 1740289306, nsec: 68944148 }, mtime: Timestamp { sec: 1740289306, nsec: 68944148 }, ctime: Timestamp { sec: 1740289306, nsec: 68944148 }, kind: RegularFile, perm: 420, nlink: 1, uid: 1000, gid: 1000, rdev: 0, blksize: 4096 }, generation: 0, fh: 36, flags: 164417 } +ID:ef8e8c88-3406-4b8f-aeef-0a26c797a5cf|[write] - Call: inode=12884901925, fh=36, offset=0, data_len=1191, write_flags=6, flags=32769 + overlay child inode root +ID:ef8e8c88-3406-4b8f-aeef-0a26c797a5cf [scorpio::fuse::MegaFuse] write - Wrote 1191 bytes +ID:ef8e8c88-3406-4b8f-aeef-0a26c797a5cf [write] - Success: ReplyWrite { written: 1191 } +ID:1f0d174d-f331-4fb0-aa83-994a719edd19|[flush] - Call: inode=12884901925, fh=36, lock_owner=7625110741495926769 + overlay child inode root +ID:1f0d174d-f331-4fb0-aa83-994a719edd19 [flush] - Success: () +ID:bd30e442-734e-4a37-b782-e4e44f36ac10|[lookup] - Call: parent=12884901911, name=android + overlay child inode root +ID:02f668b0-8936-4af0-82f5-a693d0a60d7c|[release] - Call: inode=12884901925, fh=36, flags=32769, lock_owner=0, flush=false +LOOKUP: parent: 12884901911, name: android + +ID:bd30e442-734e-4a37-b782-e4e44f36ac10 [lookup] - Error: Errno(2) + overlay child inode root +ID:02f668b0-8936-4af0-82f5-a693d0a60d7c [release] - Success: () +ID:65f6dbd4-a57e-4d57-8091-5974a62f0b9f|[lookup] - Call: parent=12884901911, name=android + overlay child inode root +LOOKUP: parent: 12884901911, name: android + +ID:65f6dbd4-a57e-4d57-8091-5974a62f0b9f [lookup] - Error: Errno(2) +ID:46b80c94-1d5d-45bb-a6d9-fcf02c92be51|[lookup] - Call: parent=12884901911, name=android + overlay child inode root +LOOKUP: parent: 12884901911, name: android + +ID:46b80c94-1d5d-45bb-a6d9-fcf02c92be51 [lookup] - Error: Errno(2) +ID:d6a96274-29f2-4c86-a9a3-dbefa4aa2d62|[mkdir] - Call: parent=12884901911, name=android, mode=493, umask=18 + overlay child inode root +readdir:.. +ID:ff1f2879-37eb-4930-bce9-07567ac9e5bd|[write] - Call: inode=12884901904, fh=20, offset=0, data_len=1275, write_flags=0, flags=33794 +ID:720c7551-801e-4074-aa5f-c26521590191|[lookup] - Call: parent=8, name=elapsed: +ID:a6115604-a48c-4e35-981a-230c6455f691|[lookup] - Call: parent=8, name=ID: +ID:38fbaa6b-e174-4f31-bdca-9398a4a2af37|[lookup] - Call: parent=3, name=buck-hello$ +ID:1fdb34d6-c47e-4935-980d-ecb7aaffe665|[statfs] - Call: inode=12884901891 +ID:08661d02-0bc6-48fc-9562-ce1ffb56ebe0|[interrupt] - Call: unique=544 +ID:30f50367-f5eb-4689-8c16-0e19d75f5f3b|[lookup] - Call: parent=8, name=buck-out +ID:e7e538e2-ac02-4e22-9e22-af0b943415fd|[lookup] - Call: parent=8, name=buck-out +ID:3612848e-eefa-437c-909a-2ea6223cecb5|[interrupt] - Call: unique=554 +unmount.... +ID:9c85b049-7f4d-4759-9116-b7dc4377a5d1|[destroy] - Call: diff --git a/scorpio/script/log_analysis.py b/scorpio/script/log_analysis.py new file mode 100644 index 000000000..06e204133 --- /dev/null +++ b/scorpio/script/log_analysis.py @@ -0,0 +1,67 @@ + +# Scorpio Log Analysis Tool, used for extracting abnormal requests (function not returning) +import re +from collections import defaultdict + +def extract_unique_id_lines(input_path, output_path): + """Extract lines with unique IDs and save them to a file""" + + # Compile optimized regular expression (note the comments in re.VERBOSE mode) + uuid_regex = re.compile( + r'''^ID: # Fixed starting identifier + \{? # Optional left curly brace + ( # Start capturing group + [0-9a-fA-F]{8} # 8 hexadecimal digits + - # Separator + (?:[0-9a-fA-F]{4}-){3} # Three middle groups (non-capturing group for performance) + [0-9a-fA-F]{12} # Last 12 digits + ) # End capturing group + \}? # Optional right curly brace + (?!\S) # Ensure ID is followed by a space or end of line + ''', + re.IGNORECASE | re.VERBOSE + ) + uuid_regex = re.compile( + r'^ID:\{?([0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12})\}?\b', + re.IGNORECASE + ) + + id_counter = defaultdict(int) + logs = defaultdict(int) + # First pass: Count occurrences of each ID + with open(input_path, 'r', encoding='utf-8') as f: + for line_num, line in enumerate(f, 1): + # Clean up line content (ignore comments and whitespace) + line = line.split('#')[0].strip() + if match := uuid_regex.search(line): + # Extract the standardized ID (convert to lowercase + remove braces) + raw_uuid = match.group(1).strip('{}') + standard_uuid = raw_uuid.lower() + logs[standard_uuid] = line + id_counter[standard_uuid] += 1 + + # Second pass: Record line numbers for unique IDs + unique_lines = [] + with open(input_path, 'r', encoding='utf-8') as f: + for line_num, line in enumerate(f, 1): + line = line.split('#')[0].strip() + if match := uuid_regex.search(line): + raw_uuid = match.group(1).strip('{}') + standard_uuid = raw_uuid.lower() + if id_counter[standard_uuid] == 1: + unique_lines.append(logs[standard_uuid]) + + # Write the results to a file (one line number per line) + with open(output_path, 'w', encoding='utf-8') as f: + f.write('\n'.join(map(str, unique_lines))) + + +# For example, run this script with: python log_analysis.py input.log output.txt +if __name__ == "__main__": + import sys + if len(sys.argv) != 2: + print(f"Usage: {sys.argv[0]} input.log") + sys.exit(1) + + extract_unique_id_lines(sys.argv[1], "output.txt") + print(f"Unique ID line numbers have been saved") \ No newline at end of file diff --git a/scorpio/src/daemon/lfs.rs b/scorpio/src/daemon/lfs.rs new file mode 100644 index 000000000..08a5159ac --- /dev/null +++ b/scorpio/src/daemon/lfs.rs @@ -0,0 +1,163 @@ +use axum::{ + routing::{get, post, delete}, + Router, + extract::{Query, Path}, + Json, +}; +use serde::{Deserialize, Serialize}; +use std::collections::HashMap; + +pub fn create_app() -> Router { + Router::new() + .nest("/lfs", Router::new() + // Track LFS paths (equivalent to the track command) + .route("/attributes/track", post(track_lfs_path)) + // Untrack paths (equivalent to the untrack command) + .route("/attributes/untrack", post(untrack_lfs_path)) + // List locked files in the current branch (equivalent to lfs locks) + .route("/locks", get(list_locks)) + // Lock a file (equivalent to lfs lock) + .route("/locks/:path", post(create_lock)) + // Unlock a file (equivalent to lfs unlock) + .route("/locks/:path", delete(remove_lock)) + // Display LFS file information (equivalent to lfs ls - files) + .route("/objects/metadata", get(list_lfs_files)) + ) +} + +// Region 1: Attribute management endpoints =============================================== + +#[derive(Debug, Deserialize)] +struct TrackPathsRequest { + patterns: Vec, +} + +async fn track_lfs_path( + Json(payload): Json +) -> Result>, AppError> { + // Business logic: + // 1. Update the.gitattributes file + // 2. Return something like {"status": "tracked", "added_paths": [...]} + Ok(Json(HashMap::from([ + ("status".to_string(), "success".to_string()), + ("added_paths".to_string(), payload.patterns.join(",")) + ]))) +} + +#[derive(Debug, Deserialize)] +struct UntrackPathsRequest { + paths: Vec, +} + +async fn untrack_lfs_path( + Json(payload): Json +) -> Result>, AppError> { + // Business logic: Remove paths from.gitattributes + Ok(Json(HashMap::from([ + ("status".to_string(), "success".to_string()), + ("removed_paths".to_string(), payload.paths.join(",")) + ]))) +} + +// Region 2: File lock management endpoints ============================================ + +#[derive(Debug, Deserialize)] +struct ListLocksQuery { // Corresponds to the three option parameters of the CLI + id: Option, + path: Option, + limit: Option, +} + +#[derive(Debug, Serialize)] +struct LockInfo { + id: String, + path: String, + owner: String, + locked_at: i64, // Timestamp +} + +async fn list_locks( + Query(params): Query +) -> Result>, AppError> { + // Business logic: Query the list of locks in the current branch + let mock_data = vec![LockInfo { + id: "123".to_string(), + path: params.path.unwrap_or_default(), + owner: "user1".to_string(), + locked_at: 1672531200 + }]; + Ok(Json(mock_data)) +} + +async fn create_lock( + Path(path): Path // Get the file path from the URL path +) -> Result, AppError> { + // Business logic: Create a new lock + Ok(Json(LockInfo { + id: "456".to_string(), + path, + owner: "current_user".to_string(), + locked_at: 1672531200 + })) +} + +#[derive(Debug, Deserialize)] +struct UnlockParams { // CLI unlock parameters + force: bool, + id: Option, +} + +async fn remove_lock( + Path(path): Path, + Query(params): Query +) -> Result>, AppError> { + // Business logic: Force or normal unlock + Ok(Json(HashMap::from([ + ("status".to_string(), "unlocked".to_string()), + ("path".to_string(), path), + ("force_mode".to_string(), params.force.to_string()) + ]))) +} + +// Region 3: LFS file information viewing endpoints ======================================= + +#[derive(Debug, Deserialize)] +struct MetadataQueryParams { // Corresponds to the CLI option parameters + long: Option, + size: Option, + name_only: Option +} + +#[derive(Debug, Serialize)] +struct LFSFileMeta { + oid: String, + symbolic_type: String, // "*" or "-" + path: String, + size_human: Option // Nullable field +} + +async fn list_lfs_files( + Query(params): Query +) -> Result>, AppError> { + // Business logic: Get the list of LFS files in the current branch + let mock_file = LFSFileMeta { + oid: "01ba4719...".to_string(), + symbolic_type: "*".to_string(), + path: "assets/image.png".to_string(), + size_human: params.size.then(|| "15.2 MB".to_string()) + }; + Ok(Json(vec![mock_file])) +} + +// Error handling infrastructure +#[derive(Debug)] +struct AppError(anyhow::Error); + +impl IntoResponse for AppError { + fn into_response(self) -> axum::response::Response { + ( + StatusCode::INTERNAL_SERVER_ERROR, + Json(HashMap::from([("error", self.0.to_string())])) + ).into_response() + } +} \ No newline at end of file diff --git a/scorpio/src/dicfuse/mod.rs b/scorpio/src/dicfuse/mod.rs index 6d40487f6..1cd7e9dfb 100644 --- a/scorpio/src/dicfuse/mod.rs +++ b/scorpio/src/dicfuse/mod.rs @@ -41,7 +41,7 @@ impl Dicfuse{ let name_os = OsString::from(&i.name); if name_os!=name{ continue; - }else if i.mode!=TreeItemMode::Blob{ + }else if i.mode!=TreeItemMode::Blob && i.mode!=TreeItemMode::BlobExecutable{ return Ok(()); } @@ -78,7 +78,7 @@ impl Dicfuse{ let client = Client::new(); for i in tree.tree_items{ //TODO & POS_BUG: how to deal with the link? - if i.mode==TreeItemMode::Commit || i.mode==TreeItemMode::Tree{ + if i.mode!=TreeItemMode::Blob && i.mode!=TreeItemMode::BlobExecutable{ continue; } let url = format!("http://localhost:8000/api/v1/file/blob/{}",i.id);//TODO: configabel. diff --git a/scorpio/src/dicfuse/tree_store.rs b/scorpio/src/dicfuse/tree_store.rs index 01139939f..7509417d2 100644 --- a/scorpio/src/dicfuse/tree_store.rs +++ b/scorpio/src/dicfuse/tree_store.rs @@ -22,6 +22,7 @@ pub struct StorageItem{ is_dir: bool , // True for Directory . children:Vec } +#[allow(unused)] impl StorageItem { pub fn get_inode(&self) -> u64{ self.inode diff --git a/scorpio/src/fuse/inode_alloc.rs b/scorpio/src/fuse/inode_alloc.rs index e88bf2783..443742308 100644 --- a/scorpio/src/fuse/inode_alloc.rs +++ b/scorpio/src/fuse/inode_alloc.rs @@ -18,6 +18,7 @@ pub struct InodeAlloc { alloc: Arc> >, } +#[allow(unused)] impl InodeAlloc{ pub fn new()-> Self{ InodeAlloc{ diff --git a/scorpio/src/fuse/mod.rs b/scorpio/src/fuse/mod.rs index 9cec9e9c4..bba4c577c 100644 --- a/scorpio/src/fuse/mod.rs +++ b/scorpio/src/fuse/mod.rs @@ -29,7 +29,7 @@ pub struct MegaFuse{ } - +#[allow(unused)] impl MegaFuse{ /// Creates a new instance of `MegaFuse` asynchronously. diff --git a/scorpio/src/lib.rs b/scorpio/src/lib.rs index c7fd60364..40f44c377 100644 --- a/scorpio/src/lib.rs +++ b/scorpio/src/lib.rs @@ -1,7 +1,7 @@ - #[macro_use] extern crate log; + pub mod passthrough; mod overlayfs; @@ -12,4 +12,4 @@ pub mod manager; pub mod server; pub mod daemon; //const VFS_MAX_INO: u64 = 0xff_ffff_ffff_ffff; -pub const READONLY_INODE :u64 = 0xffff_ffff; +const READONLY_INODE :u64 = 0xffff_ffff; diff --git a/scorpio/src/main.rs b/scorpio/src/main.rs index cefc483a7..5649733f7 100644 --- a/scorpio/src/main.rs +++ b/scorpio/src/main.rs @@ -11,11 +11,16 @@ // use scorpio::deamon::deamon_main; // use tokio::runtime::Handle; + use std::{ffi::OsStr, sync::Arc}; -use scorpio::{daemon::daemon_main, fuse::MegaFuse, manager::{fetch::CheckHash, ScorpioManager}, server::mount_filesystem}; +use scorpio::daemon::daemon_main; +use scorpio::fuse::MegaFuse; +use scorpio::manager::{fetch::CheckHash, ScorpioManager}; +use scorpio::server::mount_filesystem; use tokio::signal; -use scorpio::passthrough::logfs::LoggingFileSystem; +use scorpio::passthrough::newlogfs::LoggingFileSystem; + #[tokio::main] async fn main() { diff --git a/scorpio/src/manager/fetch.rs b/scorpio/src/manager/fetch.rs index 9744efc7b..7a5f576de 100644 --- a/scorpio/src/manager/fetch.rs +++ b/scorpio/src/manager/fetch.rs @@ -14,9 +14,12 @@ use crate::manager::store::store_trees; use crate::util::GPath; use super::{ScorpioManager, WorkDir}; + +#[allow(unused)] #[async_trait] pub trait CheckHash{ async fn check(&mut self); + async fn fetch+ std::marker::Send >(&mut self,inode:u64,monopath :P)-> WorkDir; } @@ -381,7 +384,7 @@ mod tests { let client = Client::new(); // Use the URL from environment variables or local test URL - let url = "http://localhost:8000/api/v1/file/blob/d12d12579799a658b29808fe695abd919a033ac9"; + let url = "http://localhost:8000/api/v1/file/blob/841b6fe34540e866e1f458d77b1bd03d3cb0e782"; // Send a GET request let response = client.get(url).send().await.unwrap(); diff --git a/scorpio/src/manager/push.rs b/scorpio/src/manager/push.rs index 73cc7df8b..b6500c295 100644 --- a/scorpio/src/manager/push.rs +++ b/scorpio/src/manager/push.rs @@ -33,6 +33,7 @@ pub async fn pack(commit:Commit,trees:Vec, blob:Vec) -> Vec{ pack_data } +#[allow(unused)] pub async fn push(path:PathBuf,monopath:PathBuf){ let mut lower = path.clone(); lower.push("lower"); diff --git a/scorpio/src/manager/store.rs b/scorpio/src/manager/store.rs index 261b8765d..fb768d2cc 100644 --- a/scorpio/src/manager/store.rs +++ b/scorpio/src/manager/store.rs @@ -26,6 +26,7 @@ impl TreeStore for sled::Db { Ok(decoded) } } +#[allow(unused)] pub trait CommitStore{ fn store_commit(&self,commit:Commit) -> Result<()>; fn get_commit(&self) -> Result; diff --git a/scorpio/src/overlayfs/async_io.rs b/scorpio/src/overlayfs/async_io.rs index 81fe17385..3d41e0cb9 100644 --- a/scorpio/src/overlayfs/async_io.rs +++ b/scorpio/src/overlayfs/async_io.rs @@ -849,6 +849,10 @@ impl Filesystem for OverlayFs{ let (layer, real_inode, real_handle) = self.find_real_info_from_handle(fh).await?; layer.lseek(req, real_inode, real_handle, offset, whence).await } + + async fn interrupt(&self,_req:Request,_unique:u64) -> Result<()> { + Ok(()) + } } #[cfg(test)] mod tests{ @@ -866,8 +870,8 @@ mod tests{ // Set up test environment let mountpoint= "/home/luxian/megatest/true_temp".to_string(); - let lowerdir= vec!["/home/luxian/megatest/lower".to_string()]; - let upperdir= "/home/luxian/megatest/uppder".to_string(); + let lowerdir= vec!["/home/luxian/megadir/store/5f70f0f460d92d73eac0ea09ef2edb3840bfc68f/lower".to_string()]; + let upperdir= "/home/luxian/megadir/store/5f70f0f460d92d73eac0ea09ef2edb3840bfc68f/upper".to_string(); let workdir= "/home/luxian/megatest/workerdir".to_string(); // Create lower layers diff --git a/scorpio/src/overlayfs/inode_store.rs b/scorpio/src/overlayfs/inode_store.rs index 80bec6033..f8d7d0dbf 100644 --- a/scorpio/src/overlayfs/inode_store.rs +++ b/scorpio/src/overlayfs/inode_store.rs @@ -130,7 +130,7 @@ impl InodeStore { |(inode, ovi)| { let path = ovi.path.clone(); async move { - (inode, path, ovi.lookups.load().await) // 等待 Future 完成 + (inode, path, ovi.lookups.load().await) // Read the Inode State. } } ).collect::>(); diff --git a/scorpio/src/overlayfs/mod.rs b/scorpio/src/overlayfs/mod.rs index 18f9d9b09..759932393 100644 --- a/scorpio/src/overlayfs/mod.rs +++ b/scorpio/src/overlayfs/mod.rs @@ -465,7 +465,6 @@ impl Drop for RealInode { let layer = Arc::clone(&self.layer); let inode = self.inode; tokio::spawn(async move { - // 异步清理逻辑 let ctx = Request::default(); layer.forget(ctx, inode, 1).await; }); diff --git a/scorpio/src/overlayfs/tempfile.rs b/scorpio/src/overlayfs/tempfile.rs index 91cd11717..5b09fcb40 100644 --- a/scorpio/src/overlayfs/tempfile.rs +++ b/scorpio/src/overlayfs/tempfile.rs @@ -153,7 +153,7 @@ impl TempFile { /// remove the file. Calling remove explicitly allows for better error /// handling. pub fn remove(&mut self) -> Result<()> { - fs::remove_file(&self.path).map_err(Error::from) + fs::remove_file(&self.path) } /// Returns the path to the file if the `TempFile` object that is wrapping the file diff --git a/scorpio/src/passthrough/async_io.rs b/scorpio/src/passthrough/async_io.rs index 33e1db124..4799a49b8 100644 --- a/scorpio/src/passthrough/async_io.rs +++ b/scorpio/src/passthrough/async_io.rs @@ -48,127 +48,114 @@ impl PassthroughFs { offset: u64, entry_list: & mut Vec> , ) -> io::Result<()> { - - const BUFFER_SIZE: usize = 4096 * 8 ; - let mut buf = Vec::::with_capacity(BUFFER_SIZE); + const BUFFER_SIZE: usize = 8192 ; + + let data = self.get_dirdata(handle, inode, libc::O_RDONLY).await?; - { - // Since we are going to work with the kernel offset, we have to acquire the file lock - // for both the `lseek64` and `getdents64` syscalls to ensure that no other thread - // changes the kernel offset while we are using it. - let (guard, dir) = data.get_file_mut().await; + + // Since we are going to work with the kernel offset, we have to acquire the file lock + // for both the `lseek64` and `getdents64` syscalls to ensure that no other thread + // changes the kernel offset while we are using it. + let (guard, dir) = data.get_file_mut().await; - // Safe because this doesn't modify any memory and we check the return value. - let res = - unsafe { libc::lseek64(dir.as_raw_fd(), offset as libc::off64_t, libc::SEEK_SET) }; - if res < 0 { - return Err(io::Error::last_os_error()); - } + // Safe because this doesn't modify any memory and we check the return value. + let res = + unsafe { libc::lseek64(dir.as_raw_fd(), offset as libc::off64_t, libc::SEEK_SET) }; + if res < 0 { + return Err(io::Error::last_os_error()); + } - // Safe because the kernel guarantees that it will only write to `buf` and we check the - // return value. - const BUFFER_SIZE: usize = 4096 * 8 ; - let res = unsafe { + // alloc buff ,pay attention to alian. + let mut buffer = vec![0u8; BUFFER_SIZE]; + + // Safe because this doesn't modify any memory and we check the return value. + let res = + unsafe { libc::lseek64(dir.as_raw_fd(), 0 as libc::off64_t, libc::SEEK_SET) }; + if res < 0 { + return Err(std::io::Error::last_os_error()); + } + loop { + + // call getdents64 system call + let result = unsafe { libc::syscall( libc::SYS_getdents64, dir.as_raw_fd(), - buf.as_mut_ptr() as *mut LinuxDirent64, + buffer.as_mut_ptr() as *mut LinuxDirent64, BUFFER_SIZE, ) }; - if res < 0 { - return Err(io::Error::last_os_error()); + + if result == -1 { + return Err(std::io::Error::last_os_error()); } - // Safe because we trust the value returned by kernel. - unsafe { buf.set_len(res as usize) }; + let bytes_read = result as usize; + if bytes_read == 0 { + break; // no more + } - // Explicitly drop the lock so that it's not held while we fill in the fuse buffer. - mem::drop(guard); - } + // push every entry . + let mut offset = 0; + while offset < bytes_read { + //let (front, back) = buffer.split_at(size_of::()); + //size_of::() + let front = &buffer[offset..offset+size_of::()]; + let back =&buffer[offset+size_of::()..]; - let mut rem = &buf[..]; - let orig_rem_len = rem.len(); - while !rem.is_empty() { - // We only use debug asserts here because these values are coming from the kernel and we - // trust them implicitly. - debug_assert!( - rem.len() >= size_of::(), - "fuse: not enough space left in `rem`" - ); - - let (front, back) = rem.split_at(size_of::()); - - let dirent64 = LinuxDirent64::from_slice(front) - .expect("fuse: unable to get LinuxDirent64 from slice"); - - let namelen = dirent64.d_reclen as usize - size_of::(); - debug_assert!( - namelen <= back.len(), - "fuse: back is smaller than `namelen`" - ); - - let name = &back[..namelen]; - let res = if name.starts_with(CURRENT_DIR_CSTR) || name.starts_with(PARENT_DIR_CSTR) { - // We don't want to report the "." and ".." entries. However, returning `Ok(0)` will - // break the loop so return `Ok` with a non-zero value instead. - Ok(1) - } else{ - // The Sys_getdents64 in kernel will pad the name with '\0' - // bytes up to 8-byte alignment, so @name may contain a few null - // terminators. This causes an extra lookup from fuse when - // called by readdirplus, because kernel path walking only takes - // name without null terminators, the dentry with more than 1 - // null terminators added by readdirplus doesn't satisfy the - // path walking. - let name = bytes_to_cstr(name) - .map_err(|e| { - error!("fuse: do_readdir: {:?}", e); - einval() - })? - .to_bytes(); - - let mut entry = DirectoryEntry{ - inode:dirent64.d_ino, - kind: filetype_from_mode((dirent64.d_ty as u16 * 0x1000u16).into()), - name: OsString::from_vec(name.to_vec()), - offset: dirent64.d_off , - }; - // Safe because do_readdir() has ensured dir_entry.name is a - // valid [u8] generated by CStr::to_bytes(). - let name = osstr_to_cstr(&entry.name)?; - - let _entry = self.do_lookup(inode, &name).await?; - let mut inodes = self.inode_map.inodes.write().await; - self.forget_one(&mut inodes, _entry.attr.ino, 1).await; - entry.inode = _entry.attr.ino; - - entry_list.push(Ok(entry)); - Ok(_entry.attr.size) + let dirent64 = LinuxDirent64::from_slice(front) + .expect("fuse: unable to get LinuxDirent64 from slice"); + + let namelen = dirent64.d_reclen as usize - size_of::(); + debug_assert!( + namelen <= back.len(), + "fuse: back is smaller than `namelen`" + ); - }; - - debug_assert!( - rem.len() >= dirent64.d_reclen as usize, - "fuse: rem is smaller than `d_reclen`" - ); - - match res { - Ok(0) => break, - Ok(_) => rem = &rem[dirent64.d_reclen as usize..], - // If there's an error, we can only signal it if we haven't - // stored any entries yet - otherwise we'd end up with wrong - // lookup counts for the entries that are already in the - // buffer. So we return what we've collected until that point. - Err(e) if rem.len() == orig_rem_len => return Err(e), - Err(_) => return Ok(()), + let name = &back[..namelen]; + if name.eq(CURRENT_DIR_CSTR) || name.eq(PARENT_DIR_CSTR) { + + offset += dirent64.d_reclen as usize; + continue; + } + let name = bytes_to_cstr(name) + .map_err(|e| { + error!("fuse: do_readdir: {:?}", e); + einval() + })? + .to_bytes(); + + let mut entry = DirectoryEntry{ + inode:dirent64.d_ino, + kind: filetype_from_mode((dirent64.d_ty as u16 * 0x1000u16).into()), + name: OsString::from_vec(name.to_vec()), + offset: dirent64.d_off , + }; + // Safe because do_readdir() has ensured dir_entry.name is a + // valid [u8] generated by CStr::to_bytes(). + let name = osstr_to_cstr(&entry.name)?; + debug!("readdir:{}",name.to_str().unwrap()); + let _entry = self.do_lookup(inode, &name).await?; + let mut inodes = self.inode_map.inodes.write().await; + self.forget_one(&mut inodes, _entry.attr.ino, 1).await; + entry.inode = _entry.attr.ino; + entry_list.push(Ok(entry)); + + // move to next entry + offset += dirent64.d_reclen as usize; } } + + + // Explicitly drop the lock so that it's not held while we fill in the fuse buffer. + mem::drop(guard); + Ok(()) } + async fn do_readdirplus( &self, inode: Inode, @@ -176,134 +163,118 @@ impl PassthroughFs { offset: u64, entry_list: & mut Vec> , ) -> io::Result<()> { - const BUFFER_SIZE: usize = 4096 * 8 ; - let mut buf = Vec::::with_capacity(BUFFER_SIZE); + const BUFFER_SIZE: usize = 8192 ; + + let data = self.get_dirdata(handle, inode, libc::O_RDONLY).await?; - { - // Since we are going to work with the kernel offset, we have to acquire the file lock - // for both the `lseek64` and `getdents64` syscalls to ensure that no other thread - // changes the kernel offset while we are using it. - let (guard, dir) = data.get_file_mut().await; + + // Since we are going to work with the kernel offset, we have to acquire the file lock + // for both the `lseek64` and `getdents64` syscalls to ensure that no other thread + // changes the kernel offset while we are using it. + let (guard, dir) = data.get_file_mut().await; - // Safe because this doesn't modify any memory and we check the return value. - let res = - unsafe { libc::lseek64(dir.as_raw_fd(), offset as libc::off64_t, libc::SEEK_SET) }; - if res < 0 { - return Err(io::Error::last_os_error()); - } + // Safe because this doesn't modify any memory and we check the return value. + let res = + unsafe { libc::lseek64(dir.as_raw_fd(), offset as libc::off64_t, libc::SEEK_SET) }; + if res < 0 { + return Err(io::Error::last_os_error()); + } - // Safe because the kernel guarantees that it will only write to `buf` and we check the - // return value. + // alloc buff ,pay attention to alian. + let mut buffer = vec![0u8; BUFFER_SIZE]; + + // Safe because this doesn't modify any memory and we check the return value. + let res = + unsafe { libc::lseek64(dir.as_raw_fd(), 0 as libc::off64_t, libc::SEEK_SET) }; + if res < 0 { + return Err(std::io::Error::last_os_error()); + } + loop { - let res = unsafe { + // call getdents64 system call + let result = unsafe { libc::syscall( libc::SYS_getdents64, dir.as_raw_fd(), - buf.as_mut_ptr() as *mut LinuxDirent64, + buffer.as_mut_ptr() as *mut LinuxDirent64, BUFFER_SIZE, ) }; - if res < 0 { - return Err(io::Error::last_os_error()); - } - // Safe because we trust the value returned by kernel. - unsafe { buf.set_len(res as usize) }; + if result == -1 { + return Err(std::io::Error::last_os_error()); + } - // Explicitly drop the lock so that it's not held while we fill in the fuse buffer. - mem::drop(guard); - } + let bytes_read = result as usize; + if bytes_read == 0 { + break; + } - let mut rem = &buf[..]; - let orig_rem_len = rem.len(); - while !rem.is_empty() { - // We only use debug asserts here because these values are coming from the kernel and we - // trust them implicitly. - debug_assert!( - rem.len() >= size_of::(), - "fuse: not enough space left in `rem`" - ); - - let (front, back) = rem.split_at(size_of::()); - - let dirent64 = LinuxDirent64::from_slice(front) - .expect("fuse: unable to get LinuxDirent64 from slice"); - - let namelen = dirent64.d_reclen as usize - size_of::(); - debug_assert!( - namelen <= back.len(), - "fuse: back is smaller than `namelen`" - ); - - let name = &back[..namelen]; - let res = if name.starts_with(CURRENT_DIR_CSTR) || name.starts_with(PARENT_DIR_CSTR) { - // We don't want to report the "." and ".." entries. However, returning `Ok(0)` will - // break the loop so return `Ok` with a non-zero value instead. - Ok(1) - } else{ - // The Sys_getdents64 in kernel will pad the name with '\0' - // bytes up to 8-byte alignment, so @name may contain a few null - // terminators. This causes an extra lookup from fuse when - // called by readdirplus, because kernel path walking only takes - // name without null terminators, the dentry with more than 1 - // null terminators added by readdirplus doesn't satisfy the - // path walking. - let name = bytes_to_cstr(name) - .map_err(|e| { - error!("fuse: do_readdir: {:?}", e); - einval() - })? - .to_bytes(); - - let mut entry = DirectoryEntry{ - inode:dirent64.d_ino, - kind: filetype_from_mode((dirent64.d_ty as u16 * 0x1000u16).into()), - name: OsString::from_vec(name.to_vec()), - offset: dirent64.d_off, - }; - // Safe because do_readdir() has ensured dir_entry.name is a - // valid [u8] generated by CStr::to_bytes(). - let name = osstr_to_cstr(&entry.name)?; - - let _entry = self.do_lookup(inode, &name).await?; - - entry.inode = _entry.attr.ino; - - entry_list.push(Ok( - DirectoryEntryPlus{ - inode: entry.inode, - generation: _entry.generation, - kind: entry.kind, - name: entry.name, - offset: entry.offset, - attr: _entry.attr, - entry_ttl: _entry.ttl, - attr_ttl: _entry.ttl, - } - )); - Ok(_entry.attr.size) + + let mut offset = 0; + while offset < bytes_read { + //size_of::() + let front = &buffer[offset..offset+size_of::()]; + let back =&buffer[offset+size_of::()..]; + //let (front, back) = buffer.split_at(size_of::()); + + let dirent64 = LinuxDirent64::from_slice(front) + .expect("fuse: unable to get LinuxDirent64 from slice"); + + let namelen = dirent64.d_reclen as usize - size_of::(); + debug_assert!( + namelen <= back.len(), + "fuse: back is smaller than `namelen`" + ); - }; + let name = &back[..namelen]; + // if name.starts_with(CURRENT_DIR_CSTR) || name.starts_with(PARENT_DIR_CSTR) { + + // offset += dirent64.d_reclen as usize; + // continue; + // } + let name = bytes_to_cstr(name) + .map_err(|e| { + error!("fuse: do_readdir: {:?}", e); + einval() + })? + .to_bytes(); + + let mut entry = DirectoryEntry{ + inode:dirent64.d_ino, + kind: filetype_from_mode((dirent64.d_ty as u16 * 0x1000u16).into()), + name: OsString::from_vec(name.to_vec()), + offset: dirent64.d_off , + }; + // Safe because do_readdir() has ensured dir_entry.name is a + // valid [u8] generated by CStr::to_bytes(). + let name = osstr_to_cstr(&entry.name)?; + debug!("readdir:{}",name.to_str().unwrap()); + let _entry = self.do_lookup(inode, &name).await?; + let mut inodes = self.inode_map.inodes.write().await; + self.forget_one(&mut inodes, _entry.attr.ino, 1).await; + entry.inode = _entry.attr.ino; + + entry_list.push(Ok( + DirectoryEntryPlus{ + inode: entry.inode, + generation: _entry.generation, + kind: entry.kind, + name: entry.name, + offset: entry.offset, + attr: _entry.attr, + entry_ttl: _entry.ttl, + attr_ttl: _entry.ttl, + } + )); + // add the offset. + offset += dirent64.d_reclen as usize; - debug_assert!( - rem.len() >= dirent64.d_reclen as usize, - "fuse: rem is smaller than `d_reclen`" - ); - - match res { - Ok(0) => break, - Ok(_) => rem = &rem[dirent64.d_reclen as usize..], - // If there's an error, we can only signal it if we haven't - // stored any entries yet - otherwise we'd end up with wrong - // lookup counts for the entries that are already in the - // buffer. So we return what we've collected until that point. - Err(e) if rem.len() == orig_rem_len => return Err(e), - Err(_) => return Ok(()), } } - + drop(guard); Ok(()) } diff --git a/scorpio/src/passthrough/logfs.rs b/scorpio/src/passthrough/logfs.rs index bb91577d7..bd1405aa9 100644 --- a/scorpio/src/passthrough/logfs.rs +++ b/scorpio/src/passthrough/logfs.rs @@ -28,9 +28,9 @@ impl LoggingFileSystem { impl Filesystem for LoggingFileSystem{ -type DirEntryStream<'a> = FS::DirEntryStream<'a> where Self:'a; + type DirEntryStream<'a> = FS::DirEntryStream<'a> where Self:'a; -type DirEntryPlusStream<'a> = FS::DirEntryPlusStream<'a> where Self:'a; + type DirEntryPlusStream<'a> = FS::DirEntryPlusStream<'a> where Self:'a; /// read directory entries, but with their attribute, like [`readdir`][Filesystem::readdir] /// + [`lookup`][Filesystem::lookup] at the same time. @@ -42,7 +42,7 @@ type DirEntryPlusStream<'a> = FS::DirEntryPlusStream<'a> where Self:'a; offset: u64, lock_owner: u64, ) -> Result>> { - println!("fs:{}, readdirplus: parent: {:?}, fh: {}, offset: {}", self.fsname, parent, fh, offset); + println!("fs:{}, [readdirplus]: parent: {:?}, fh: {}, offset: {}", self.fsname, parent, fh, offset); match self.inner.readdirplus(req, parent, fh, offset, lock_owner).await { Ok(reply) =>{ // println!("readdirplus result:{:?}",reply.entries.); @@ -56,567 +56,567 @@ type DirEntryPlusStream<'a> = FS::DirEntryPlusStream<'a> where Self:'a; } /// initialize filesystem. Called before any other filesystem method. -async fn init(&self, req: Request) -> Result { - println!("fs:{}, init ", self.fsname); - match self.inner.init(req).await { - Ok(reply) => Ok(reply), - Err(e) => { - println!("fs:{}, init error: {:?}", self.fsname, e); - Err(e) + async fn init(&self, req: Request) -> Result { + println!("fs:{}, init ", self.fsname); + match self.inner.init(req).await { + Ok(reply) => Ok(reply), + Err(e) => { + println!("fs:{}, init error: {:?}", self.fsname, e); + Err(e) + } } } -} -async fn destroy(&self, req: Request) { - println!("fs:{}, destroy ", self.fsname); - self.inner.destroy(req).await -} + async fn destroy(&self, req: Request) { + println!("fs:{}, destroy ", self.fsname); + self.inner.destroy(req).await + } -async fn lookup(&self, req: Request, parent: Inode, name: &OsStr) -> Result { - println!("fs:{}, lookup: parent: {:?}, name: {:?}", self.fsname, parent, name); - match self.inner.lookup(req, parent, name).await { - Ok(reply) => { - println!("look up result :{:?}",reply); - Ok(reply)}, - Err(e) => { - println!("fs:{}, lookup error: {:?}", self.fsname, e); - Err(e) + async fn lookup(&self, req: Request, parent: Inode, name: &OsStr) -> Result { + println!("fs:{}, lookup: parent: {:?}, name: {:?}", self.fsname, parent, name); + match self.inner.lookup(req, parent, name).await { + Ok(reply) => { + println!("look up result :{:?}",reply); + Ok(reply)}, + Err(e) => { + println!("fs:{}, lookup error: {:?}", self.fsname, e); + Err(e) + } } } -} -async fn forget(&self, req: Request, inode: Inode, nlookup: u64) { - println!("fs:{}, forget: inode: {:?}, nlookup: {}", self.fsname, inode, nlookup); - self.inner.forget(req, inode, nlookup).await -} + async fn forget(&self, req: Request, inode: Inode, nlookup: u64) { + println!("fs:{}, forget: inode: {:?}, nlookup: {}", self.fsname, inode, nlookup); + self.inner.forget(req, inode, nlookup).await + } -async fn getattr(&self, req: Request, inode: Inode, fh: Option, flags: u32) -> Result { - println!("fs:{}, getattr: inode: {:?}, fh: {:?}, flags: {}", self.fsname, inode, fh, flags); - match self.inner.getattr(req, inode, fh, flags).await { - Ok(reply) =>{ - println!("getattr result :{:?}",reply); - Ok(reply)}, - Err(e) => { - println!("fs:{}, getattr error: {:?}", self.fsname, e); - Err(e) + async fn getattr(&self, req: Request, inode: Inode, fh: Option, flags: u32) -> Result { + println!("fs:{}, getattr: inode: {:?}, fh: {:?}, flags: {}", self.fsname, inode, fh, flags); + match self.inner.getattr(req, inode, fh, flags).await { + Ok(reply) =>{ + println!("getattr result :{:?}",reply); + Ok(reply)}, + Err(e) => { + println!("fs:{}, getattr error: {:?}", self.fsname, e); + Err(e) + } } } -} -async fn setattr(&self, req: Request, inode: Inode, fh: Option, set_attr: SetAttr) -> Result { - println!("fs:{}, setattr: inode: {:?}, fh: {:?}, set_attr: {:?}", self.fsname, inode, fh, set_attr); - match self.inner.setattr(req, inode, fh, set_attr).await { - Ok(reply) => Ok(reply), - Err(e) => { - println!("fs:{}, setattr error: {:?}", self.fsname, e); - Err(e) + async fn setattr(&self, req: Request, inode: Inode, fh: Option, set_attr: SetAttr) -> Result { + println!("fs:{}, setattr: inode: {:?}, fh: {:?}, set_attr: {:?}", self.fsname, inode, fh, set_attr); + match self.inner.setattr(req, inode, fh, set_attr).await { + Ok(reply) => Ok(reply), + Err(e) => { + println!("fs:{}, setattr error: {:?}", self.fsname, e); + Err(e) + } } } -} -async fn readlink(&self, req: Request, inode: Inode) -> Result { - println!("fs:{}, readlink: inode: {:?}", self.fsname, inode); - match self.inner.readlink(req, inode).await { - Ok(reply) => Ok(reply), - Err(e) => { - println!("fs:{}, readlink error: {:?}", self.fsname, e); - Err(e) + async fn readlink(&self, req: Request, inode: Inode) -> Result { + println!("fs:{}, readlink: inode: {:?}", self.fsname, inode); + match self.inner.readlink(req, inode).await { + Ok(reply) => Ok(reply), + Err(e) => { + println!("fs:{}, readlink error: {:?}", self.fsname, e); + Err(e) + } } } -} -async fn symlink(&self, req: Request, parent: Inode, name: &OsStr, link: &OsStr) -> Result { - println!("fs:{}, symlink: parent: {:?}, name: {:?}, link: {:?}", self.fsname, parent, name, link); - match self.inner.symlink(req, parent, name, link).await { - Ok(reply) => Ok(reply), - Err(e) => { - println!("fs:{}, symlink error: {:?}", self.fsname, e); - Err(e) + async fn symlink(&self, req: Request, parent: Inode, name: &OsStr, link: &OsStr) -> Result { + println!("fs:{}, symlink: parent: {:?}, name: {:?}, link: {:?}", self.fsname, parent, name, link); + match self.inner.symlink(req, parent, name, link).await { + Ok(reply) => Ok(reply), + Err(e) => { + println!("fs:{}, symlink error: {:?}", self.fsname, e); + Err(e) + } } } -} -async fn mknod(&self, req: Request, parent: Inode, name: &OsStr, mode: u32, rdev: u32) -> Result { - println!("fs:{}, mknod: parent: {:?}, name: {:?}, mode: {}, rdev: {}", self.fsname, parent, name, mode, rdev); - match self.inner.mknod(req, parent, name, mode, rdev).await { - Ok(reply) => Ok(reply), - Err(e) => { - println!("fs:{}, mknod error: {:?}", self.fsname, e); - Err(e) + async fn mknod(&self, req: Request, parent: Inode, name: &OsStr, mode: u32, rdev: u32) -> Result { + println!("fs:{}, mknod: parent: {:?}, name: {:?}, mode: {}, rdev: {}", self.fsname, parent, name, mode, rdev); + match self.inner.mknod(req, parent, name, mode, rdev).await { + Ok(reply) => Ok(reply), + Err(e) => { + println!("fs:{}, mknod error: {:?}", self.fsname, e); + Err(e) + } } } -} -async fn mkdir(&self, req: Request, parent: Inode, name: &OsStr, mode: u32, umask: u32) -> Result { - println!("fs:{}, mkdir: parent: {:?}, name: {:?}, mode: {}, umask: {}", self.fsname, parent, name, mode, umask); - match self.inner.mkdir(req, parent, name, mode, umask).await { - Ok(reply) => Ok(reply), - Err(e) => { - println!("fs:{}, mkdir error: {:?}", self.fsname, e); - Err(e) + async fn mkdir(&self, req: Request, parent: Inode, name: &OsStr, mode: u32, umask: u32) -> Result { + println!("fs:{}, mkdir: parent: {:?}, name: {:?}, mode: {}, umask: {}", self.fsname, parent, name, mode, umask); + match self.inner.mkdir(req, parent, name, mode, umask).await { + Ok(reply) => Ok(reply), + Err(e) => { + println!("fs:{}, mkdir error: {:?}", self.fsname, e); + Err(e) + } } } -} -async fn unlink(&self, req: Request, parent: Inode, name: &OsStr) -> Result<()> { - println!("fs:{}, unlink: parent: {:?}, name: {:?}", self.fsname, parent, name); - match self.inner.unlink(req, parent, name).await { - Ok(()) => Ok(()), - Err(e) => { - println!("fs:{}, unlink error: {:?}", self.fsname, e); - Err(e) + async fn unlink(&self, req: Request, parent: Inode, name: &OsStr) -> Result<()> { + println!("fs:{}, unlink: parent: {:?}, name: {:?}", self.fsname, parent, name); + match self.inner.unlink(req, parent, name).await { + Ok(()) => Ok(()), + Err(e) => { + println!("fs:{}, unlink error: {:?}", self.fsname, e); + Err(e) + } } } -} -async fn rmdir(&self, req: Request, parent: Inode, name: &OsStr) -> Result<()> { - println!("fs:{}, rmdir: parent: {:?}, name: {:?}", self.fsname, parent, name); - match self.inner.rmdir(req, parent, name).await { - Ok(()) => Ok(()), - Err(e) => { - println!("fs:{}, rmdir error: {:?}", self.fsname, e); - Err(e) + async fn rmdir(&self, req: Request, parent: Inode, name: &OsStr) -> Result<()> { + println!("fs:{}, rmdir: parent: {:?}, name: {:?}", self.fsname, parent, name); + match self.inner.rmdir(req, parent, name).await { + Ok(()) => Ok(()), + Err(e) => { + println!("fs:{}, rmdir error: {:?}", self.fsname, e); + Err(e) + } } } -} -async fn rename(&self, req: Request, parent: Inode, name: &OsStr, new_parent: Inode, new_name: &OsStr) -> Result<()> { - println!("fs:{}, rename: parent: {:?}, name: {:?}, new_parent: {:?}, new_name: {:?}", self.fsname, parent, name, new_parent, new_name); - match self.inner.rename(req, parent, name, new_parent, new_name).await { - Ok(()) => Ok(()), - Err(e) => { - println!("fs:{}, rename error: {:?}", self.fsname, e); - Err(e) + async fn rename(&self, req: Request, parent: Inode, name: &OsStr, new_parent: Inode, new_name: &OsStr) -> Result<()> { + println!("fs:{}, rename: parent: {:?}, name: {:?}, new_parent: {:?}, new_name: {:?}", self.fsname, parent, name, new_parent, new_name); + match self.inner.rename(req, parent, name, new_parent, new_name).await { + Ok(()) => Ok(()), + Err(e) => { + println!("fs:{}, rename error: {:?}", self.fsname, e); + Err(e) + } } } -} -async fn link(&self, req: Request, inode: Inode, new_parent: Inode, new_name: &OsStr) -> Result { - println!("fs:{}, link: inode: {:?}, new_parent: {:?}, new_name: {:?}", self.fsname, inode, new_parent, new_name); - match self.inner.link(req, inode, new_parent, new_name).await { - Ok(reply) => Ok(reply), - Err(e) => { - println!("fs:{}, link error: {:?}", self.fsname, e); - Err(e) + async fn link(&self, req: Request, inode: Inode, new_parent: Inode, new_name: &OsStr) -> Result { + println!("fs:{}, link: inode: {:?}, new_parent: {:?}, new_name: {:?}", self.fsname, inode, new_parent, new_name); + match self.inner.link(req, inode, new_parent, new_name).await { + Ok(reply) => Ok(reply), + Err(e) => { + println!("fs:{}, link error: {:?}", self.fsname, e); + Err(e) + } } } -} -async fn open(&self, req: Request, inode: Inode, flags: u32) -> Result { - println!("fs:{}, open: inode: {:?}, flags: {}", self.fsname, inode, flags); - match self.inner.open(req, inode, flags).await { - Ok(reply) => Ok(reply), - Err(e) => { - println!("fs:{}, open error: {:?}", self.fsname, e); - Err(e) + async fn open(&self, req: Request, inode: Inode, flags: u32) -> Result { + println!("fs:{}, open: inode: {:?}, flags: {}", self.fsname, inode, flags); + match self.inner.open(req, inode, flags).await { + Ok(reply) => Ok(reply), + Err(e) => { + println!("fs:{}, open error: {:?}", self.fsname, e); + Err(e) + } } } -} -async fn read(&self, req: Request, inode: Inode, fh: u64, offset: u64, size: u32) -> Result { - println!("fs:{}, read: inode: {:?}, fh: {}, offset: {}, size: {}", self.fsname, inode, fh, offset, size); - match self.inner.read(req, inode, fh, offset, size).await { - Ok(reply) => Ok(reply), - Err(e) => { - println!("fs:{}, read error: {:?}", self.fsname, e); - Err(e) + async fn read(&self, req: Request, inode: Inode, fh: u64, offset: u64, size: u32) -> Result { + println!("fs:{}, read: inode: {:?}, fh: {}, offset: {}, size: {}", self.fsname, inode, fh, offset, size); + match self.inner.read(req, inode, fh, offset, size).await { + Ok(reply) => Ok(reply), + Err(e) => { + println!("fs:{}, read error: {:?}", self.fsname, e); + Err(e) + } } } -} -async fn write(&self, req: Request, inode: Inode, fh: u64, offset: u64, data: &[u8], write_flags: u32, flags: u32) -> Result { - println!("fs:{}, write: inode: {:?}, fh: {}, offset: {}, size: {}", self.fsname, inode, fh, offset, data.len()); - match self.inner.write(req, inode, fh, offset, data, write_flags, flags).await { - Ok(reply) => Ok(reply), - Err(e) => { - println!("fs:{}, write error: {:?}", self.fsname, e); - Err(e) + async fn write(&self, req: Request, inode: Inode, fh: u64, offset: u64, data: &[u8], write_flags: u32, flags: u32) -> Result { + println!("fs:{}, write: inode: {:?}, fh: {}, offset: {}, size: {}", self.fsname, inode, fh, offset, data.len()); + match self.inner.write(req, inode, fh, offset, data, write_flags, flags).await { + Ok(reply) => Ok(reply), + Err(e) => { + println!("fs:{}, write error: {:?}", self.fsname, e); + Err(e) + } } } -} -async fn statfs(&self, req: Request, inode: Inode) -> Result { - println!("fs:{}, statfs: inode: {:?}", self.fsname, inode); - match self.inner.statfs(req, inode).await { - Ok(reply) => Ok(reply), - Err(e) => { - println!("fs:{}, statfs error: {:?}", self.fsname, e); - Err(e) + async fn statfs(&self, req: Request, inode: Inode) -> Result { + println!("fs:{}, statfs: inode: {:?}", self.fsname, inode); + match self.inner.statfs(req, inode).await { + Ok(reply) => Ok(reply), + Err(e) => { + println!("fs:{}, statfs error: {:?}", self.fsname, e); + Err(e) + } } } -} -async fn release(&self, req: Request, inode: Inode, fh: u64, flags: u32, lock_owner: u64, flush: bool) -> Result<()> { - println!("fs:{}, release: inode: {:?}, fh: {}, flags: {}, lock_owner: {}, flush: {}", self.fsname, inode, fh, flags, lock_owner, flush); - match self.inner.release(req, inode, fh, flags, lock_owner, flush).await { - Ok(()) => Ok(()), - Err(e) => { - println!("fs:{}, release error: {:?}", self.fsname, e); - Err(e) + async fn release(&self, req: Request, inode: Inode, fh: u64, flags: u32, lock_owner: u64, flush: bool) -> Result<()> { + println!("fs:{}, release: inode: {:?}, fh: {}, flags: {}, lock_owner: {}, flush: {}", self.fsname, inode, fh, flags, lock_owner, flush); + match self.inner.release(req, inode, fh, flags, lock_owner, flush).await { + Ok(()) => Ok(()), + Err(e) => { + println!("fs:{}, release error: {:?}", self.fsname, e); + Err(e) + } } } -} -async fn fsync(&self, req: Request, inode: Inode, fh: u64, datasync: bool) -> Result<()> { - println!("fs:{}, fsync: inode: {:?}, fh: {}, datasync: {}", self.fsname, inode, fh, datasync); - match self.inner.fsync(req, inode, fh, datasync).await { - Ok(()) => Ok(()), - Err(e) => { - println!("fs:{}, fsync error: {:?}", self.fsname, e); - Err(e) + async fn fsync(&self, req: Request, inode: Inode, fh: u64, datasync: bool) -> Result<()> { + println!("fs:{}, fsync: inode: {:?}, fh: {}, datasync: {}", self.fsname, inode, fh, datasync); + match self.inner.fsync(req, inode, fh, datasync).await { + Ok(()) => Ok(()), + Err(e) => { + println!("fs:{}, fsync error: {:?}", self.fsname, e); + Err(e) + } } } -} -async fn setxattr(&self, req: Request, inode: Inode, name: &OsStr, value: &[u8], flags: u32, position: u32,) -> Result<()> { - println!("fs:{}, setxattr: inode: {:?}, name: {:?}, value_size: {}, flags: {}", self.fsname, inode, name, value.len(), flags); - match self.inner.setxattr(req, inode, name, value, flags, position).await { - Ok(()) => Ok(()), - Err(e) => { - println!("fs:{}, setxattr error: {:?}", self.fsname, e); - Err(e) + async fn setxattr(&self, req: Request, inode: Inode, name: &OsStr, value: &[u8], flags: u32, position: u32,) -> Result<()> { + println!("fs:{}, setxattr: inode: {:?}, name: {:?}, value_size: {}, flags: {}", self.fsname, inode, name, value.len(), flags); + match self.inner.setxattr(req, inode, name, value, flags, position).await { + Ok(()) => Ok(()), + Err(e) => { + println!("fs:{}, setxattr error: {:?}", self.fsname, e); + Err(e) + } } } -} -async fn getxattr(&self, req: Request, inode: Inode, name: &OsStr, size: u32) -> Result { - println!("fs:{}, getxattr: inode: {:?}, name: {:?}, size: {}", self.fsname, inode, name, size); - match self.inner.getxattr(req, inode, name, size).await { - Ok(reply) => Ok(reply), - Err(e) => { - println!("fs:{}, getxattr error: {:?}", self.fsname, e); - Err(e) + async fn getxattr(&self, req: Request, inode: Inode, name: &OsStr, size: u32) -> Result { + println!("fs:{}, getxattr: inode: {:?}, name: {:?}, size: {}", self.fsname, inode, name, size); + match self.inner.getxattr(req, inode, name, size).await { + Ok(reply) => Ok(reply), + Err(e) => { + println!("fs:{}, getxattr error: {:?}", self.fsname, e); + Err(e) + } } } -} -/// List extended attribute names. -async fn listxattr(&self, req: Request, inode: Inode, size: u32) -> Result { - println!("fs:{}, listxattr: inode: {:?}, size: {}", self.fsname, inode, size); - match self.inner.listxattr(req, inode, size).await { - Ok(reply) => Ok(reply), - Err(e) => { - println!("fs:{}, listxattr error: {:?}", self.fsname, e); - Err(e) + /// List extended attribute names. + async fn listxattr(&self, req: Request, inode: Inode, size: u32) -> Result { + println!("fs:{}, listxattr: inode: {:?}, size: {}", self.fsname, inode, size); + match self.inner.listxattr(req, inode, size).await { + Ok(reply) => Ok(reply), + Err(e) => { + println!("fs:{}, listxattr error: {:?}", self.fsname, e); + Err(e) + } } } -} -/// remove an extended attribute. -async fn removexattr(&self, req: Request, inode: Inode, name: &OsStr) -> Result<()> { - println!("fs:{}, removexattr: inode: {:?}, name: {:?}", self.fsname, inode, name); - match self.inner.removexattr(req, inode, name).await { - Ok(()) => Ok(()), - Err(e) => { - println!("fs:{}, removexattr error: {:?}", self.fsname, e); - Err(e) + /// remove an extended attribute. + async fn removexattr(&self, req: Request, inode: Inode, name: &OsStr) -> Result<()> { + println!("fs:{}, removexattr: inode: {:?}, name: {:?}", self.fsname, inode, name); + match self.inner.removexattr(req, inode, name).await { + Ok(()) => Ok(()), + Err(e) => { + println!("fs:{}, removexattr error: {:?}", self.fsname, e); + Err(e) + } } } -} -/// flush method. This is called on each `close()` of the opened file. -async fn flush(&self, req: Request, inode: Inode, fh: u64, lock_owner: u64) -> Result<()> { - println!("fs:{}, flush: inode: {:?}, fh: {}, lock_owner: {}", self.fsname, inode, fh, lock_owner); - match self.inner.flush(req, inode, fh, lock_owner).await { - Ok(()) => Ok(()), - Err(e) => { - println!("fs:{}, flush error: {:?}", self.fsname, e); - Err(e) + /// flush method. This is called on each `close()` of the opened file. + async fn flush(&self, req: Request, inode: Inode, fh: u64, lock_owner: u64) -> Result<()> { + println!("fs:{}, flush: inode: {:?}, fh: {}, lock_owner: {}", self.fsname, inode, fh, lock_owner); + match self.inner.flush(req, inode, fh, lock_owner).await { + Ok(()) => Ok(()), + Err(e) => { + println!("fs:{}, flush error: {:?}", self.fsname, e); + Err(e) + } } } -} -/// open a directory. -async fn opendir(&self, req: Request, inode: Inode, flags: u32) -> Result { - - match self.inner.opendir(req, inode, flags).await { - Ok(reply) =>{ - println!("fs:{}, opendir: inode: {:?}, flags: {} --- return fh:{}", self.fsname, inode, flags,reply.fh); - Ok(reply)}, - Err(e) => { - println!("fs:{}, opendir error: {:?}", self.fsname, e); - Err(e) + /// open a directory. + async fn opendir(&self, req: Request, inode: Inode, flags: u32) -> Result { + + match self.inner.opendir(req, inode, flags).await { + Ok(reply) =>{ + println!("fs:{}, opendir: inode: {:?}, flags: {} --- return fh:{}", self.fsname, inode, flags,reply.fh); + Ok(reply)}, + Err(e) => { + println!("fs:{}, opendir error: {:?}", self.fsname, e); + Err(e) + } } } -} -/// read directory. -async fn readdir( - &self, - req: Request, - parent: Inode, - fh: u64, - offset: i64, -) -> Result>> { - println!("fs:{}, readdir: parent: {:?}, fh: {}, offset: {}", self.fsname, parent, fh, offset); - match self.inner.readdir(req, parent, fh, offset).await { - Ok(reply) => Ok(reply), - Err(e) => { - println!("fs:{}, readdir error: {:?}", self.fsname, e); - Err(e) + /// read directory. + async fn readdir( + &self, + req: Request, + parent: Inode, + fh: u64, + offset: i64, + ) -> Result>> { + println!("fs:{}, readdir: parent: {:?}, fh: {}, offset: {}", self.fsname, parent, fh, offset); + match self.inner.readdir(req, parent, fh, offset).await { + Ok(reply) => Ok(reply), + Err(e) => { + println!("fs:{}, readdir error: {:?}", self.fsname, e); + Err(e) + } + } + } + + /// release an open directory. + async fn releasedir(&self, req: Request, inode: Inode, fh: u64, flags: u32) -> Result<()> { + println!("fs:{}, releasedir: inode: {:?}, fh: {}, flags: {}", self.fsname, inode, fh, flags); + match self.inner.releasedir(req, inode, fh, flags).await { + Ok(()) => Ok(()), + Err(e) => { + println!("fs:{}, releasedir error: {:?}", self.fsname, e); + Err(e) + } } } -} -/// release an open directory. -async fn releasedir(&self, req: Request, inode: Inode, fh: u64, flags: u32) -> Result<()> { - println!("fs:{}, releasedir: inode: {:?}, fh: {}, flags: {}", self.fsname, inode, fh, flags); - match self.inner.releasedir(req, inode, fh, flags).await { + /// synchronize directory contents. + async fn fsyncdir(&self, req: Request, inode: Inode, fh: u64, datasync: bool) -> Result<()> { + println!("fs:{}, fsyncdir: inode: {:?}, fh: {}, datasync: {}", self.fsname, inode, fh, datasync); + match self.inner.fsyncdir(req, inode, fh, datasync).await { + Ok(()) => Ok(()), + Err(e) => { + println!("fs:{}, fsyncdir error: {:?}", self.fsname, e); + Err(e) + } + } + } + + + /// check file access permissions. This will be called for the `access()` system call. If the + /// `default_permissions` mount option is given, this method is not be called. This method is + /// not called under Linux kernel versions 2.4.x. + async fn access(&self, req: Request, inode: Inode, mask: u32) -> Result<()> { + + println!("fs:{}, access: inode: {:?}, mask: {}", self.fsname, inode, mask); + match self.inner.access(req, inode, mask).await { + Ok(()) => Ok(()), + Err(e) => { + println!("fs:{}, access error: {:?}", self.fsname, e); + Err(e) + } + } + } + + /// create and open a file. If the file does not exist, first create it with the specified + /// mode, and then open it. Open flags (with the exception of `O_NOCTTY`) are available in + /// flags. Filesystem may store an arbitrary file handle (pointer, index, etc) in `fh`, and use + /// this in other all other file operations ([`read`][Filesystem::read], + /// [`write`][Filesystem::write], [`flush`][Filesystem::flush], + /// [`release`][Filesystem::release], [`fsync`][Filesystem::fsync]). There are also some flags + /// (`direct_io`, `keep_cache`) which the filesystem may set, to change the way the file is + /// opened. If this method is not implemented or under Linux kernel versions earlier than + /// 2.6.15, the [`mknod`][Filesystem::mknod] and [`open`][Filesystem::open] methods will be + /// called instead. + /// + /// # Notes: + /// + /// See `fuse_file_info` structure in + /// [fuse_common.h](https://libfuse.github.io/doxygen/include_2fuse__common_8h_source.html) for + /// more details. + async fn create( + &self, + req: Request, + parent: Inode, + name: &OsStr, + mode: u32, + flags: u32, + ) -> Result { + println!("fs:{}, create: parnet: {}; name :{},mode:{},flags:{}", self.fsname, parent,name.to_str().unwrap_or_default(),mode,flags); + let reply = self.inner.create(req, parent, name, mode, flags).await?; + Ok(reply) + } + + /// handle interrupt. When a operation is interrupted, an interrupt request will send to fuse + /// server with the unique id of the operation. + async fn interrupt(&self, req: Request, unique: u64) -> Result<()> { + + println!("fs:{}, interrupt: unique: {}", self.fsname, unique); + match self.inner.interrupt(req, unique).await { Ok(()) => Ok(()), Err(e) => { - println!("fs:{}, releasedir error: {:?}", self.fsname, e); - Err(e) + println!("fs:{}, interrupt error: {:?}", self.fsname, e); + Err(e) } } -} + } -/// synchronize directory contents. -async fn fsyncdir(&self, req: Request, inode: Inode, fh: u64, datasync: bool) -> Result<()> { - println!("fs:{}, fsyncdir: inode: {:?}, fh: {}, datasync: {}", self.fsname, inode, fh, datasync); - match self.inner.fsyncdir(req, inode, fh, datasync).await { - Ok(()) => Ok(()), + /// map block index within file to block index within device. + /// + /// # Notes: + /// + /// This may not works because currently this crate doesn't support fuseblk mode yet. + async fn bmap( + &self, + req: Request, + inode: Inode, + blocksize: u32, + idx: u64, + ) -> Result { + match self.inner.bmap(req, inode, blocksize, idx).await { + Ok(reply) => Ok(reply), Err(e) => { - println!("fs:{}, fsyncdir error: {:?}", self.fsname, e); + println!("fs:{}, bmap error: {:?}", self.fsname, e); Err(e) } } -} + } + /*async fn ioctl( + &self, + req: Request, + inode: Inode, + fh: u64, + flags: u32, + cmd: u32, + arg: u64, + in_size: u32, + out_size: u32, + ) -> Result { + Err(libc::ENOSYS.into()) + }*/ + + /// poll for IO readiness events. + #[allow(clippy::too_many_arguments)] + async fn poll( + &self, + req: Request, + inode: Inode, + fh: u64, + kh: Option, + flags: u32, + events: u32, + notify: &Notify, + ) -> Result { + + match self.inner.poll(req, inode, fh, kh, flags, events, notify).await { + Ok(reply) => Ok(reply), + Err(e) => { + println!("fs:{}, poll error: {:?}", self.fsname, e); + Err(e) + } + } + } - /// check file access permissions. This will be called for the `access()` system call. If the - /// `default_permissions` mount option is given, this method is not be called. This method is - /// not called under Linux kernel versions 2.4.x. - async fn access(&self, req: Request, inode: Inode, mask: u32) -> Result<()> { + /// receive notify reply from kernel. + async fn notify_reply( + &self, + req: Request, + inode: Inode, + offset: u64, + data: Bytes, + ) -> Result<()> { - println!("fs:{}, access: inode: {:?}, mask: {}", self.fsname, inode, mask); - match self.inner.access(req, inode, mask).await { + println!("fs:{}, notify_reply: inode: {:?}, offset: {}, data: {:?}", self.fsname, inode, offset, data); + match self.inner.notify_reply(req, inode, offset, data).await { Ok(()) => Ok(()), Err(e) => { - println!("fs:{}, access error: {:?}", self.fsname, e); + println!("fs:{}, notify_reply error: {:?}", self.fsname, e); Err(e) } } - } - - /// create and open a file. If the file does not exist, first create it with the specified - /// mode, and then open it. Open flags (with the exception of `O_NOCTTY`) are available in - /// flags. Filesystem may store an arbitrary file handle (pointer, index, etc) in `fh`, and use - /// this in other all other file operations ([`read`][Filesystem::read], - /// [`write`][Filesystem::write], [`flush`][Filesystem::flush], - /// [`release`][Filesystem::release], [`fsync`][Filesystem::fsync]). There are also some flags - /// (`direct_io`, `keep_cache`) which the filesystem may set, to change the way the file is - /// opened. If this method is not implemented or under Linux kernel versions earlier than - /// 2.6.15, the [`mknod`][Filesystem::mknod] and [`open`][Filesystem::open] methods will be - /// called instead. - /// - /// # Notes: - /// - /// See `fuse_file_info` structure in - /// [fuse_common.h](https://libfuse.github.io/doxygen/include_2fuse__common_8h_source.html) for - /// more details. - async fn create( - &self, - req: Request, - parent: Inode, - name: &OsStr, - mode: u32, - flags: u32, - ) -> Result { - println!("fs:{}, create: parnet: {}; name :{},mode:{},flags:{}", self.fsname, parent,name.to_str().unwrap_or_default(),mode,flags); - let reply = self.inner.create(req, parent, name, mode, flags).await?; - Ok(reply) - } - - /// handle interrupt. When a operation is interrupted, an interrupt request will send to fuse - /// server with the unique id of the operation. - async fn interrupt(&self, req: Request, unique: u64) -> Result<()> { - -println!("fs:{}, interrupt: unique: {}", self.fsname, unique); -match self.inner.interrupt(req, unique).await { - Ok(()) => Ok(()), - Err(e) => { - println!("fs:{}, interrupt error: {:?}", self.fsname, e); - Err(e) } -} - } - - /// map block index within file to block index within device. - /// - /// # Notes: - /// - /// This may not works because currently this crate doesn't support fuseblk mode yet. - async fn bmap( - &self, - req: Request, - inode: Inode, - blocksize: u32, - idx: u64, - ) -> Result { -match self.inner.bmap(req, inode, blocksize, idx).await { - Ok(reply) => Ok(reply), - Err(e) => { - println!("fs:{}, bmap error: {:?}", self.fsname, e); - Err(e) + + /// forget more than one inode. This is a batch version [`forget`][Filesystem::forget] + async fn batch_forget(&self, req: Request, inodes: &[Inode]) { + let _ = self.inner.batch_forget(req, inodes).await; } -} - } - - /*async fn ioctl( - &self, - req: Request, - inode: Inode, - fh: u64, - flags: u32, - cmd: u32, - arg: u64, - in_size: u32, - out_size: u32, - ) -> Result { - Err(libc::ENOSYS.into()) - }*/ - - /// poll for IO readiness events. - #[allow(clippy::too_many_arguments)] - async fn poll( - &self, - req: Request, - inode: Inode, - fh: u64, - kh: Option, - flags: u32, - events: u32, - notify: &Notify, - ) -> Result { - - match self.inner.poll(req, inode, fh, kh, flags, events, notify).await { - Ok(reply) => Ok(reply), - Err(e) => { - println!("fs:{}, poll error: {:?}", self.fsname, e); - Err(e) + + /// allocate space for an open file. This function ensures that required space is allocated for + /// specified file. + /// + /// # Notes: + /// + /// more information about `fallocate`, please see **`man 2 fallocate`** + async fn fallocate( + &self, + req: Request, + inode: Inode, + fh: u64, + offset: u64, + length: u64, + mode: u32, + ) -> Result<()> { + println!("fs:{}, fallocate: inode: {:?}, fh: {}, offset: {}, length: {}, mode: {}", self.fsname, inode, fh, offset, length, mode); + match self.inner.fallocate(req, inode, fh, offset, length, mode).await { + Ok(()) => Ok(()), + Err(e) => { + println!("fs:{}, fallocate error: {:?}", self.fsname, e); + Err(e) + } } } - } - - /// receive notify reply from kernel. - async fn notify_reply( - &self, - req: Request, - inode: Inode, - offset: u64, - data: Bytes, - ) -> Result<()> { - -println!("fs:{}, notify_reply: inode: {:?}, offset: {}, data: {:?}", self.fsname, inode, offset, data); -match self.inner.notify_reply(req, inode, offset, data).await { - Ok(()) => Ok(()), - Err(e) => { - println!("fs:{}, notify_reply error: {:?}", self.fsname, e); - Err(e) - } -} - } - - /// forget more than one inode. This is a batch version [`forget`][Filesystem::forget] - async fn batch_forget(&self, req: Request, inodes: &[Inode]) { - let _ = self.inner.batch_forget(req, inodes).await; - } - - /// allocate space for an open file. This function ensures that required space is allocated for - /// specified file. - /// - /// # Notes: - /// - /// more information about `fallocate`, please see **`man 2 fallocate`** - async fn fallocate( - &self, - req: Request, - inode: Inode, - fh: u64, - offset: u64, - length: u64, - mode: u32, - ) -> Result<()> { - println!("fs:{}, fallocate: inode: {:?}, fh: {}, offset: {}, length: {}, mode: {}", self.fsname, inode, fh, offset, length, mode); - match self.inner.fallocate(req, inode, fh, offset, length, mode).await { + + /// rename a file or directory with flags. + async fn rename2( + &self, + req: Request, + parent: Inode, + name: &OsStr, + new_parent: Inode, + new_name: &OsStr, + flags: u32, + ) -> Result<()> { + println!("fs:{}, rename2: parent: {:?}, name: {:?}, new_parent: {:?}, new_name: {:?}, flags: {}", + self.fsname, parent, name, new_parent, new_name, flags); + + match self.inner.rename2(req, parent, name, new_parent, new_name, flags).await { Ok(()) => Ok(()), Err(e) => { - println!("fs:{}, fallocate error: {:?}", self.fsname, e); + println!("fs:{}, rename2 error: {:?}", self.fsname, e); Err(e) } } - } - - /// rename a file or directory with flags. - async fn rename2( - &self, - req: Request, - parent: Inode, - name: &OsStr, - new_parent: Inode, - new_name: &OsStr, - flags: u32, - ) -> Result<()> { -println!("fs:{}, rename2: parent: {:?}, name: {:?}, new_parent: {:?}, new_name: {:?}, flags: {}", - self.fsname, parent, name, new_parent, new_name, flags); - -match self.inner.rename2(req, parent, name, new_parent, new_name, flags).await { - Ok(()) => Ok(()), - Err(e) => { - println!("fs:{}, rename2 error: {:?}", self.fsname, e); - Err(e) - } -} - } - - /// find next data or hole after the specified offset. - async fn lseek( - &self, - req: Request, - inode: Inode, - fh: u64, - offset: u64, - whence: u32, - ) -> Result { - -println!("fs:{}, lseek: inode: {:?}, fh: {}, offset: {}, whence: {}", self.fsname, inode, fh, offset, whence); -match self.inner.lseek(req, inode, fh, offset, whence).await { - Ok(reply) => Ok(reply), - Err(e) => { - println!("fs:{}, lseek error: {:?}", self.fsname, e); - Err(e) } -} - } - - /// copy a range of data from one file to another. This can improve performance because it - /// reduce data copy: in normal, data will copy from FUSE server to kernel, then to user-space, - /// then to kernel, finally send back to FUSE server. By implement this method, data will only - /// copy in FUSE server internal. - #[allow(clippy::too_many_arguments)] - async fn copy_file_range( - &self, - req: Request, - inode: Inode, - fh_in: u64, - off_in: u64, - inode_out: Inode, - fh_out: u64, - off_out: u64, - length: u64, - flags: u64, - ) -> Result { - println!("fs:{}, copy_file_range: inode: {:?}, fh_in: {}, off_in: {}, inode_out: {:?}, fh_out: {}, off_out: {}, length: {}, flags: {}", - self.fsname, inode, fh_in, off_in, inode_out, fh_out, off_out, length, flags); - - match self.inner.copy_file_range(req, inode, fh_in, off_in, inode_out, fh_out, off_out, length, flags).await { + + /// find next data or hole after the specified offset. + async fn lseek( + &self, + req: Request, + inode: Inode, + fh: u64, + offset: u64, + whence: u32, + ) -> Result { + + println!("fs:{}, lseek: inode: {:?}, fh: {}, offset: {}, whence: {}", self.fsname, inode, fh, offset, whence); + match self.inner.lseek(req, inode, fh, offset, whence).await { Ok(reply) => Ok(reply), Err(e) => { - println!("fs:{}, copy_file_range error: {:?}", self.fsname, e); + println!("fs:{}, lseek error: {:?}", self.fsname, e); Err(e) } } - } + } + + /// copy a range of data from one file to another. This can improve performance because it + /// reduce data copy: in normal, data will copy from FUSE server to kernel, then to user-space, + /// then to kernel, finally send back to FUSE server. By implement this method, data will only + /// copy in FUSE server internal. + #[allow(clippy::too_many_arguments)] + async fn copy_file_range( + &self, + req: Request, + inode: Inode, + fh_in: u64, + off_in: u64, + inode_out: Inode, + fh_out: u64, + off_out: u64, + length: u64, + flags: u64, + ) -> Result { + println!("fs:{}, copy_file_range: inode: {:?}, fh_in: {}, off_in: {}, inode_out: {:?}, fh_out: {}, off_out: {}, length: {}, flags: {}", + self.fsname, inode, fh_in, off_in, inode_out, fh_out, off_out, length, flags); + + match self.inner.copy_file_range(req, inode, fh_in, off_in, inode_out, fh_out, off_out, length, flags).await { + Ok(reply) => Ok(reply), + Err(e) => { + println!("fs:{}, copy_file_range error: {:?}", self.fsname, e); + Err(e) + } + } + } } \ No newline at end of file diff --git a/scorpio/src/passthrough/logging_macros/Cargo.toml b/scorpio/src/passthrough/logging_macros/Cargo.toml new file mode 100644 index 000000000..6f133430e --- /dev/null +++ b/scorpio/src/passthrough/logging_macros/Cargo.toml @@ -0,0 +1,12 @@ +[package] +name = "logging_macros" +version = "0.1.0" +edition = "2021" + +[lib] +crate-type = ["proc-macro"] + +[dependencies] +proc-macro2 = "1.0" +quote = "1.0" +syn = { version = "1.0", features = ["full"] } \ No newline at end of file diff --git a/scorpio/src/passthrough/logging_macros/src/lib.rs b/scorpio/src/passthrough/logging_macros/src/lib.rs new file mode 100644 index 000000000..7e81a2e81 --- /dev/null +++ b/scorpio/src/passthrough/logging_macros/src/lib.rs @@ -0,0 +1,46 @@ +extern crate proc_macro; + +use proc_macro::TokenStream; +use syn::{parse_macro_input, ItemImpl}; +use quote::quote; + +#[proc_macro] +pub fn impl_filesystem_logging(input: TokenStream) -> TokenStream { + let input = parse_macro_input!(input as ItemImpl); + + let struct_name = &input.self_ty; + let trait_name = &input.trait_; + + let trait_path = match trait_name { + Some((_, path, _)) => path, + None => panic!("Trait name cannot be None"), + }; + + let methods = input.items.iter().map(|item| { + match item { + syn::ImplItem::Method(method) => { + let method_name = &method.sig.ident; + let method_inputs = &method.sig.inputs; + let method_output = &method.sig.output; + + quote! { + fn #method_name(&self, #method_inputs) -> #method_output { + println!("{}::{} called", stringify!(#struct_name), stringify!(#method_name)); + let result = <#struct_name as #trait_path>::#method_name(self, #method_inputs); + println!("{}::{} returned: {:?}", stringify!(#struct_name), stringify!(#method_name), result); + result + } + } + }, + _ => quote! {}, + } + }); + + let expanded = quote! { + impl #trait_path for #struct_name { + #(#methods)* + } + }; + + TokenStream::from(expanded) +} \ No newline at end of file diff --git a/scorpio/src/passthrough/mod.rs b/scorpio/src/passthrough/mod.rs index 6a6ef37fe..2826ab1de 100644 --- a/scorpio/src/passthrough/mod.rs +++ b/scorpio/src/passthrough/mod.rs @@ -21,6 +21,7 @@ mod os_compat; mod util; mod config; mod async_io; +pub mod newlogfs; pub mod logfs; use crate::util::atomic::*; @@ -654,9 +655,9 @@ impl PassthroughFs { Some(data) => { let curr = data.refcount.load().await; // forgot_one() has just destroyed the entry, retry... - if curr == 0 { - continue 'search; - } + // if curr == 0 { + // continue 'search; + // } // Saturating add to avoid integer overflow, it's not realistic to saturate u64. let new = curr.saturating_add(1); diff --git a/scorpio/src/passthrough/newlogfs.rs b/scorpio/src/passthrough/newlogfs.rs new file mode 100644 index 000000000..4d8f66e82 --- /dev/null +++ b/scorpio/src/passthrough/newlogfs.rs @@ -0,0 +1,671 @@ + + + +use std::any::type_name_of_val; +use std::ffi::OsStr; + +use bytes::Bytes; +use fuse3::notify::Notify; +use fuse3::raw::reply::*; +use fuse3::raw::{reply::ReplyInit, Filesystem, Request}; +use fuse3::{Result, SetAttr}; +use uuid::Uuid; +use super::Inode; +// LoggingFileSystem . provide log info for a filesystem trait. +#[allow(unused)] +pub struct LoggingFileSystem { + inner: FS, + fsname:String, +} +#[allow(unused)] +impl LoggingFileSystem { + pub fn new(fs:FS)-> Self{ + let fsname = type_name_of_val(&fs); + Self{ + inner:fs, + fsname:String::from(fsname) + } + } +} +impl LoggingFileSystem { + fn log_start(&self, id: &Uuid, method: &str, args: &[(&str, String)]) { + let args_str = args.iter() + .map(|(k, v)| format!("{}={}", k, v)) + .collect::>() + .join(", "); + println!("ID:{}|[{}] - Call: {}", id, method, args_str); + } + + fn log_result(&self, id: &Uuid, method: &str, result: &Result) { + match result { + Ok(res) => println!("ID:{} [{}] - Success: {:?}", id, method, res), + Err(e) => println!("ID:{} [{}] - Error: {:?}", id, method, e), + } + } +} + + +impl Filesystem for LoggingFileSystem { + type DirEntryStream<'a> = FS::DirEntryStream<'a> where Self: 'a; + type DirEntryPlusStream<'a> = FS::DirEntryPlusStream<'a> where Self: 'a; + + + async fn init(&self, req: Request) -> Result { + let uuid = Uuid::new_v4(); + let method = "init"; + self.log_start(&uuid, method, &[]); + let result = self.inner.init(req).await; + self.log_result(&uuid, method, &result); + result + } + + + async fn destroy(&self, req: Request) { + let uuid = Uuid::new_v4(); + let method = "destroy"; + self.log_start(&uuid, method, &[]); + self.inner.destroy(req).await; + println!("ID:{} [{}] {} - Completed", uuid, self.fsname, method); + } + + + async fn lookup(&self, req: Request, parent: Inode, name: &OsStr) -> Result { + let uuid = Uuid::new_v4(); + let method = "lookup"; + let args = vec![ + ("parent", parent.to_string()), + ("name", name.to_string_lossy().into_owned()) + ]; + self.log_start(&uuid, method, &args); + let result = self.inner.lookup(req, parent, name).await; + self.log_result(&uuid, method, &result); + result + } + + + async fn forget(&self, req: Request, inode: Inode, nlookup: u64) { + let uuid = Uuid::new_v4(); + let method = "forget"; + let args = vec![ + ("inode", inode.to_string()), + ("nlookup", nlookup.to_string()) + ]; + self.log_start(&uuid, method, &args); + self.inner.forget(req, inode, nlookup).await; + println!("ID:{} [{}] {} - Completed", uuid, self.fsname, method); + } + + + async fn getattr(&self, req: Request, inode: Inode, fh: Option, flags: u32) -> Result { + let uuid = Uuid::new_v4(); + let method = "getattr"; + let args = vec![ + ("inode", inode.to_string()), + ("fh", fh.map(|v| v.to_string()).unwrap_or_default()), + ("flags", flags.to_string()) + ]; + self.log_start(&uuid, method, &args); + let result = self.inner.getattr(req, inode, fh, flags).await; + self.log_result(&uuid, method, &result); + result + } + + + async fn setattr(&self, req: Request, inode: Inode, fh: Option, set_attr: SetAttr) -> Result { + let uuid = Uuid::new_v4(); + let method = "setattr"; + let args = vec![ + ("inode", inode.to_string()), + ("fh", fh.map(|v| v.to_string()).unwrap_or_default()), + ("set_attr", format!("{:?}", set_attr)) + ]; + self.log_start(&uuid, method, &args); + let result = self.inner.setattr(req, inode, fh, set_attr).await; + self.log_result(&uuid, method, &result); + result + } + + + async fn readdirplus( + &self, + req: Request, + parent: Inode, + fh: u64, + offset: u64, + lock_owner: u64, + ) -> Result>> { + let uuid = Uuid::new_v4(); + let method = "readdirplus"; + let args = vec![ + ("parent", parent.to_string()), + ("fh", fh.to_string()), + ("offset", offset.to_string()), + ("lock_owner", lock_owner.to_string()) + ]; + self.log_start(&uuid, method, &args); + let result = self.inner.readdirplus(req, parent, fh, offset, lock_owner).await; + self.log_result(&uuid, method, &Ok("".to_string())); + result + } + + async fn opendir(&self, req: Request, inode: Inode, flags: u32) -> Result { + let uuid = Uuid::new_v4(); + let method = "opendir"; + let args = vec![ + ("inode", inode.to_string()), + ("flags", flags.to_string()) + ]; + self.log_start(&uuid, method, &args); + let result = self.inner.opendir(req, inode, flags).await; + if let Ok(ref reply) = result { + println!("ID:{} [{}] {} - Obtained fh: {}", uuid, self.fsname, method, reply.fh); + } + self.log_result(&uuid, method, &result); + result + } + + async fn readdir( + &self, + req: Request, + parent: Inode, + fh: u64, + offset: i64, + ) -> Result>> { + let uuid = Uuid::new_v4(); + let method = "readdir"; + let args = vec![ + ("parent", parent.to_string()), + ("fh", fh.to_string()), + ("offset", offset.to_string()) + ]; + self.log_start(&uuid, method, &args); + let result = self.inner.readdir(req, parent, fh, offset).await; + self.log_result(&uuid, method, &Ok("".to_string())); + result + } + + + async fn read( + &self, + req: Request, + inode: Inode, + fh: u64, + offset: u64, + size: u32, + ) -> Result { + let uuid = Uuid::new_v4(); + let method = "read"; + let args = vec![ + ("inode", inode.to_string()), + ("fh", fh.to_string()), + ("offset", offset.to_string()), + ("size", size.to_string()) + ]; + self.log_start(&uuid, method, &args); + let result = self.inner.read(req, inode, fh, offset, size).await; + if let Ok(ref data) = result { + println!("ID:{} [{}] {} - Read {} bytes", uuid, self.fsname, method, data.data.len()); + } + self.log_result(&uuid, method, &result); + result + } + + + async fn write( + &self, + req: Request, + inode: Inode, + fh: u64, + offset: u64, + data: &[u8], + write_flags: u32, + flags: u32, + ) -> Result { + let uuid = Uuid::new_v4(); + let method = "write"; + let args = vec![ + ("inode", inode.to_string()), + ("fh", fh.to_string()), + ("offset", offset.to_string()), + ("data_len", data.len().to_string()), + ("write_flags", write_flags.to_string()), + ("flags", flags.to_string()) + ]; + self.log_start(&uuid, method, &args); + let result = self.inner.write(req, inode, fh, offset, data, write_flags, flags).await; + if let Ok(ref reply) = result { + println!("ID:{} [{}] {} - Wrote {} bytes", uuid, self.fsname, method, reply.written); + } + self.log_result(&uuid, method, &result); + result + } + + + async fn fsync(&self, req: Request, inode: Inode, fh: u64, datasync: bool) -> Result<()> { + let uuid = Uuid::new_v4(); + let method = "fsync"; + let args = vec![ + ("inode", inode.to_string()), + ("fh", fh.to_string()), + ("datasync", datasync.to_string()) + ]; + self.log_start(&uuid, method, &args); + let result = self.inner.fsync(req, inode, fh, datasync).await; + self.log_result(&uuid, method, &result); + result + } + + + async fn setxattr( + &self, + req: Request, + inode: Inode, + name: &OsStr, + value: &[u8], + flags: u32, + position: u32, + ) -> Result<()> { + let uuid = Uuid::new_v4(); + let method = "setxattr"; + let args = vec![ + ("inode", inode.to_string()), + ("name", name.to_string_lossy().into_owned()), + ("value_len", value.len().to_string()), + ("flags", flags.to_string()), + ("position", position.to_string()) + ]; + self.log_start(&uuid, method, &args); + let result = self.inner.setxattr(req, inode, name, value, flags, position).await; + self.log_result(&uuid, method, &result); + result + } + + async fn rename2( + &self, + req: Request, + parent: Inode, + name: &OsStr, + new_parent: Inode, + new_name: &OsStr, + flags: u32, + ) -> Result<()> { + let uuid = Uuid::new_v4(); + let method = "rename2"; + let args = vec![ + ("parent", parent.to_string()), + ("name", name.to_string_lossy().into_owned()), + ("new_parent", new_parent.to_string()), + ("new_name", new_name.to_string_lossy().into_owned()), + ("flags", flags.to_string()) + ]; + self.log_start(&uuid, method, &args); + let result = self.inner.rename2(req, parent, name, new_parent, new_name, flags).await; + self.log_result(&uuid, method, &result); + result + } + async fn unlink(&self, req: Request, parent: Inode, name: &OsStr) -> Result<()> { + let uuid = Uuid::new_v4(); + let method = "unlink"; + let args = vec![ + ("parent", parent.to_string()), + ("name", name.to_string_lossy().into_owned()) + ]; + self.log_start(&uuid, method, &args); + let re = self.inner.unlink(req, parent, name).await; + self.log_result(&uuid, method, &re); + re + } + async fn mkdir(&self,req:Request,parent:fuse3::Inode,name: &OsStr,mode:u32,umask:u32,) -> Result { + let uuid = Uuid::new_v4(); + let method = "mkdir"; + let args = vec![ + ("parent", parent.to_string()), + ("name", name.to_string_lossy().into_owned()), + ("mode", mode.to_string()), + ("umask", umask.to_string()) + ]; + self.log_start(&uuid, method, &args); + let re = self.inner.mkdir(req, parent, name, mode, umask).await; + self.log_result(&uuid, method, &re); + re + } + async fn access(&self, req: Request, inode: fuse3::Inode, mask: u32) -> Result<()> { + let uuid = Uuid::new_v4(); + let method = "access"; + let args = vec![ + ("inode", inode.to_string()), + ("mask", mask.to_string()) + ]; + self.log_start(&uuid, method, &args); + let result = self.inner.access(req, inode, mask).await; + self.log_result(&uuid, method, &result); + result + } + async fn getxattr(&self,req:Request,inode:fuse3::Inode,name: &OsStr,size:u32,) -> Result { + let uuid = Uuid::new_v4(); + let method = "getxattr"; + let args = vec![ + ("inode", inode.to_string()), + ("name", name.to_string_lossy().into_owned()), + ("size", size.to_string()) + ]; + self.log_start(&uuid, method, &args); + let result = self.inner.getxattr(req, inode, name, size).await; + self.log_result(&uuid, method, &result); + result + } + async fn create(&self,req:Request,parent:fuse3::Inode,name: &OsStr,mode:u32,flags:u32,) -> Result { + let uuid = Uuid::new_v4(); + let method = "create"; + let args = vec![ + ("parent", parent.to_string()), + ("name", name.to_string_lossy().into_owned()), + ("mode", mode.to_string()), + ("flags", flags.to_string()) + ]; + self.log_start(&uuid, method, &args); + let result = self.inner.create(req, parent, name, mode, flags).await; + self.log_result(&uuid, method, &result); + result } + async fn lseek(&self,req:Request,inode:fuse3::Inode,fh:u64,offset:u64,whence:u32,) -> Result { + let uuid = Uuid::new_v4(); + let method = "lseek"; + let args = vec![ + ("inode", inode.to_string()), + ("fh", fh.to_string()), + ("offset", offset.to_string()), + ("whence", whence.to_string()) + ]; + self.log_start(&uuid, method, &args); + let result = self.inner.lseek(req, inode, fh, offset, whence).await; + self.log_result(&uuid, method, &result); + result } + + async fn mknod(&self,req:Request,parent:fuse3::Inode,name: &OsStr,mode:u32,rdev:u32,) -> Result { + let uuid = Uuid::new_v4(); + let method = "mknod"; + let args = vec![ + ("parent", parent.to_string()), + ("name", name.to_string_lossy().into_owned()), + ("mode", mode.to_string()), + ("rdev", rdev.to_string()) + ]; + self.log_start(&uuid, method, &args); + let result = self.inner.mknod(req, parent, name, mode, rdev).await; + self.log_result(&uuid, method, &result); + result } + + async fn rename(&self,req:Request,parent:fuse3::Inode,name: &OsStr,new_parent:fuse3::Inode,new_name: &OsStr,) -> Result<()> { + let uuid = Uuid::new_v4(); + let method = "rename"; + let args = vec![ + ("parent", parent.to_string()), + ("name", name.to_string_lossy().into_owned()), + ("new_parent", new_parent.to_string()), + ("new_name", new_name.to_string_lossy().into_owned()) + ]; + self.log_start(&uuid, method, &args); + let result = self.inner.rename(req, parent, name, new_parent, new_name).await; + self.log_result(&uuid, method, &result); + result } + async fn listxattr(&self,req:Request,inode:fuse3::Inode,size:u32) -> Result { + let uuid = Uuid::new_v4(); + let method = "listxattr"; + let args = vec![ + ("inode", inode.to_string()), + ("size", size.to_string()) + ]; + self.log_start(&uuid, method, &args); + let result = self.inner.listxattr(req, inode, size).await; + self.log_result(&uuid, method, &result); + result } + + async fn open(&self,req:Request,inode:fuse3::Inode,flags:u32) -> Result { + let uuid = Uuid::new_v4(); + let method = "open"; + let args = vec![ + ("inode", inode.to_string()), + ("flags", flags.to_string()) + ]; + self.log_start(&uuid, method, &args); + let result = self.inner.open(req, inode, flags).await; + if let Ok(ref reply) = result { + println!("ID:{} [{}] {} - Obtained fh: {}", uuid, self.fsname, method, reply.fh); + } + self.log_result(&uuid, method, &result); + result } + + async fn rmdir(&self,req:Request,parent:fuse3::Inode,name: &OsStr) -> Result<()> { + let uuid = Uuid::new_v4(); + let method = "rmdir"; + let args = vec![ + ("parent", parent.to_string()), + ("name", name.to_string_lossy().into_owned()) + ]; + self.log_start(&uuid, method, &args); + let result = self.inner.rmdir(req, parent, name).await; + self.log_result(&uuid, method, &result); + result } + + async fn statfs(&self,req:Request,inode:fuse3::Inode) -> Result { + + let uuid = Uuid::new_v4(); + let method = "statfs"; + let args = vec![ + ("inode", inode.to_string()) + ]; + self.log_start(&uuid, method, &args); + let result = self.inner.statfs(req, inode).await; + self.log_result(&uuid, method, &result); + result + } + + async fn link(&self, req: Request, inode: fuse3::Inode, new_parent: fuse3::Inode, new_name: &OsStr) -> Result { + let uuid = Uuid::new_v4(); + let method = "link"; + let args = vec![ + ("inode", inode.to_string()), + ("new_parent", new_parent.to_string()), + ("new_name", new_name.to_string_lossy().into_owned()) + ]; + self.log_start(&uuid, method, &args); + let result = self.inner.link(req, inode,new_parent,new_name).await; + self.log_result(&uuid, method, &result); + result + } + + async fn symlink(&self,req:Request,parent:fuse3::Inode,name: &OsStr,link: &OsStr,) -> Result { + let uuid = Uuid::new_v4(); + let method = "symlink"; + let args = vec![ + ("parent", parent.to_string()), + ("name", name.to_string_lossy().into_owned()), + ("link", link.to_string_lossy().into_owned()) + ]; + self.log_start(&uuid, method, &args); + let result = self.inner.symlink(req, parent,name,link).await; + self.log_result(&uuid, method, &result); + result + } + async fn batch_forget(&self,req:Request,inodes: &[fuse3::Inode]) { + let uuid = Uuid::new_v4(); + let method = "batch_forget"; + let args = vec![ + ("inodes", inodes.iter().map(|inode| inode.to_string()).collect::>().join(", ")) + ]; + self.log_start(&uuid, method, &args); + self.inner.batch_forget(req, inodes).await; + self.log_result(&uuid, method, &Ok("".to_string())); + } + async fn bmap(&self,req:Request,inode:fuse3::Inode,blocksize:u32,idx:u64,) -> Result { + + let uuid = Uuid::new_v4(); + let method = "bmap"; + let args = vec![ + ("inode", inode.to_string()), + ("blocksize", blocksize.to_string()), + ("idx", idx.to_string()) + ]; + self.log_start(&uuid, method, &args); + let result = self.inner.bmap(req, inode,blocksize,idx).await; + self.log_result(&uuid, method, &result); + result + } + async fn copy_file_range(&self, req: Request, inode: fuse3::Inode, fh_in: u64, off_in: u64, inode_out: fuse3::Inode, fh_out: u64, off_out: u64, length: u64, flags: u64) -> Result { + let uuid = Uuid::new_v4(); + let method = "copy_file_range"; + let args = vec![ + ("inode", inode.to_string()), + ("fh_in", fh_in.to_string()), + ("off_in", off_in.to_string()), + ("inode_out", inode_out.to_string()), + ("fh_out", fh_out.to_string()), + ("off_out", off_out.to_string()), + ("length", length.to_string()), + ("flags", flags.to_string()) + ]; + self.log_start(&uuid, method, &args); + let result = self.inner.copy_file_range(req, inode, fh_in, off_in, inode_out, fh_out, off_out, length, flags).await; + self.log_result(&uuid, method, &result); + result + } + + async fn fallocate(&self, req: Request, inode: fuse3::Inode, fh: u64, offset: u64, length: u64, mode: u32) -> Result<()> { + let uuid = Uuid::new_v4(); + let method = "fallocate"; + let args = vec![ + ("inode", inode.to_string()), + ("fh", fh.to_string()), + ("offset", offset.to_string()), + ("length", length.to_string()), + ("mode", mode.to_string()) + ]; + self.log_start(&uuid, method, &args); + let result = self.inner.fallocate(req, inode, fh, offset, length, mode).await; + self.log_result(&uuid, method, &result); + result + } + + async fn flush(&self, req: Request, inode: fuse3::Inode, fh: u64, lock_owner: u64) -> Result<()> { + let uuid = Uuid::new_v4(); + let method = "flush"; + let args = vec![ + ("inode", inode.to_string()), + ("fh", fh.to_string()), + ("lock_owner", lock_owner.to_string()) + ]; + self.log_start(&uuid, method, &args); + let result = self.inner.flush(req, inode, fh, lock_owner).await; + self.log_result(&uuid, method, &result); + result + } + + async fn fsyncdir(&self, req: Request, inode: fuse3::Inode, fh: u64, datasync: bool) -> Result<()> { + let uuid = Uuid::new_v4(); + let method = "fsyncdir"; + let args = vec![ + ("inode", inode.to_string()), + ("fh", fh.to_string()), + ("datasync", datasync.to_string()) + ]; + self.log_start(&uuid, method, &args); + let result = self.inner.fsyncdir(req, inode, fh, datasync).await; + self.log_result(&uuid, method, &result); + result + } + + // async fn interrupt(&self, req: Request, unique: u64) -> Result<()> { + // let uuid = Uuid::new_v4(); + // let method = "interrupt"; + // let args = vec![ + // ("unique", unique.to_string()) + // ]; + // self.log_start(&uuid, method, &args); + // let result = self.inner.interrupt(req, unique).await; + // self.log_result(&uuid, method, &result); + // result + // } + + async fn notify_reply(&self, req: Request, inode: fuse3::Inode, offset: u64, data: Bytes) -> Result<()> { + let uuid = Uuid::new_v4(); + let method = "notify_reply"; + let args = vec![ + ("inode", inode.to_string()), + ("offset", offset.to_string()) + ]; + self.log_start(&uuid, method, &args); + let result = self.inner.notify_reply(req, inode, offset, data).await; + self.log_result(&uuid, method, &result); + result + } + + async fn poll(&self, req: Request, inode: fuse3::Inode, fh: u64, kh: Option, flags: u32, events: u32, notify: &Notify) -> Result { + let uuid = Uuid::new_v4(); + let method = "poll"; + let args = vec![ + ("inode", inode.to_string()), + ("fh", fh.to_string()), + ("flags", flags.to_string()), + ("events", events.to_string()) + ]; + self.log_start(&uuid, method, &args); + let result = self.inner.poll(req, inode, fh, kh, flags, events, notify).await; + self.log_result(&uuid, method, &result); + result + } + + async fn readlink(&self, req: Request, inode: fuse3::Inode) -> Result { + let uuid = Uuid::new_v4(); + let method = "readlink"; + let args = vec![ + ("inode", inode.to_string()) + ]; + self.log_start(&uuid, method, &args); + let result = self.inner.readlink(req, inode).await; + self.log_result(&uuid, method, &result); + result + } + + async fn release(&self, req: Request, inode: fuse3::Inode, fh: u64, flags: u32, lock_owner: u64, flush: bool) -> Result<()> { + let uuid = Uuid::new_v4(); + let method = "release"; + let args = vec![ + ("inode", inode.to_string()), + ("fh", fh.to_string()), + ("flags", flags.to_string()), + ("lock_owner", lock_owner.to_string()), + ("flush", flush.to_string()) + ]; + self.log_start(&uuid, method, &args); + let result = self.inner.release(req, inode, fh, flags, lock_owner, flush).await; + self.log_result(&uuid, method, &result); + result + } + + async fn releasedir(&self, req: Request, inode: fuse3::Inode, fh: u64, flags: u32) -> Result<()> { + let uuid = Uuid::new_v4(); + let method = "releasedir"; + let args = vec![ + ("inode", inode.to_string()), + ("fh", fh.to_string()), + ("flags", flags.to_string()) + ]; + self.log_start(&uuid, method, &args); + let result = self.inner.releasedir(req, inode, fh, flags).await; + self.log_result(&uuid, method, &result); + result + } + + async fn removexattr(&self, req: Request, inode: fuse3::Inode, name: &OsStr) -> Result<()> { + let uuid = Uuid::new_v4(); + let method = "removexattr"; + let args = vec![ + ("inode", inode.to_string()), + ("name", name.to_string_lossy().to_string()) + ]; + self.log_start(&uuid, method, &args); + let result = self.inner.removexattr(req, inode, name).await; + self.log_result(&uuid, method, &result); + result + } +} \ No newline at end of file diff --git a/scorpio/src/passthrough/util.rs b/scorpio/src/passthrough/util.rs index 72d1c064a..553ff3cee 100644 --- a/scorpio/src/passthrough/util.rs +++ b/scorpio/src/passthrough/util.rs @@ -82,7 +82,7 @@ impl UniqueInodeGenerator { self.next_virtual_inode.fetch_add(1, Ordering::Relaxed) | VIRTUAL_INODE_FLAG }; - Ok((unique_id as u64) << 47 | inode) + Ok(((unique_id as u64) << 47) | inode) } #[cfg(test)] diff --git a/scorpio/src/scolfs/controller.rs b/scorpio/src/scolfs/controller.rs new file mode 100644 index 000000000..63b12905b --- /dev/null +++ b/scorpio/src/scolfs/controller.rs @@ -0,0 +1,296 @@ +use clap::Subcommand; +use libra::internal::head::Head; +use libra::utils::path_ext::PathExt; +use libra::utils::{path, util}; +use std::fs::{File, OpenOptions}; +use std::io; +use std::io::{BufRead, BufReader, Read, Seek, SeekFrom, Write}; +use std::path::Path; +use reqwest::StatusCode; +use ceres::lfs::lfs_structs::LockListQuery; +use mercury::internal::index::Index; +//use crate::command::status; + +use crate::util::config; + +use super::lfs::lfs_client::LFSClient; +use super::utils; +use super::lfs_util; + + +/// [Docs](https://github.com/git-lfs/git-lfs/tree/main/docs/man) +#[derive(Subcommand, Debug)] +pub enum LfsCmds { + /// View or add LFS paths to Libra Attributes (root) + Track { + pattern: Option>, + }, + /// Remove LFS paths from Libra Attributes + Untrack { + path: Vec, + }, + /// Lists currently locked files from the Libra LFS server. (Current Branch) + Locks { + #[clap(long, short)] + id: Option, + #[clap(long, short)] + path: Option, + #[clap(long, short)] + limit: Option, + }, + /// Set a file as "locked" on the Libra LFS server + Lock { + /// String path name of the locked file. This should be relative to the root of the repository working directory + path: String, + }, + /// Remove "locked" setting for a file on the Libra LFS server + Unlock { + path: String, + #[clap(long, short)] + force: bool, + #[clap(long, short)] + id: Option + }, + /// Show information about Git LFS files in the index and working tree (current branch) + LsFiles { + /// Show the entire 64 character OID, instead of just first 10. + #[clap(long, short)] + long: bool, + /// Show the size of the LFS object between parenthesis at the end of a line. + #[clap(long, short)] + size: bool, + /// Show only the lfs tracked file names. + #[clap(long, short)] + name_only: bool, + } +} + +#[allow(unused)] +pub async fn execute(cmd: LfsCmds) { + // TODO: attributes file should be created in current dir, NOT root dir + let attr_path = utils::lfs_attribate(); + let attr_path = attr_path.to_str().unwrap(); + match cmd { + LfsCmds::Track { pattern } => { // TODO: deduplicate + match pattern { + Some(pattern) => { + let pattern = convert_patterns_to_workdir(pattern); // + add_lfs_patterns(attr_path, pattern).unwrap(); + } + None => { + let lfs_patterns = lfs_util::extract_lfs_patterns(attr_path).unwrap(); + if !lfs_patterns.is_empty() { + println!("Listing tracked patterns"); + for p in lfs_patterns { + println!(" {} ({})", p, util::ATTRIBUTES); // '\t' seems to be 8 spaces, :( + } + } + } + } + } + LfsCmds::Untrack { path } => { // only remove totally same pattern with path ? + let path = convert_patterns_to_workdir(path); // + untrack_lfs_patterns(&attr_path, path).unwrap(); + } + LfsCmds::Locks { id, path, limit } => { + let refspec = current_refspec().await.unwrap(); + tracing::debug!("refspec: {}", refspec); + let query = LockListQuery { + id: id.unwrap_or_default(), + path: path.unwrap_or_default(), + limit: limit.map(|l| l.to_string()).unwrap_or_default(), + cursor: "".to_string(), + refspec, + }; + let locks = LFSClient::get().await.get_locks(query).await.locks; + if !locks.is_empty() { + let max_path_len = locks.iter().map(|l| l.path.len()).max().unwrap(); + for lock in locks { + println!("{: { + // Only check existence + if !Path::new(&path).exists() { + eprintln!("fatal: pathspec '{}' did not match any files", path); + return; + } + + let refspec = current_refspec().await.unwrap(); + let code = LFSClient::get().await.lock(path.clone(), refspec.clone()).await; + if code.is_success() { + println!("Locked {}", path); + } else if code == StatusCode::FORBIDDEN { + eprintln!("Forbidden: You must have push access to create a lock"); + } else if code == StatusCode::CONFLICT { + eprintln!("Conflict: already created lock"); + } + } + LfsCmds::Unlock { path, force, id } => { + if !force { + if !Path::new(&path).exists() { + eprintln!("fatal: pathspec '{}' did not match any files", path); + return; + } + // Threr is no status for fuse. + // if !status::is_clean().await { + // eprintln!("fatal: working tree not clean"); + // return; + // } + } + let refspec = current_refspec().await.unwrap(); + let id = match id { + None => { + // get id by path + let locks = LFSClient::get().await.get_locks(LockListQuery { + refspec: refspec.clone(), + path: path.clone(), + id: "".to_string(), + cursor: "".to_string(), + limit: "".to_string(), + }).await.locks; + if locks.is_empty() { + eprintln!("fatal: no lock found for path '{}'", path); + return; + } + locks[0].id.clone() + } + Some(id) => id + }; + let code = LFSClient::get().await.unlock(id.clone(), refspec.clone(), force).await; + if code.is_success() { + println!("Unlocked {}", path); + } else if code == StatusCode::FORBIDDEN { + eprintln!("Forbidden: You must have push access to unlock"); + } + } + LfsCmds::LsFiles { long, size, name_only} => { + let idx_file = path::index(); + let index = Index::load(&idx_file).unwrap(); + let entries = index.tracked_entries(0); + let storage = util::objects_storage(); + for entry in entries { + let path_abs = util::workdir_to_absolute(&entry.name); + if lfs_util::is_lfs_tracked(&path_abs) { + let data = storage.get(&entry.hash).unwrap(); + if let Some((oid, lfs_size)) = lfs_util::parse_pointer_data(&data) { + let is_pointer = lfs_util::parse_pointer_file(&path_abs).is_ok(); + // An asterisk (*) after the OID indicates a full object, a minus (-) indicates an LFS pointer. + // or not exists (-) + let _type = if is_pointer || !path_abs.exists() { "-" } else { "*" }; + let oid = if long { oid } else { oid[..10].to_owned() }; + let tail = if size { + let byte = util::auto_unit_bytes(lfs_size); + format!(" ({byte:.2})") + } else { + "".to_string() + }; + if name_only { + println!("{}{}", entry.name, tail); + } else { + println!("{} {} {}{}", oid, _type, entry.name, tail); + } + } + } + } + } + } +} + +/// [different from `libra`]. +/// Get the current ref branch name. +pub(crate) async fn current_refspec() -> Option { + // match Head::current().await { + // Head::Branch(name) => Some(format!("refs/heads/{}", name)), + // Head::Detached(_) => { + // println!("fatal: HEAD is detached"); + // None + // } + // } + + config::git_branch().ok() +} + +/// [different from `libra`]. +/// Convert patterns to workdir. +fn convert_patterns_to_workdir(patterns: Vec) -> Vec { + let mount_path = config::mount_path(); + patterns.into_iter().map(|p| { + let mut pattern = mount_path.clone(); + pattern.push(p); + pattern.to_string_or_panic() + + }).collect() +} + +fn add_lfs_patterns(file_path: &str, patterns: Vec) -> io::Result<()> { + let mut file = OpenOptions::new() + .create(true) + .read(true) + .append(true) + .open(file_path)?; + + if file.metadata()?.len() > 0 { + file.seek(SeekFrom::End(-1))?; + + let mut last_byte = [0; 1]; + file.read_exact(&mut last_byte)?; + + // ensure the last byte is '\n' + if last_byte[0] != b'\n' { + file.write_all(b"\n")?; + } + } + + let lfs_patterns = lfs_util::extract_lfs_patterns(file_path)?; + for pattern in patterns { + if lfs_patterns.contains(&pattern) { + continue; + } + println!("Tracking \"{}\"", pattern); + let pattern = format!("{} filter=lfs diff=lfs merge=lfs -text\n", pattern.replace(" ", r"\ ")); + file.write_all(pattern.as_bytes())?; + } + + Ok(()) +} + +fn untrack_lfs_patterns(file_path: &str, patterns: Vec) -> io::Result<()> { + if !Path::new(file_path).exists() { + return Ok(()); + } + let file = File::open(file_path)?; + let reader = BufReader::new(file); + + let mut lines: Vec = Vec::new(); + for line in reader.lines() { + let line = line?; + let mut matched_pattern = None; + // delete the specified lfs patterns + for pattern in &patterns { + let pattern = pattern.replace(" ", r"\ "); + if line.trim_start().starts_with(&pattern) && line.contains("filter=lfs") { + matched_pattern = Some(pattern); + break; + } + } + match matched_pattern { + Some(pattern) => println!("Untracking \"{}\"", pattern), + None => lines.push(line), + } + } + + // clear the file + let mut file = OpenOptions::new() + .write(true) + .truncate(true) + .open(file_path)?; + + for line in lines { + file.write_all(line.as_bytes())?; + file.write_all(b"\n")?; + } + + Ok(()) +} \ No newline at end of file diff --git a/scorpio/src/scolfs/lfs.rs b/scorpio/src/scolfs/lfs.rs new file mode 100644 index 000000000..32fdeb928 --- /dev/null +++ b/scorpio/src/scolfs/lfs.rs @@ -0,0 +1 @@ +pub use libra::internal::protocol::lfs_client; \ No newline at end of file diff --git a/scorpio/src/scolfs/mod.rs b/scorpio/src/scolfs/mod.rs new file mode 100644 index 000000000..719a6b914 --- /dev/null +++ b/scorpio/src/scolfs/mod.rs @@ -0,0 +1,6 @@ +mod controller; +mod lfs; +mod utils; +mod reg; +use libra::utils::lfs as lfs_util; +//use super::util; \ No newline at end of file diff --git a/scorpio/src/scolfs/reg.rs b/scorpio/src/scolfs/reg.rs new file mode 100644 index 000000000..36650417d --- /dev/null +++ b/scorpio/src/scolfs/reg.rs @@ -0,0 +1,2 @@ +use std::path::PathBuf; +use std::sync::Arc; diff --git a/scorpio/src/scolfs/utils.rs b/scorpio/src/scolfs/utils.rs new file mode 100644 index 000000000..635cce311 --- /dev/null +++ b/scorpio/src/scolfs/utils.rs @@ -0,0 +1,18 @@ +use std::{fs, path::PathBuf}; +use super::super::util::config; +// Get the `lfs_path` from the TOML file and return a PathBuf. +pub fn lfs_path() -> PathBuf{ + let mut store_path_buf = config::store_path(); + store_path_buf.push("scorpio_lfs"); + if !store_path_buf.exists() { + fs::create_dir_all(&store_path_buf).expect("Failed to create directory"); + } + store_path_buf + +} + +// Get the `lfs_attribate` from the TOML file and return a PathBuf. +pub fn lfs_attribate() -> PathBuf{ + let mut lfs_path = lfs_path(); + lfs_path.push(".libra_attribute"); +} \ No newline at end of file diff --git a/scorpio/src/server/mod.rs b/scorpio/src/server/mod.rs index fb620a643..6f1aa656a 100644 --- a/scorpio/src/server/mod.rs +++ b/scorpio/src/server/mod.rs @@ -57,6 +57,7 @@ use std::ffi::{OsStr, OsString}; use fuse3::{raw::Session, MountOptions}; +#[allow(unused)] pub async fn mount_filesystem(fs:F,mountpoint:&OsStr) -> MountHandle { env_logger::init(); //let logfs = LoggingFileSystem::new(fs); diff --git a/scorpio/src/util/config.rs b/scorpio/src/util/config.rs new file mode 100644 index 000000000..d37036b6c --- /dev/null +++ b/scorpio/src/util/config.rs @@ -0,0 +1,43 @@ +// ... existing code ... +use std::collections::HashMap; +use ceres::lfs; +use serde::Deserialize; +use toml::Table; +use std::path::PathBuf; +use std::{fs, io}; + +static CONFIG:&str = "config.toml"; + +// Read the scorpio (config)TOML file and return a Table. +#[inline] +fn read_toml() -> Table{ + + let config_content = std::fs::read_to_string(CONFIG).expect("Unable to read config file"); + toml::de::from_str(&config_content).expect("Unable to parse TOML") + +} + +// Get the `store_path` from the TOML file and return a PathBuf. +pub fn store_path() -> PathBuf{ + let config = read_toml(); + let store_path = config.get("store_path").expect("store_path not found in config").as_str().unwrap(); + + + let mut store_path_buf = PathBuf::from(store_path); + + if !store_path_buf.exists() { + fs::create_dir_all(&store_path_buf).expect("Failed to create directory"); + } + store_path_buf +} + +pub fn mount_path() -> PathBuf{ + let config = read_toml(); + let mount_path = config.get("mount_path").expect("mount_path not found in config").as_str().unwrap(); + PathBuf::from(mount_path) +} +pub fn git_branch() -> Result{ + let config = read_toml(); + let git_branch = config.get("git_branch").expect("git_branch not found in config").as_str()?; + Ok(git_branch.to_string()) +} \ No newline at end of file diff --git a/scorpio/test/start.sh b/scorpio/test/start.sh new file mode 100644 index 000000000..033cee300 --- /dev/null +++ b/scorpio/test/start.sh @@ -0,0 +1,7 @@ + +#/home/luxian/.cargo/bin/buck2 build //:main +#/home/luxian/megadir/mount +alias um='sudo umount ~/megadir/mount' +alias sco='cd ~/megadir/mount/third-part' +alias sto='cd ~/megadir/store' +cd .. && ./target/release/mono service http \ No newline at end of file