static uint32 prefetch_hash(void *_session, const void *_key, uint32 range) { Session *session = (Session *)_session; const struct node_ref *key = (node_ref *)_key; if (session != NULL) return VNODE_HASH(session->NodeRef().device, session->NodeRef().node) % range; return VNODE_HASH(key->device, key->node) % range; }
static int prefetch_compare(void *_session, const void *_key) { Session *session = (Session *)_session; const struct node_ref *key = (node_ref *)_key; if (session->NodeRef().device == key->device && session->NodeRef().node == key->node) return 0; return -1; }