Use off_t for file size passed to vnode_create_vobject().

The former type, size_t, was causing truncation to 32 bits on i386,
which immediately led to undersizing of VM objects backed by
files >4GB.  In particular, sendfile(2) was broken for such files.

PR:		kern/92243
MFC after:	5 days
This commit is contained in:
Yaroslav Tykhiy 2006-02-01 12:43:13 +00:00
parent 66aa222e60
commit 731959b118
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=155177
2 changed files with 2 additions and 2 deletions

View File

@ -700,7 +700,7 @@ void vref(struct vnode *vp);
int vrefcnt(struct vnode *vp);
void v_addpollinfo(struct vnode *vp);
int vnode_create_vobject(struct vnode *vp, size_t size, struct thread *td);
int vnode_create_vobject(struct vnode *vp, off_t size, struct thread *td);
void vnode_destroy_vobject(struct vnode *vp);
extern struct vop_vector fifo_specops;

View File

@ -97,7 +97,7 @@ int vnode_pbuf_freecnt;
/* Create the VM system backing object for this vnode */
int
vnode_create_vobject(struct vnode *vp, size_t isize, struct thread *td)
vnode_create_vobject(struct vnode *vp, off_t isize, struct thread *td)
{
vm_object_t object;
vm_ooffset_t size = isize;