Coda File System

Re: -noleaf

From: Patrick Walsh <pwalsh_at_esoft.com>
Date: Thu, 28 Jul 2005 10:46:26 -0600
On Thu, 2005-07-28 at 11:57 -0400, Jan Harkes wrote:
> On Mon, Jul 25, 2005 at 01:21:47PM -0600, Patrick Walsh wrote:
> > 	I thought the find command no longer needed the -noleaf parameter?  Yet
> > today I did the following:
> > 
> > # find . -noleaf -name 'File*'
> > ./xyz/FileCertificate.php
> > ./xyz/FileSerial.php
> > # find . -name 'File*'
> 
> I don't know, does 'stat .' tell you that the linkcount is 1 or not? If
> it is set to one, that is about as much as we can to to prevent the GNU
> find optimization that I know of which is disabled by -noleaf.

	Oddly, I'm not able to reproduce this today.

	OK... just reproduced it by doing a:
 
cp -r /non-coda-path/to/source/dir/ /coda/realm/destdir

	Then doing a find from the parent directory came up with no matches
where a minute before it was finding some from a different directory.

	The link counts are 1 or greater for each of the directories in
question.

	Here's a transcript (with paths modified a little bit):

# cd /coda/realm/destdir
# find . -name 'GetNew*'
# find . -name 'GetNew*' -noleaf
./subdir/GetNewYYY.php
./subdir/GetNewZZZ.php
./orig/subdir/GetNewYYY.php
./orig/subdir/GetNewZZZ.php
# stat .
  File: "."
  Size: 2048            Blocks: 4          IO Block:
-4611713506218074112 Directory
Device: ah/10d  Inode: 1352058954  Links: 2
Access: (0775/drwxrwxr-x)  Uid: (  500/postgres)   Gid: (65534/ UNKNOWN)
Access: Thu Jul 28 10:37:59 2005
Modify: Thu Jul 28 10:39:23 2005
Change: Thu Jul 28 10:39:23 2005

# stat subdir
  File: "subdir"
  Size: 2048            Blocks: 4          IO Block:
-4611694883239878656 Directory
Device: ah/10d  Inode: 1351958397  Links: 1
Access: (0755/drwxr-xr-x)  Uid: (  501/hacluster)   Gid: (65534/
UNKNOWN)
Access: Thu Jul 28 10:39:40 2005
Modify: Thu Jul 28 10:39:40 2005
Change: Thu Jul 28 10:39:40 2005

# stat orig/subdir/
  File: "orig/subdir/"
  Size: 2048            Blocks: 4          IO Block:
-4611696532507320320 Directory
Device: ah/10d  Inode: 1352054872  Links: 1
Access: (0775/drwxrwxr-x)  Uid: (  500/postgres)   Gid: (65534/ UNKNOWN)
Access: Mon Jul 25 15:02:52 2005
Modify: Mon Jul 25 15:02:52 2005
Change: Mon Jul 25 15:02:52 2005



-- 
Patrick Walsh
eSoft Incorporated
303.444.1600 x3350
http://www.esoft.com/

Received on 2005-07-28 12:47:28