summaryrefslogtreecommitdiffstats
path: root/sys/vm/vnode_pager.h
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1998-10-13 08:24:45 +0000
committerdg <dg@FreeBSD.org>1998-10-13 08:24:45 +0000
commit3defb6d13f481d8c8bb2d9014db42c8a5ee19f9d (patch)
tree64822d97637c55a2d7aeb4a999c847a5869bac46 /sys/vm/vnode_pager.h
parent3280e5edc1739224a3e662ea57aa1746d1eb9105 (diff)
downloadFreeBSD-src-3defb6d13f481d8c8bb2d9014db42c8a5ee19f9d.zip
FreeBSD-src-3defb6d13f481d8c8bb2d9014db42c8a5ee19f9d.tar.gz
Fixed two potentially serious classes of bugs:
1) The vnode pager wasn't properly tracking the file size due to "size" being page rounded in some cases and not in others. This sometimes resulted in corrupted files. First noticed by Terry Lambert. Fixed by changing the "size" pager_alloc parameter to be a 64bit byte value (as opposed to a 32bit page index) and changing the pagers and their callers to deal with this properly. 2) Fixed a bogus type cast in round_page() and trunc_page() that caused some 64bit offsets and sizes to be scrambled. Removing the cast required adding casts at a few dozen callers. There may be problems with other bogus casts in close-by macros. A quick check seemed to indicate that those were okay, however.
Diffstat (limited to 'sys/vm/vnode_pager.h')
-rw-r--r--sys/vm/vnode_pager.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/vm/vnode_pager.h b/sys/vm/vnode_pager.h
index 4402e14..b833e63 100644
--- a/sys/vm/vnode_pager.h
+++ b/sys/vm/vnode_pager.h
@@ -36,14 +36,14 @@
* SUCH DAMAGE.
*
* @(#)vnode_pager.h 8.1 (Berkeley) 6/11/93
- * $Id: vnode_pager.h,v 1.10 1997/02/22 09:48:43 peter Exp $
+ * $Id: vnode_pager.h,v 1.11 1998/02/26 06:39:59 msmith Exp $
*/
#ifndef _VNODE_PAGER_
#define _VNODE_PAGER_ 1
#ifdef KERNEL
-vm_object_t vnode_pager_alloc __P((void *, vm_size_t, vm_prot_t, vm_ooffset_t));
+vm_object_t vnode_pager_alloc __P((void *, vm_ooffset_t, vm_prot_t, vm_ooffset_t));
void vnode_pager_freepage __P((vm_page_t m));
struct vnode *vnode_pager_lock __P((vm_object_t));
OpenPOWER on IntegriCloud