}
#endif /* AFS_TEXT_ENV */
-/* ? is it moderately likely that there are dirty VM pages associated with
- * this vnode?
- *
- * Prereqs: avc must be write-locked
- *
- * System Dependencies: - *must* support each type of system for which
- * memory mapped files are supported, even if all
- * it does is return TRUE;
- *
- * NB: this routine should err on the side of caution for ProcessFS to work
- * correctly (or at least, not to introduce worse bugs than already exist)
- */
-#ifdef notdef
-int
-osi_VMDirty_p(struct vcache *avc)
-{
- int dirtyPages;
-
- if (avc->execsOrWriters <= 0)
- return 0; /* can't be many dirty pages here, I guess */
-
-#if defined (AFS_AIX32_ENV)
-#ifdef notdef
- /* because of the level of hardware involvment with VM and all the
- * warnings about "This routine must be called at VMM interrupt
- * level", I thought it would be safest to disable interrupts while
- * looking at the software page fault table. */
-
- /* convert vm handle into index into array: I think that stoinio is
- * always zero... Look into this XXX */
-#define VMHASH(handle) ( \
- ( ((handle) & ~vmker.stoinio) \
- ^ ((((handle) & ~vmker.stoinio) & vmker.stoimask) << vmker.stoihash) \
- ) & 0x000fffff)
-
- if (avc->segid) {
- unsigned int pagef, pri, index, next;
-
- index = VMHASH(avc->segid);
- if (scb_valid(index)) { /* could almost be an ASSERT */
-
- pri = disable_ints();
- for (pagef = scb_sidlist(index); pagef >= 0; pagef = next) {
- next = pft_sidfwd(pagef);
- if (pft_modbit(pagef)) { /* has page frame been modified? */
- enable_ints(pri);
- return 1;
- }
- }
- enable_ints(pri);
- }
- }
-#undef VMHASH
-#endif
-#endif /* AFS_AIX32_ENV */
-
-#if defined (AFS_SUN5_ENV)
- if (avc->f.states & CMAPPED) {
- struct page *pg;
- for (pg = AFSTOV(avc)->v_s.v_Pages; pg; pg = pg->p_vpnext) {
- if (pg->p_mod) {
- return 1;
- }
- }
- }
-#endif
- return 0;
-}
-#endif /* notdef */
-
-
/*
* Solaris osi_ReleaseVM should not drop and re-obtain the vcache entry lock.
* This leads to bad races when osi_ReleaseVM() is called from