Replies: 2 comments
-
|
Nevermind I found the |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Exactly. Also, https://nuetzlich.net/the-fuse-wire-protocol/ . That's some
notes i took when writing gocryptfs.
…On Sun, 16 Feb 2025, 15:46 Lars Quentin, ***@***.***> wrote:
Nevermind I found the fh, st, errno := NewFile(fd, cName, rn) in Create/
Open (node_open_create.go)
—
Reply to this email directly, view it on GitHub
<#896 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACGA763J2XJCYSGDLZSUPT2QCQFVAVCNFSM6AAAAABXGUFPJKVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTEMRRGU3DONI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I would love to understand how go-fuse knows that the File struct implements the correct
Readoperation. Like, the Go equivalent to the Cfuse_operationsstruct.Also sorry if I somehow use the wrong words, I am quite new to go...
What I understand so far:
maincallsdoMountfor starting the fuse serverdoMount,initFuseFrontendcreates anRootNode, which "inherits" ofNode, which implements Node level FUSE calls.RootNodegets casted into afs.InodeEmbedder, but since go interfaces work like vtables it still resolves to the new functions.RootNodecan be given to go-fuse viafs.Mount(ininitGoFuse), and go-fuse can just do calls against this object and dynamic dispatch resolves it into the proper methods.But through this method, only the
Nodemethods (such asGETATTR) are defined. Methods auch asREAD(that are defined onFile) are still unclear to me.Next, I tried to trace the FUSE operations via
--fusedebug. For reading a file usingcat, I got the following method trace:GETATTTRLOOKUPOPENREADFLUSHRELEASEI guess that in one of the early methods implemented by
Nodeit somehow returns aFileobject so thatgo-fusecan call the fileRead. But for the love of god, I can't find it.Can you point me to where it happens?
PS: If it is a good motivation, I am probably adapting gocryptfs in my masters thesis and will definitely contribute back once I have something that makes sense for the public.
Beta Was this translation helpful? Give feedback.
All reactions