DEVEL15-linux-afs-translator-xen-20060731
[openafs.git] / src / afs / afs_volume.c
index 98a1813..c8d6300 100644 (file)
@@ -40,6 +40,7 @@ RCSID
 
 #include "afsincludes.h"       /* Afs-based standard headers */
 #include "afs/afs_stats.h"     /* afs statistics */
+#include "afs/afs_dynroot.h"
 
 #if    defined(AFS_SUN56_ENV)
 #include <inet/led.h>
@@ -432,7 +433,7 @@ afs_GetVolume(struct VenusFid *afid, struct vrequest *areq,
 
     tv = afs_FindVolume(afid, locktype);
     if (!tv) {
-       if (afs_IsDynrootFid(afid)) {
+       if (afs_IsDynrootAnyFid(afid)) {
            tv = afs_NewDynrootVolume(afid);
        } else {
            bp = afs_cv2string(&tbuf[CVBS], afid->Fid.Volume);
@@ -523,6 +524,11 @@ afs_SetupVolume(afs_int32 volid, char *aname, void *ve, struct cell *tcell,
        } else {
            tv->vtix = -1;
            tv->rootVnode = tv->rootUnique = 0;
+            afs_GetDynrootMountFid(&tv->dotdot);
+            afs_GetDynrootMountFid(&tv->mtpoint);
+            tv->mtpoint.Fid.Vnode =
+              VNUM_FROM_TYPEID(VN_TYPE_MOUNT, tcell->cellIndex << 2);
+            tv->mtpoint.Fid.Unique = volid;
        }
     }
     tv->refCount++;