Page MenuHomeFreeBSD

D48687.1785651736.diff
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

D48687.1785651736.diff

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
@@ -100,7 +100,7 @@
} da_state;
typedef enum {
- DA_FLAG_PACK_INVALID = 0x000001,
+ DA_FLAG_PACK_INVALID = 0x000001, /* media temporarily missing, drive healthy */
DA_FLAG_NEW_PACK = 0x000002,
DA_FLAG_PACK_LOCKED = 0x000004,
DA_FLAG_PACK_REMOVABLE = 0x000008,
@@ -1899,7 +1899,11 @@
cam_periph_lock(periph);
/*
- * If the device has been made invalid, error out
+ * If the pack has been invalidated, fail all I/O. There's no underlying
+ * disk present since either we've not been able to query the size or
+ * the drive has told us the media is missing. This bit will also be set
+ * when the periph has been invalidated, so checking for that here is
+ * redundant.
*/
if ((softc->flags & DA_FLAG_PACK_INVALID)) {
cam_periph_unlock(periph);
@@ -1946,6 +1950,9 @@
softc = (struct da_softc *)periph->softc;
secsize = softc->params.secsize;
+ /*
+ * Can't dump to a disk that's not there, for whatever reason.
+ */
if ((softc->flags & DA_FLAG_PACK_INVALID) != 0)
return (ENXIO);

File Metadata

Mime Type
text/plain
Expires
Sun, Aug 2, 6:22 AM (6 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29333629
Default Alt Text
D48687.1785651736.diff (1 KB)

Event Timeline