Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix -delete on FreeBSD NFS mounts #67

Closed
tavianator opened this issue Apr 5, 2021 · 0 comments
Closed

Fix -delete on FreeBSD NFS mounts #67

tavianator opened this issue Apr 5, 2021 · 0 comments

Comments

@tavianator
Copy link
Owner

Doing unlink() during readdir() on FreeBSD makes it skip some directory entries: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=57696

Easily reproducible with

$ mkdir foo && touch foo/{1..256}
$ bfs foo -delete
bfs: error: foo: Directory not empty.
$ bfs foo -delete
$

However, find, rm, etc. seem to work around it. truss indicates that they fully read the directory before starting to remove files. That means we have some workarounds:

$ mkdir foo && touch foo/{1..256}
$ ./bfs -S dfs foo -delete
$ mkdir foo && touch foo/{1..256}
$ ./bfs -s foo -delete
$

But it would be nice if plain bfs worked too.

tavianator added a commit that referenced this issue Apr 18, 2021
tavianator added a commit that referenced this issue Apr 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant