Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177540088
D25138.1794666910.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D25138.1794666910.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
Sat, Nov 14, 2:35 PM (12 h, 15 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41694829
Default Alt Text
D25138.1794666910.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