Skip to content

fsgofer: add extension prepare hooks#13353

Open
copybara-service[bot] wants to merge 1 commit into
masterfrom
test/cl926157510
Open

fsgofer: add extension prepare hooks#13353
copybara-service[bot] wants to merge 1 commit into
masterfrom
test/cl926157510

Conversation

@copybara-service
Copy link
Copy Markdown

fsgofer: add extension prepare hooks

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
FUTURE_COPYBARA_INTEGRATE_REVIEW=#13223 from shayonj:s/gofer-extension-setup b52d4ab

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
FUTURE_COPYBARA_INTEGRATE_REVIEW=#13223 from shayonj:s/gofer-extension-setup b52d4ab
PiperOrigin-RevId: 926157510
@copybara-service copybara-service Bot added the exported Issue was exported automatically label Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

exported Issue was exported automatically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant