Skip to content

actiondfs: preserve directory iteration while deleting staged entries - #39

Open
zbarsky-openai wants to merge 1 commit into
hermeticbuild:mainfrom
zbarsky-openai:zbarsky/actiondfs-staged-readdir-deletions
Open

zbarsky-openai wants to merge 1 commit into
hermeticbuild:mainfrom
zbarsky-openai:zbarsky/actiondfs-staged-readdir-deletions

Conversation

@zbarsky-openai

Copy link
Copy Markdown

Deleting staged directory entries while iterating across multiple
getdents buffers currently fails with:

rm: can't remove 'bazel-out/darwin_arm64-fastbuild/bin/external/+local_repository+actiond_readdir_probe/actiond-staged-readdir-deletion': Directory not empty

Each deletion increments the staged directory generation. Reopening an active
backing directory after that change restarts ext4 iteration from the beginning,
then applies the old logical offset to a smaller directory and skips surviving
entries. Preserve an active backing-directory cursor across generation changes;
retain the existing reopen behavior once iteration has reached EOF.

Extend the existing filesystem E2E action with 1,536 staged entries deleted
through a single live iterator. A full ARM64 guest-kernel build completed via
actiond (3,599 actions, 961 remotely executed), and the exact previously failing
1,536-entry Bazel reproduction now succeeds remotely with the rebuilt kernel.

Deleting staged directory entries while iterating across multiple
`getdents` buffers currently fails with:

```text
rm: can't remove 'bazel-out/darwin_arm64-fastbuild/bin/external/+local_repository+actiond_readdir_probe/actiond-staged-readdir-deletion': Directory not empty
```

Each deletion increments the staged directory generation. Reopening an active
backing directory after that change restarts ext4 iteration from the beginning,
then applies the old logical offset to a smaller directory and skips surviving
entries. Preserve an active backing-directory cursor across generation changes;
retain the existing reopen behavior once iteration has reached EOF.

Extend the existing filesystem E2E action with 1,536 staged entries deleted
through a single live iterator. A full ARM64 guest-kernel build completed via
actiond (3,599 actions, 961 remotely executed), and the exact previously failing
1,536-entry Bazel reproduction now succeeds remotely with the rebuilt kernel.
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