Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F157162761
D9674.id27447.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
D9674.id27447.diff
View Options
Index: head/sys/kern/vfs_bio.c
===================================================================
--- head/sys/kern/vfs_bio.c
+++ head/sys/kern/vfs_bio.c
@@ -2290,18 +2290,28 @@
bdirty(bp);
}
if (bp->b_iocmd == BIO_WRITE && (bp->b_ioflags & BIO_ERROR) &&
+ (bp->b_error != ENXIO || !LIST_EMPTY(&bp->b_dep)) &&
!(bp->b_flags & B_INVAL)) {
/*
- * Failed write, redirty. Must clear BIO_ERROR to prevent
- * pages from being scrapped.
+ * Failed write, redirty. All errors except ENXIO (which
+ * means the device is gone) are expected to be potentially
+ * transient - underlying media might work if tried again
+ * after EIO, and memory might be available after an ENOMEM.
+ *
+ * Do this also for buffers that failed with ENXIO, but have
+ * non-empty dependencies - the soft updates code might need
+ * to access the buffer to untangle them.
+ *
+ * Must clear BIO_ERROR to prevent pages from being scrapped.
*/
bp->b_ioflags &= ~BIO_ERROR;
bdirty(bp);
} else if ((bp->b_flags & (B_NOCACHE | B_INVAL)) ||
(bp->b_ioflags & BIO_ERROR) || (bp->b_bufsize <= 0)) {
/*
- * Either a failed read I/O or we were asked to free or not
- * cache the buffer.
+ * Either a failed read I/O, or we were asked to free or not
+ * cache the buffer, or we failed to write to a device that's
+ * no longer present.
*/
bp->b_flags |= B_INVAL;
if (!LIST_EMPTY(&bp->b_dep))
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, May 19, 10:13 PM (16 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33329785
Default Alt Text
D9674.id27447.diff (1 KB)
Attached To
Mode
D9674: Handle ENXIO bufs.
Attached
Detach File
Event Timeline
Log In to Comment