summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_default.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/vfs_default.c')
-rw-r--r--sys/kern/vfs_default.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/sys/kern/vfs_default.c b/sys/kern/vfs_default.c
index 0112dcb..00d064e 100644
--- a/sys/kern/vfs_default.c
+++ b/sys/kern/vfs_default.c
@@ -81,6 +81,8 @@ static int dirent_exists(struct vnode *vp, const char *dirname,
static int vop_stdis_text(struct vop_is_text_args *ap);
static int vop_stdset_text(struct vop_set_text_args *ap);
static int vop_stdunset_text(struct vop_unset_text_args *ap);
+static int vop_stdget_writecount(struct vop_get_writecount_args *ap);
+static int vop_stdadd_writecount(struct vop_add_writecount_args *ap);
/*
* This vnode table stores what we want to do if the filesystem doesn't
@@ -133,6 +135,8 @@ struct vop_vector default_vnodeops = {
.vop_is_text = vop_stdis_text,
.vop_set_text = vop_stdset_text,
.vop_unset_text = vop_stdunset_text,
+ .vop_get_writecount = vop_stdget_writecount,
+ .vop_add_writecount = vop_stdadd_writecount,
};
/*
@@ -1100,6 +1104,22 @@ vop_stdunset_text(struct vop_unset_text_args *ap)
return (0);
}
+static int
+vop_stdget_writecount(struct vop_get_writecount_args *ap)
+{
+
+ *ap->a_writecount = ap->a_vp->v_writecount;
+ return (0);
+}
+
+static int
+vop_stdadd_writecount(struct vop_add_writecount_args *ap)
+{
+
+ ap->a_vp->v_writecount += ap->a_inc;
+ return (0);
+}
+
/*
* vfs default ops
* used to fill the vfs function table to get reasonable default return values.
OpenPOWER on IntegriCloud