Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Unreliable GPT detection



tih%hamartun.priv.no@localhost (Tom Ivar Helbekkmo) writes:

>In this situation, I can't get the GPT recognized.  In fact, using
>gpt(8) to look at sd0, it says there is nothing there, even though sd0
>is, at that time, fully online, and working fine in its own right.

That is strange. If gpt cannot read anything, then any other program
cannot read anything either.


>I guess the better solution would involve recognizing the "in process of
>becoming ready" situation,


The following patch should help:

Index: sd.c
===================================================================
RCS file: /cvsroot/src/sys/dev/scsipi/sd.c,v
retrieving revision 1.337
diff -p -u -r1.337 sd.c
--- sd.c        28 Sep 2024 08:57:47 -0000      1.337
+++ sd.c        11 Feb 2025 14:59:24 -0000
@@ -1090,13 +1090,13 @@ sd_interpret_sense(struct scsipi_xfer *x
                return (retval);
        }
 
-
-
+#if 0
        /*
         * If the device is not open yet, let the generic code handle it.
         */
        if ((periph->periph_flags & PERIPH_MEDIA_LOADED) == 0)
                return (retval);
+#endif
 
        /*
         * If it isn't a extended or extended/deferred error, let



Home | Main Index | Thread Index | Old Index