Expand PMF_FN_* macros.
[netbsd-mini2440.git] / sys / miscfs / syncfs / syncfs.h
bloba878fbc710b3db8882068672093e3aaa7b289077
1 /* $NetBSD: syncfs.h,v 1.10 2006/10/20 18:58:12 reinoud Exp $ */
3 /*
4 * Copyright 1997 Marshall Kirk McKusick. All Rights Reserved.
6 * This code is derived from work done by Greg Ganger at the
7 * University of Michigan.
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions
11 * are met:
12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in the
16 * documentation and/or other materials provided with the distribution.
17 * 3. None of the names of McKusick, Ganger, or the University of Michigan
18 * may be used to endorse or promote products derived from this software
19 * without specific prior written permission.
21 * THIS SOFTWARE IS PROVIDED BY MARSHALL KIRK MCKUSICK ``AS IS'' AND
22 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 * ARE DISCLAIMED. IN NO EVENT SHALL MARSHALL KIRK MCKUSICK BE LIABLE
25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
34 #ifndef _MISCFS_SYNCFS_SYNCFS_H_
35 #define _MISCFS_SYNCFS_SYNCFS_H_
38 * Routines to create and manage a filesystem syncer vnode.
40 #define sync_close genfs_nullop
41 int sync_fsync(void *);
42 int sync_inactive(void *);
43 int sync_reclaim(void *);
44 #define sync_lock genfs_nolock
45 #define sync_unlock genfs_nounlock
46 int sync_print(void *);
47 #define sync_islocked genfs_noislocked
48 #define sync_putpages genfs_null_putpages
50 void sched_sync(void *);
51 void vn_initialize_syncerd(void);
52 int vfs_allocate_syncvnode(struct mount *);
53 void vfs_deallocate_syncvnode(struct mount *);
55 extern int (**sync_vnodeop_p)(void *);
57 #define SYNCER_MAXDELAY 32
59 extern int syncer_maxdelay; /* maximum delay time */
60 extern kmutex_t syncer_mutex; /* lock to freeze syncer during unmount */
61 TAILQ_HEAD(synclist, vnode);
63 #endif /* _MISCFS_SYNCFS_SYNCFS_H_ */