Some years ago I made it O(n^2).
Someone helpfully made it O(n^4) again.
Today I'm making it O(n).
If that's not good enough, I don't know what else to do. B-)
Technical details:
* The graph traversal in propagate() is modified to be able to start from any
point in the tree. To handle certain exceptional cases, it is also modified
to work in two passes, marking the tree with a special tag and then changing
it to DFOUND.
* The reconnect case now modifies the child/sibling pointers and calls
propagate() to propagate the connection state starting with the reconnected
directory.
Pray that you never encounter a file system trashed enough for this to matter.
Also, be a bit more conservative with the clean flag: don't mark the FS
clean when we know there may still be errors (user anserwed 'n' to
a question, or fsck says "you must rerun fsck").
- added missing prototypes, and made local functions static
- removed parallel preening code; this is part of fsck(8)
- use printing utilities from fsck(8)
- Makefile does not make links to fsck and fsck.8
- removed -l maxparallel option. It has no meaning anymore.