Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F142946691
D25138.id72760.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
D25138.id72760.diff
View Options
Index: head/sys/vm/vnode_pager.c
===================================================================
--- head/sys/vm/vnode_pager.c
+++ head/sys/vm/vnode_pager.c
@@ -1150,28 +1150,30 @@
if (mt == bogus_page)
continue;
- if (nextoff <= object->un_pager.vnp.vnp_size) {
- /*
- * Read filled up entire page.
- */
- vm_page_valid(mt);
- KASSERT(mt->dirty == 0,
- ("%s: page %p is dirty", __func__, mt));
- KASSERT(!pmap_page_is_mapped(mt),
- ("%s: page %p is mapped", __func__, mt));
- } else {
- /*
- * Read did not fill up entire page.
- *
- * Currently we do not set the entire page valid,
- * we just try to clear the piece that we couldn't
- * read.
- */
- vm_page_set_valid_range(mt, 0,
- object->un_pager.vnp.vnp_size - tfoff);
- KASSERT((mt->dirty & vm_page_bits(0,
- object->un_pager.vnp.vnp_size - tfoff)) == 0,
- ("%s: page %p is dirty", __func__, mt));
+ if (error == 0) {
+ if (nextoff <= object->un_pager.vnp.vnp_size) {
+ /*
+ * Read filled up entire page.
+ */
+ vm_page_valid(mt);
+ KASSERT(mt->dirty == 0,
+ ("%s: page %p is dirty", __func__, mt));
+ KASSERT(!pmap_page_is_mapped(mt),
+ ("%s: page %p is mapped", __func__, mt));
+ } else {
+ /*
+ * Read did not fill up entire page.
+ *
+ * Currently we do not set the entire page
+ * valid, we just try to clear the piece that
+ * we couldn't read.
+ */
+ vm_page_set_valid_range(mt, 0,
+ object->un_pager.vnp.vnp_size - tfoff);
+ KASSERT((mt->dirty & vm_page_bits(0,
+ object->un_pager.vnp.vnp_size - tfoff)) ==
+ 0, ("%s: page %p is dirty", __func__, mt));
+ }
}
if (i < bp->b_pgbefore || i >= bp->b_npages - bp->b_pgafter)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Jan 25, 9:23 PM (15 h, 50 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27970212
Default Alt Text
D25138.id72760.diff (1 KB)
Attached To
Mode
D25138: Don't mark pages as valid if reading the contents from disk fails.
Attached
Detach File
Event Timeline
Log In to Comment