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:
parent
66aa222e60
commit
731959b118
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=155177
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user