summaryrefslogtreecommitdiffstats
path: root/sys/sys/bufobj.h
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2005-01-11 10:43:08 +0000
committerphk <phk@FreeBSD.org>2005-01-11 10:43:08 +0000
commit5a497775d6a793f5afeceff71192b3980f5a8ad2 (patch)
tree345fd3ee96f403ea4e52a2ed39eed971f68efa29 /sys/sys/bufobj.h
parent169f1013f0189eb8dd358567ce979f1288609974 (diff)
downloadFreeBSD-src-5a497775d6a793f5afeceff71192b3980f5a8ad2.zip
FreeBSD-src-5a497775d6a793f5afeceff71192b3980f5a8ad2.tar.gz
Add BO_SYNC() and add a default which uses the secret vnode pointer
and VOP_FSYNC() for now.
Diffstat (limited to 'sys/sys/bufobj.h')
-rw-r--r--sys/sys/bufobj.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/sys/bufobj.h b/sys/sys/bufobj.h
index 523ba43..7b0243e 100644
--- a/sys/sys/bufobj.h
+++ b/sys/sys/bufobj.h
@@ -69,14 +69,17 @@ struct bufv {
typedef void b_strategy_t(struct bufobj *, struct buf *);
typedef int b_write_t(struct buf *);
+typedef int b_sync_t(struct bufobj *, int waitfor, struct thread *td);
struct buf_ops {
char *bop_name;
b_write_t *bop_write;
b_strategy_t *bop_strategy;
+ b_sync_t *bop_sync;
};
#define BO_STRATEGY(bo, bp) ((bo)->bo_ops->bop_strategy((bo), (bp)))
+#define BO_SYNC(bo, w, td) ((bo)->bo_ops->bop_sync((bo), (w), (td)))
#define BO_WRITE(bo, bp) ((bo)->bo_ops->bop_write((bp)))
struct bufobj {
@@ -123,6 +126,7 @@ struct bufobj {
void bufobj_wdrop(struct bufobj *bo);
void bufobj_wref(struct bufobj *bo);
int bufobj_wwait(struct bufobj *bo, int slpflag, int timeo);
+int bufsync(struct bufobj *bo, int waitfor, struct thread *td);
#endif /* defined(_KERNEL) || defined(_KVM_VNODE) */
#endif /* _SYS_BUFOBJ_H_ */
OpenPOWER on IntegriCloud