diff options
author | Jim Meyering <meyering@redhat.com> | 2009-02-11 12:26:14 +0100 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2009-02-13 18:41:01 +0100 |
commit | 982504452d60a87632a5a2f11d1be645e06d8346 (patch) | |
tree | 648357f7b4178fc1f11aa4f1f1d4052eccbac25c /src/du.c | |
parent | 48cae1e8642684f0103848b84d5884d1ba2412c8 (diff) | |
download | coreutils-982504452d60a87632a5a2f11d1be645e06d8346.tar.xz |
du,chgrp,chmod,chown: use FTS_DEFER_STAT
* src/du.c (main): Use FTS_DEFER_STAT, for better locality of inode
reference. Important when traversing file systems with fake inodes.
* src/chgrp.c (main): Likewise.
* src/chmod.c (main): Likewise.
* src/chown.c (main): Likewise.
The only remaining fts client, chcon, doesn't need this, since it goes
further and uses FTS_NOSTAT, which suppresses all non- directory
stat calls.
Diffstat (limited to 'src/du.c')
-rw-r--r-- | src/du.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,5 +1,5 @@ /* du -- summarize disk usage - Copyright (C) 1988-1991, 1995-2008 Free Software Foundation, Inc. + Copyright (C) 1988-1991, 1995-2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -660,7 +660,7 @@ main (int argc, char **argv) char *files_from = NULL; /* Bit flags that control how fts works. */ - int bit_flags = FTS_TIGHT_CYCLE_CHECK; + int bit_flags = FTS_TIGHT_CYCLE_CHECK | FTS_DEFER_STAT; /* Select one of the three FTS_ options that control if/when to follow a symlink. */ |