[OpenAFS-devel] directory inodes with multiple dentries

Chaskiel M Grundman cg2v@andrew.cmu.edu
Wed, 27 Apr 2005 18:38:01 -0400


--==========01A050C9993E32E6773F==========
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Various comments and documentation in/about the linux kernel state that=20
inodes that belong to directories cannot have multiple dentry objects=20
(called 'aliases' in this case) associated with them. AFS can violate this=20
restriction in a couple of cases:

1) paths involving @sys: when the afs client processes a pathname component =

that contains the string @sys, it internally replaces the @sys with the=20
current sysname value (or, if multiple sysname values are configured, it=20
iterates over them until it finds a matching name).  afs_linux_lookup then=20
d_add()'s the returned inode with the callers dentry (which contains the=20
untranslated string). If some other operation looks up the "real" name,=20
that name also gets d_add()'d with the same inode object.
2) multiply-mounted volumes. A similar thing happens when a volume is=20
mounted in more than one location. The volume root (and it's children) is=20
the same vcache/vnode/inode wherever it is mounted, but each mountpoint=20
will have a unique dentry.

I actually encountered a hang as a result of this situation, where=20
lock_rename() downed the same semaphore twice.

I have a patch for this that seems to work, but I'd like some of the other=20
linux-aware people on the list to look it over and let me know if my use of =

d_find_alias is appropriate here or if I should be doing something else.=20
Suggestions for what conditional I should be using would be welcome.

<http://www.contrib.andrew.cmu.edu/~cg2v/openafs-patches/osi_vn_alias.diff>

It has been requested that I try to make sure that the (one and only)=20
dentry never has the @sys name in it. The only way we came up to do this is =

to extend the afs_lookup() interface to return the translated name if @sys=20
processing was done. Does this seem appropriate?
--==========01A050C9993E32E6773F==========
Content-Type: application/pkcs7-signature
Content-Transfer-Encoding: base64

MIIOmAYJKoZIhvcNAQcCoIIOiTCCDoUCAQExCzAJBgUrDgMCGgUAMAsGCSqGSIb3
DQEHAaCCDAQwggS/MIICp6ADAgECAgMAnckwDQYJKoZIhvcNAQEEBQAweTEQMA4G
A1UEChMHUm9vdCBDQTEeMBwGA1UECxMVaHR0cDovL3d3dy5jYWNlcnQub3JnMSIw
IAYDVQQDExlDQSBDZXJ0IFNpZ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