summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2003-12-12 05:41:29 +0000
committerJim Meyering <jim@meyering.net>2003-12-12 05:41:29 +0000
commitdbbf89756257ca1b2bed2e7debb290e88da831fa (patch)
tree4542b51b287dc0ae32fec898112a51a1922821b5 /lib
parent057d6add25bd1f86c9a6347ad3c0bac4895466b8 (diff)
downloadcoreutils-dbbf89756257ca1b2bed2e7debb290e88da831fa.tar.xz
(FTS) [fts_dir_signatures]: Add comment.
Diffstat (limited to 'lib')
-rw-r--r--lib/fts_.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/fts_.h b/lib/fts_.h
index ed0cb1c25..b6ba1b481 100644
--- a/lib/fts_.h
+++ b/lib/fts_.h
@@ -69,8 +69,18 @@ typedef struct {
# define FTS_NAMEONLY 0x0100 /* (private) child names only */
# define FTS_STOP 0x0200 /* (private) unrecoverable error */
int fts_options; /* fts_open options, global flags */
- /* Data structure in which to store the fingerprint
- of each directory we've encountered. */
+
+ /* This data structure records the directories between a starting
+ point and the current directory. I.e., a directory is recorded
+ here IFF we have visited it once, but we have not yet completed
+ processing of all its entries. Every time we visit a new directory,
+ we add that directory to this set. When we finish with a directory
+ (usually by visiting it a second time), we remove it from this
+ set. Each entry in this data structure is a device/inode pair.
+ This data structure is used to detect directory cycles efficiently
+ and promptly even when the depth of a hierarchy is in the tens
+ of thousands. Lazy checking, as done by GNU rm via cycle-check.c,
+ wouldn't be appropriate for du. */
void *fts_dir_signatures;
} FTS;