Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F160204846
D49330.id152183.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D49330.id152183.diff
View Options
Index: sys/vm/vnode_pager.c
===================================================================
--- sys/vm/vnode_pager.c
+++ sys/vm/vnode_pager.c
@@ -1131,7 +1131,7 @@
* for real devices.
*/
foff = IDX_TO_OFF(bp->b_pages[0]->pindex);
- bytecount = bp->b_npages << PAGE_SHIFT;
+ bytecount = ptoa(bp->b_npages);
if ((foff + bytecount) > object->un_pager.vnp.vnp_size)
bytecount = object->un_pager.vnp.vnp_size - foff;
secmask = bo->bo_bsize - 1;
@@ -1227,7 +1227,7 @@
runningbufwakeup(bp);
- if (error == 0 && bp->b_bcount != bp->b_npages * PAGE_SIZE) {
+ if (error == 0 && bp->b_bcount != ptoa(bp->b_npages)) {
if (!buf_mapped(bp)) {
bp->b_data = bp->b_kvabase;
pmap_qenter((vm_offset_t)bp->b_data, bp->b_pages,
@@ -1313,7 +1313,7 @@
{
int rtval __diagused;
struct vnode *vp;
- int bytes = count * PAGE_SIZE;
+ int bytes = ptoa(count);
/*
* Force synchronous operation if we are extremely low on memory
@@ -1397,7 +1397,7 @@
return (VM_PAGER_BAD);
}
- maxsize = count * PAGE_SIZE;
+ maxsize = ptoa(count);
ncount = count;
poffset = IDX_TO_OFF(ma[0]->pindex);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Jun 23, 3:59 AM (15 h, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34229334
Default Alt Text
D49330.id152183.diff (1 KB)
Attached To
Mode
D49330: vnode_pager: use ptoa(), atop()
Attached
Detach File
Event Timeline
Log In to Comment