-struct zone *ubc_info_zone;
-
-/* lock for changes to struct UBC */
-static __inline__ void
-ubc_lock(struct vnode *vp)
-{
- /* For now, just use the v_interlock */
- simple_lock(&vp->v_interlock);
-}
-
-/* unlock */
-static __inline__ void
-ubc_unlock(struct vnode *vp)
-{
- /* For now, just use the v_interlock */
- simple_unlock(&vp->v_interlock);
-}
-
-/*
- * Serialize the requests to the VM
- * Returns:
- * 0 - Failure
- * 1 - Sucessful in acquiring the lock
- * 2 - Sucessful in acquiring the lock recursively
- * do not call ubc_unbusy()
- * [This is strange, but saves 4 bytes in struct ubc_info]
- */
-static int
-ubc_busy(struct vnode *vp)
-{
- register struct ubc_info *uip;
-
- if (!UBCINFOEXISTS(vp))
- return (0);
-
- uip = vp->v_ubcinfo;
-
- while (ISSET(uip->ui_flags, UI_BUSY)) {
-
- if (uip->ui_owner == (void *)current_thread())
- return (2);
-
- SET(uip->ui_flags, UI_WANTED);
- (void) tsleep((caddr_t)&vp->v_ubcinfo, PINOD, "ubcbusy", 0);
-
- if (!UBCINFOEXISTS(vp))
- return (0);
- }
- uip->ui_owner = (void *)current_thread();
-
- SET(uip->ui_flags, UI_BUSY);
-
- return (1);
-}
-
-static void
-ubc_unbusy(struct vnode *vp)
-{
- register struct ubc_info *uip;
-
- if (!UBCINFOEXISTS(vp)) {
- wakeup((caddr_t)&vp->v_ubcinfo);
- return;
- }
- uip = vp->v_ubcinfo;
- CLR(uip->ui_flags, UI_BUSY);
- uip->ui_owner = (void *)NULL;
+int ubc_info_init_internal(struct vnode *vp, int withfsize, off_t filesize);
+static int ubc_umcallback(vnode_t, void *);
+int ubc_isinuse_locked(vnode_t, int, int);
+static int ubc_msync_internal(vnode_t, off_t, off_t, off_t *, int, int *);