summaryrefslogtreecommitdiffstats
path: root/sys/geom
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2015-10-11 13:01:51 +0000
committermav <mav@FreeBSD.org>2015-10-11 13:01:51 +0000
commit64d53c4c7d2401ff7f259304054800f496e26941 (patch)
treeae68a3ddda28f0bc480012dc566360581eeafc38 /sys/geom
parent1fd9c17d055b56ee0020a5f8cd93b732498cf04b (diff)
downloadFreeBSD-src-64d53c4c7d2401ff7f259304054800f496e26941.zip
FreeBSD-src-64d53c4c7d2401ff7f259304054800f496e26941.tar.gz
Remove compatibility shims for legacy ATA device names.
We got new ATA stack in FreeBSD 8.x, switched to it at 9.x, completely removed old stack at 10.x, so at 11.x it is time to remove compat shims.
Diffstat (limited to 'sys/geom')
-rw-r--r--sys/geom/geom_dev.c30
-rw-r--r--sys/geom/raid/g_raid.c20
2 files changed, 3 insertions, 47 deletions
diff --git a/sys/geom/geom_dev.c b/sys/geom/geom_dev.c
index 789de4d..6aecd78 100644
--- a/sys/geom/geom_dev.c
+++ b/sys/geom/geom_dev.c
@@ -280,9 +280,9 @@ g_dev_taste(struct g_class *mp, struct g_provider *pp, int insist __unused)
struct g_geom *gp;
struct g_consumer *cp;
struct g_dev_softc *sc;
- int error, len;
- struct cdev *dev, *adev;
- char buf[SPECNAMELEN + 6], *val;
+ int error;
+ struct cdev *dev;
+ char buf[SPECNAMELEN + 6];
g_trace(G_T_TOPOLOGY, "dev_taste(%s,%s)", mp->name, pp->name);
g_topology_assert();
@@ -310,33 +310,9 @@ g_dev_taste(struct g_class *mp, struct g_provider *pp, int insist __unused)
dev->si_flags |= SI_UNMAPPED;
sc->sc_dev = dev;
- /* Search for device alias name and create it if found. */
- adev = NULL;
- for (len = MIN(strlen(gp->name), sizeof(buf) - 15); len > 0; len--) {
- snprintf(buf, sizeof(buf), "kern.devalias.%s", gp->name);
- buf[14 + len] = 0;
- val = kern_getenv(buf);
- if (val != NULL) {
- snprintf(buf, sizeof(buf), "%s%s",
- val, gp->name + len);
- freeenv(val);
- if ((make_dev_alias_p(MAKEDEV_CHECKNAME|MAKEDEV_WAITOK,
- &adev, dev, "%s", buf)) != 0)
- printf("Warning: unable to create device "
- "alias %s\n", buf);
- break;
- }
- }
-
dev->si_iosize_max = MAXPHYS;
dev->si_drv2 = cp;
init_dumpdev(dev);
- if (adev != NULL) {
- adev->si_iosize_max = MAXPHYS;
- adev->si_drv2 = cp;
- adev->si_flags |= SI_UNMAPPED;
- init_dumpdev(adev);
- }
g_dev_attrchanged(cp, "GEOM::physpath");
snprintf(buf, sizeof(buf), "cdev=%s", gp->name);
diff --git a/sys/geom/raid/g_raid.c b/sys/geom/raid/g_raid.c
index 4156674..839a2d4 100644
--- a/sys/geom/raid/g_raid.c
+++ b/sys/geom/raid/g_raid.c
@@ -82,10 +82,6 @@ static u_int g_raid_idle_threshold = 1000000;
SYSCTL_UINT(_kern_geom_raid, OID_AUTO, idle_threshold, CTLFLAG_RWTUN,
&g_raid_idle_threshold, 1000000,
"Time in microseconds to consider a volume idle.");
-static u_int ar_legacy_aliases = 1;
-SYSCTL_INT(_kern_geom_raid, OID_AUTO, legacy_aliases, CTLFLAG_RWTUN,
- &ar_legacy_aliases, 0, "Create aliases named as the legacy ataraid style.");
-
#define MSLEEP(rv, ident, mtx, priority, wmesg, timeout) do { \
G_RAID_DEBUG(4, "%s: Sleeping %p.", __func__, (ident)); \
@@ -1628,7 +1624,6 @@ g_raid_launch_provider(struct g_raid_volume *vol)
struct g_raid_softc *sc;
struct g_provider *pp;
char name[G_RAID_MAX_VOLUMENAME];
- char announce_buf[80], buf1[32];
off_t off;
int i;
@@ -1644,21 +1639,6 @@ g_raid_launch_provider(struct g_raid_volume *vol)
snprintf(name, sizeof(name), "raid/r%d", vol->v_global_id);
}
- /*
- * Create a /dev/ar%d that the old ataraid(4) stack once
- * created as an alias for /dev/raid/r%d if requested.
- * This helps going from stable/7 ataraid devices to newer
- * FreeBSD releases. sbruno 07 MAY 2013
- */
-
- if (ar_legacy_aliases) {
- snprintf(announce_buf, sizeof(announce_buf),
- "kern.devalias.%s", name);
- snprintf(buf1, sizeof(buf1),
- "ar%d", vol->v_global_id);
- kern_setenv(announce_buf, buf1);
- }
-
pp = g_new_providerf(sc->sc_geom, "%s", name);
pp->flags |= G_PF_DIRECT_RECEIVE;
if (vol->v_tr->tro_class->trc_accept_unmapped) {
OpenPOWER on IntegriCloud