/*
- * Copyright (c) 1999, 2000 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 1999, 2000-2002 Apple Computer, Inc. All rights reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
#ifndef _SYS_UBC_H_
#define _SYS_UBC_H_
+#include <sys/appleapiopts.h>
#include <sys/types.h>
#include <sys/ucred.h>
#include <sys/vnode.h>
#define UBC_INFO_NULL ((struct ubc_info *) 0)
#define UBC_NOINFO ((struct ubc_info *)0xDEADD1ED)
+#ifdef __APPLE_API_PRIVATE
extern struct zone *ubc_info_zone;
/*
int ui_refcount;/* ref count on the ubc_info */
off_t ui_size; /* file size for the vnode */
long ui_mapped; /* is it currently mapped */
+ void *ui_owner; /* for recursive ubc_busy */
};
/* Defines for ui_flags */
#define UI_HASOBJREF 0x00000004 /* hold a reference on object */
#define UI_WASMAPPED 0x00000008 /* vnode was mapped */
#define UI_DONTCACHE 0x00000010 /* do not cache object */
+#define UI_BUSY 0x00000020 /* for VM synchronization */
+#define UI_WANTED 0x00000040 /* for VM synchronization */
+#endif /* __APPLE_API_PRIVATE */
+
+#ifdef __APPLE_API_EVOLVING
/*
* exported primitives for loadable file systems.
*/
int ubc_invalidate __P((struct vnode *, off_t, size_t));
int ubc_isinuse __P((struct vnode *, int));
-int ubc_page_op __P((struct vnode *, off_t, int, vm_offset_t *, int *));
+int ubc_page_op __P((struct vnode *, off_t, int, ppnum_t *, int *));
/* cluster IO routines */
int cluster_read __P((struct vnode *, struct uio *, off_t, int, int));
int cluster_write __P((struct vnode *, struct uio*, off_t, off_t,
off_t, off_t, int, int));
int cluster_push __P((struct vnode *));
+int cluster_release __P((struct vnode *));
int cluster_pageout __P((struct vnode *, upl_t, vm_offset_t, off_t, int,
off_t, int, int));
int cluster_pagein __P((struct vnode *, upl_t, vm_offset_t, off_t, int,
off_t, int, int));
int cluster_bp __P((struct buf *));
+int cluster_copy_upl_data __P((struct uio *, upl_t, int, int));
+int cluster_copy_ubc_data __P((struct vnode *, struct uio *, int *, int));
/* UPL routines */
int ubc_create_upl __P((struct vnode *, off_t, long, upl_t *,
/* Flags for ubc_getobject() */
#define UBC_FLAGS_NONE 0x0000
#define UBC_HOLDOBJECT 0x0001
+#define UBC_FOR_PAGEOUT 0x0002
+
+#endif /* __APPLE_API_EVOLVING */
#endif /* _SYS_UBC_H_ */