Skip to content

fsgofer: add extension prepare hooks#13223

Open
shayonj wants to merge 1 commit into
google:masterfrom
shayonj:s/gofer-extension-setup
Open

fsgofer: add extension prepare hooks#13223
shayonj wants to merge 1 commit into
google:masterfrom
shayonj:s/gofer-extension-setup

Conversation

@shayonj
Copy link
Copy Markdown
Contributor

@shayonj shayonj commented May 20, 2026

Custom fsgofer extensions may need to prepare state before the gofer drops capabilities and enters its final root. For example, an extension may need to register gofer flags, open resources, and pass file descriptor numbers through the gofer re-exec path.

This is a proposal to allow extensions to optionally define SetFlags and PrepareGofer methods. SetFlags can add gofer flags during command setup. PrepareGofer runs after root setup and before capability application and its FlagOverrides are merged into the arguments used for gofer re-exec.

This keeps the base Extension interface focused on mount handling while allowing extensions that need early preparation to opt in. No behavior changes when no registered extension defines these optional methods.

Related: #12950

Custom fsgofer extensions may need to prepare state before the gofer drops capabilities and enters its final root. For example, an extension may need to register gofer flags, open resources, and pass file descriptor numbers through the gofer re-exec path.

Allow extensions to optionally define SetFlags and PrepareGofer methods. SetFlags can add gofer flags during command setup. PrepareGofer runs after root setup and before capability application; its FlagOverrides are merged into the arguments used for gofer re-exec.

This keeps the base Extension interface focused on mount handling while allowing extensions that need early preparation to opt in. No behavior changes when no registered extension defines these optional methods.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant