Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F115647914
D48687.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1021 B
Referenced Files
None
Subscribers
None
D48687.diff
View Options
diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c
--- a/sys/cam/scsi/scsi_da.c
+++ b/sys/cam/scsi/scsi_da.c
@@ -1899,7 +1899,15 @@
cam_periph_lock(periph);
/*
- * If the device has been made invalid, error out
+ * If the pack has been invalidated, fail all I/O. The medium is not
+ * suitable for normal I/O, because one or more is ture:
+ * - the medium is missing
+ * - its size is unknown
+ * - it differs from the medium present at daopen
+ * - we're tearing the cam periph device down
+ * Since we have the cam periph lock, we don't need to check it for
+ * the last condition since PACK_INVALID is set when we invalidate
+ * the device.
*/
if ((softc->flags & DA_FLAG_PACK_INVALID)) {
cam_periph_unlock(periph);
@@ -1946,6 +1954,10 @@
softc = (struct da_softc *)periph->softc;
secsize = softc->params.secsize;
+ /*
+ * Can't dump to a disk that's not there or changed, for whatever
+ * reason.
+ */
if ((softc->flags & DA_FLAG_PACK_INVALID) != 0)
return (ENXIO);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Apr 27, 12:57 PM (17 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16478409
Default Alt Text
D48687.diff (1021 B)
Attached To
Mode
D48687: cam/da: Document what an 'invalid pack' means.
Attached
Detach File
Event Timeline
Log In to Comment