#ifdef AFS_DEMAND_ATTACH_FS
-#include <afs/afs_assert.h>
+#include <afs/opr.h>
+#include <rx/rx_queue.h>
+#include <opr/lock.h>
#include <lock.h>
#include <afs/afsutil.h>
-#include <lwp.h>
#include "nfs.h"
#include <afs/afsint.h>
#include "ihandle.h"
ViceLog(0, ("_VVGC_scan_start: pthread_create failed with %d\n", code));
old_state = _VVGC_state_change(dp, VVGC_PART_STATE_INVALID);
- osi_Assert(old_state == VVGC_PART_STATE_UPDATING);
+ opr_Assert(old_state == VVGC_PART_STATE_UPDATING);
}
error:
for (queue_Scan(&VVGCache.part[dp->index].dlist_hash_buckets[bucket],
ent, nent,
VVGCache_dlist_entry)) {
-
- if (ent->child == child && ent->parent == parent) {
+ if (ent->child == child
+ && (ent->parent == 0 || ent->parent == parent)) {
return ent;
}
}
* back onto the VGC.
*
* @param[in] dp the partition to whose dlist we are adding
- * @param[in] parent the parent volumeID of the VGC entry
+ * @param[in] parent the parent volumeID of the VGC entry, or 0 for any
* @param[in] child the child volumeID of the VGC entry
*
* @return operation status
}
entry->child = child;
- entry->parent = parent;
+ entry->parent = parent; /* May be zero to match any child. */
queue_Append(&VVGCache.part[dp->index].dlist_hash_buckets[bucket],
entry);