Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F145092984
D48688.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
666 B
Referenced Files
None
Subscribers
None
D48688.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
@@ -1803,10 +1803,17 @@
(softc->quirks & DA_Q_NO_PREVENT) == 0)
daprevent(periph, PR_PREVENT);
- if (error == 0) {
+ /*
+ * Only 'validate' the pack if the media size is non-zero and the
+ * underlying peripheral isn't invalid (the only error != 0 path).
+ */
+ if (error == 0 && softc->params.sectors != 0)
softc->flags &= ~DA_FLAG_PACK_INVALID;
+ else
+ softc->flags |= DA_FLAG_PACK_INVALID;
+
+ if (error == 0)
softc->flags |= DA_FLAG_OPEN;
- }
da_periph_unhold(periph, DA_REF_OPEN_HOLD);
cam_periph_unlock(periph);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Feb 16, 9:48 PM (6 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28790798
Default Alt Text
D48688.diff (666 B)
Attached To
Mode
D48688: cam/da: Only mark pack as valid if we know the size in daopen
Attached
Detach File
Event Timeline
Log In to Comment