Change to devstat in twe broke vinum

Pete Carah pete at altadena.net
Tue Nov 11 16:48:05 PST 2003


There was a recent change to the twe driver which broke vinum on
drives connected through twe controllers.  I have no way
to know which interpretation of this flag is "right".  For now,
I've fixed it by removing the test from vinum but the more recent
change was in twe.

twe added (August):
-----------
    devstat_add_entry(&sc->twed_stats, "twed", device_get_unit(dev), TWE_BLOCK_S
IZE,
                      DEVSTAT_NO_ORDERED_TAGS,
                      DEVSTAT_TYPE_STORARRAY | DEVSTAT_TYPE_IF_OTHER,
                      DEVSTAT_PRIORITY_ARRAY);

the DEVSTAT_TYPE_IF_OTHER was the culprit here.

vinum added (June):
-------------------
            if ((((stat->device_type & DEVSTAT_TYPE_MASK) == DEVSTAT_TYPE_DIRECT
) /* disk device */
                 || ((stat->device_type & DEVSTAT_TYPE_MASK) == DEVSTAT_TYPE_STO
RARRAY)) /* storage array */
            /* &&((stat->device_type & DEVSTAT_TYPE_IF_MASK) != DEVSTAT_TYPE_IF_
OTHER) */ /* and not md */
            &&((stat->device_type & DEVSTAT_TYPE_PASS) == 0) /* and not passthro
ugh */
            &&((stat->device_name[0] != '\0'))) {           /* and it has a name
----------------------------------

I had gotten Greg to add the STORARRAY earlier because it was used in the
twe driver instead of direct, even for a JBOD drive.  IF_OTHER in vinum is 
used to indicate md device; clearly its use in the twe driver is for something
else.

I have no way to know which is "right" but one of these interpretations
doesn't get along with the other...

This broke my nntp server rather badly last night in what should have been
an easy upgrade from 4.8-p13 to 4.9-rel :-(

-- Pete


More information about the freebsd-stable mailing list