[159] in The Cryptographic File System users list
Re: Virtual directory names beginning with '.'
daemon@ATHENA.MIT.EDU (Valdis.Kletnieks@vt.edu)
Wed Jan 26 04:49:59 2000
From owner-cfs-users@nsa.research.att.com Wed Jan 26 09:49:59 2000
Return-Path: <owner-cfs-users@nsa.research.att.com>
Delivered-To: cfs-mtg@CHARON2.mit.edu
Received: (qmail 22415 invoked from network); 26 Jan 2000 09:49:59 -0000
Received: from mail-blue.research.att.com (135.207.30.102)
by charon2.mit.edu with SMTP; 26 Jan 2000 09:49:59 -0000
Received: from amontillado.research.att.com (amontillado.research.att.com [135.207.24.32])
by mail-blue.research.att.com (Postfix) with ESMTP
id 4B3054CE09; Wed, 26 Jan 2000 04:49:58 -0500 (EST)
Received: from nsa.research.att.com (majordomo@nsa.research.att.com [135.207.24.155])
by amontillado.research.att.com (8.8.7/8.8.7) with ESMTP id EAA23600;
Wed, 26 Jan 2000 04:50:34 -0500 (EST)
Received: (from majordomo@localhost) by nsa.research.att.com (8.7.3/8.7.3) id EAA16388 for cfs-users-list; Wed, 26 Jan 2000 04:50:22 -0500 (EST)
X-Authentication-Warning: nsa.research.att.com: majordomo set sender to owner-cfs-users@nsa.research.att.com using -f
Received: from mail-green.research.att.com (mail-green.research.att.com [135.207.30.103]) by nsa.research.att.com (8.7.3/8.7.3) with ESMTP id EAA16384 for <cfs-users@nsa.research.att.com>; Wed, 26 Jan 2000 04:50:21 -0500 (EST)
Received: by mail-green.research.att.com (Postfix)
id B18AC1E016; Wed, 26 Jan 2000 04:49:48 -0500 (EST)
Delivered-To: cfs-users@research.att.com
Received: from black-ice.cc.vt.edu (black-ice.cc.vt.edu [128.173.14.71])
by mail-green.research.att.com (Postfix) with ESMTP id 84F141E00D
for <cfs-users@research.att.com>; Wed, 26 Jan 2000 04:49:48 -0500 (EST)
Received: from black-ice.cc.vt.edu (LOCALHOST [127.0.0.1])
by black-ice.cc.vt.edu (8.10.0.Beta12/8.10.0.Beta12) with ESMTP id e0Q9niU24312;
Wed, 26 Jan 2000 04:49:44 -0500
Message-Id: <200001260949.e0Q9niU24312@black-ice.cc.vt.edu>
To: Matthew Markopoulos <matthew.markopoulos@plant-sciences.oxford.ac.uk>
Cc: cfs-users@research.att.com, valdis@black-ice.cc.vt.edu
Subject: Re: Virtual directory names beginning with '.'
In-reply-to: Your message of "Tue, 25 Jan 2000 18:06:38 GMT."
<388DE62E.9D59F5F0@plant-sciences.oxford.ac.uk>
From: Valdis.Kletnieks@vt.edu
X-URL: http://black-ice.cc.vt.edu/~valdis/
X-Face: 34C9$Ewd2zeX+\!i1BA\j{ex+$/V'JBG#;3_noWWYPa"|,I#`R"{n@w>#:{)FXyiAS7(8t(
^*w5O*!8O9YTe[r{e%7(yVRb|qxsRYw`7J!`AM}m_SHaj}f8eb@d^L>BrX7iO[<!v4-0bVIpaxF#-)
%9#a9h6JXI|T|8o6t\V?kGl]Q!1V]GtNliUtz:3},0"hkPeBuu%E,j(:\iOX-P,t7lRR#
References: <388DE62E.9D59F5F0@plant-sciences.oxford.ac.uk>
Date: Wed, 26 Jan 2000 04:49:44 -0500
Sender: owner-cfs-users@research.att.com
Precedence: bulk
On Tue, 25 Jan 2000 18:06:38 GMT, Matthew Markopoulos <matthew.markopoulos@plant-sciences.oxford.ac.uk> said:
> [mattm01(2:69)]$ cattach crypt .mattm01
> Key:
> [mattm01(2:70)]$ ls -la /mnt/crypt
> ls: /mnt/crypt/.ANON_2: No such file or directory
> total 2
> drwxrwxrwx 4 root root 8192 Jan 25 17:51 ./
> drwxr-xr-x 7 root root 1024 Jan 21 16:52 ../
OK, what's happening is this:
A directory has at least 2 entries, . and .. - and .. *should*
point back to the parent directory. Now, when you look at
/mnt/crypt/.mattm01, cfs provides a reasonalbe '.' entry, but
'..' gets squirrely - .. points at /mnt/crypt, *BUT* there's no
.mattm01 entry pointing back to the subdir's '.' entry - the
entry is .ANON_2 in the parent directory. Also, when ls tries
to stat() .ANON_2, it dies as well...
Unfortunately, I see no way of "fixing" this without breaking the
feature of '.whatever' directories being hidden behind .ANON_n
entries - if referencing .ANON_n worked reasonably, you could use this as a
"symlink" sort of thing and not NEED to know the directory name
under it. In fact, the feature is implemented by intentionally
breaking the way . and .. and all that work....
I'll have to investigate, it *may* be possible to at least make '..'
work reasonably and still preserve the feature - a lot of programs
like to stat() . and .. for sanity, but most of them probably don't
then actually readdir("..") and search for an entry with the same
inode number as '.' (which would in fact be brokked in the case
of a mount point). This won't make /bin/ls any happier, but
most shells should be better (as they care about .. becuase they
may have to do a 'cd ..')..
Anyhow, it's 5AM and I need to snooze.. ;)
Valdis Kletnieks
Operating Systems Analyst
Virginia Tech