summaryrefslogtreecommitdiffstats
path: root/freebsd/sys/kern/vfs_cluster.c
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2021-08-02 15:09:41 +1000
committerChris Johns <chrisj@rtems.org>2021-08-28 10:25:46 +1000
commit6514d561587fd1527fe6a26cb43e6b5742c8c779 (patch)
tree922867fdc5aa24bbdf148bfae1b18dff0f283c10 /freebsd/sys/kern/vfs_cluster.c
parentrtemsbsd: Remove DHCP init wrapper (diff)
downloadrtems-libbsd-6514d561587fd1527fe6a26cb43e6b5742c8c779.tar.bz2
sys/kern: Add VFS support
- Refactor the libio interface - Move syscalls into an rtemsbsd location - Provide a root directory mount point Update #4475
Diffstat (limited to 'freebsd/sys/kern/vfs_cluster.c')
-rw-r--r--freebsd/sys/kern/vfs_cluster.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/freebsd/sys/kern/vfs_cluster.c b/freebsd/sys/kern/vfs_cluster.c
index 1ebe4a56..cae35911 100644
--- a/freebsd/sys/kern/vfs_cluster.c
+++ b/freebsd/sys/kern/vfs_cluster.c
@@ -1,3 +1,5 @@
+#include <machine/rtems-bsd-kernel-space.h>
+
/*-
* SPDX-License-Identifier: BSD-3-Clause
*
@@ -36,7 +38,7 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_debug_cluster.h"
+#include <rtems/bsd/local/opt_debug_cluster.h>
#include <sys/param.h>
#include <sys/systm.h>
@@ -254,7 +256,9 @@ cluster_read(struct vnode *vp, u_quad_t filesize, daddr_t lblkno, long size,
PROC_UNLOCK(td->td_proc);
}
#endif /* RACCT */
+#ifndef __rtems__
td->td_ru.ru_inblock++;
+#endif /* __rtems__ */
}
/*
@@ -314,7 +318,9 @@ cluster_read(struct vnode *vp, u_quad_t filesize, daddr_t lblkno, long size,
PROC_UNLOCK(td->td_proc);
}
#endif /* RACCT */
+#ifndef __rtems__
td->td_ru.ru_inblock++;
+#endif /* __rtems__ */
}
if (reqbp) {
@@ -447,6 +453,7 @@ cluster_rbuild(struct vnode *vp, u_quad_t filesize, daddr_t lbn,
* take part in the cluster. If it is partially valid
* then we stop.
*/
+#ifndef __rtems__
off = tbp->b_offset;
tsize = size;
VM_OBJECT_WLOCK(tbp->b_bufobj->bo_object);