Make afs_GetVolume() correctly handle requests for fids which are in
the dynroot cell but are not the root of the dynamic root volume. This
is necessary to allow dynamic root mount points to be looked up and
followed in situations where the dynroot volume is not in the volcache,
but its root vnode is in the vcache.
Reviewed-on: http://gerrit.openafs.org/http://gerrit.openafs.org/180
Tested-by: Jeffrey Hutzelman <jhutz@cmu.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
&& fid->Fid.Unique == AFS_DYNROOT_UNIQUE);
}
+int
+afs_IsDynrootAnyFid(struct VenusFid *fid)
+{
+ return (afs_dynrootEnable && fid->Cell == afs_dynrootCell
+ && fid->Fid.Volume == AFS_DYNROOT_VOLUME);
+}
+
/*
* Obtain the magic dynroot volume Fid.
*/
/* afs_dynroot.c */
extern int afs_IsDynrootFid(struct VenusFid *fid);
+extern int afs_IsDynrootAnyFid(struct VenusFid *fid);
extern void afs_GetDynrootFid(struct VenusFid *fid);
extern int afs_IsDynroot(struct vcache *avc);
extern void afs_DynrootInvalidate(void);
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);