vfs_subr.c: export io_hold_cnt and vn_read_from_obj().

Reviewed by:	markj
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
Differential revision:	https://reviews.freebsd.org/D26346
This commit is contained in:
Konstantin Belousov 2020-09-15 22:00:58 +00:00
parent 96474d2a3f
commit 888636655d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=365784
2 changed files with 5 additions and 3 deletions

View File

@ -125,7 +125,7 @@ struct fileops vnops = {
.fo_flags = DFLAG_PASSABLE | DFLAG_SEEKABLE
};
static const int io_hold_cnt = 16;
const u_int io_hold_cnt = 16;
static int vn_io_fault_enable = 1;
SYSCTL_INT(_debug, OID_AUTO, vn_io_fault_enable, CTLFLAG_RWTUN,
&vn_io_fault_enable, 0, "Enable vn_io_fault lock avoidance");
@ -848,7 +848,7 @@ get_advice(struct file *fp, struct uio *uio)
return (ret);
}
static int
int
vn_read_from_obj(struct vnode *vp, struct uio *uio)
{
vm_object_t obj;

View File

@ -392,6 +392,7 @@ MALLOC_DECLARE(M_VNODE);
#endif
extern u_int ncsizefactor;
extern const u_int io_hold_cnt;
/*
* Convert between vnode types and inode formats (since POSIX.1
@ -734,7 +735,8 @@ int vn_rdwr_inchunks(enum uio_rw rw, struct vnode *vp, void *base,
size_t len, off_t offset, enum uio_seg segflg, int ioflg,
struct ucred *active_cred, struct ucred *file_cred, size_t *aresid,
struct thread *td);
int vn_rlimit_fsize(const struct vnode *vn, const struct uio *uio,
int vn_read_from_obj(struct vnode *vp, struct uio *uio);
int vn_rlimit_fsize(const struct vnode *vp, const struct uio *uio,
struct thread *td);
int vn_start_write(struct vnode *vp, struct mount **mpp, int flags);
int vn_start_secondary_write(struct vnode *vp, struct mount **mpp,