From owner-svn-src-all@freebsd.org Sun Oct 11 13:01:55 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3B414A0F2A1; Sun, 11 Oct 2015 13:01:55 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F2A2C2EC; Sun, 11 Oct 2015 13:01:54 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9BD1sXi035591; Sun, 11 Oct 2015 13:01:54 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9BD1poi035565; Sun, 11 Oct 2015 13:01:51 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510111301.t9BD1poi035565@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 11 Oct 2015 13:01:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289137 - in head: . sbin/geom/class/raid share/man/man4 sys/amd64/conf sys/arm/conf sys/cam sys/cam/ata sys/conf sys/geom sys/geom/raid sys/i386/conf sys/mips/conf sys/pc98/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Oct 2015 13:01:55 -0000 Author: mav Date: Sun Oct 11 13:01:51 2015 New Revision: 289137 URL: https://svnweb.freebsd.org/changeset/base/289137 Log: 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. Modified: head/UPDATING head/sbin/geom/class/raid/graid.8 head/share/man/man4/ada.4 head/sys/amd64/conf/GENERIC head/sys/arm/conf/A20 head/sys/arm/conf/ALPINE head/sys/arm/conf/CRB head/sys/arm/conf/CUBIEBOARD head/sys/arm/conf/EFIKA_MX head/sys/arm/conf/EP80219 head/sys/arm/conf/IMX53 head/sys/arm/conf/IQ31244 head/sys/cam/ata/ata_da.c head/sys/cam/cam_xpt.c head/sys/cam/cam_xpt.h head/sys/conf/NOTES head/sys/geom/geom_dev.c head/sys/geom/raid/g_raid.c head/sys/i386/conf/GENERIC head/sys/i386/conf/XBOX head/sys/mips/conf/OCTEON1 head/sys/mips/conf/std.SWARM head/sys/pc98/conf/GENERIC Modified: head/UPDATING ============================================================================== --- head/UPDATING Sun Oct 11 08:28:49 2015 (r289136) +++ head/UPDATING Sun Oct 11 13:01:51 2015 (r289137) @@ -31,6 +31,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20151011: + Compatibility shims for legacy ATA device names have been removed. + It includes ATA_STATIC_ID kernel option, kern.cam.ada.legacy_aliases + and kern.geom.raid.legacy_aliases loader tunables, kern.devalias.* + environment variables, /dev/ad* and /dev/ar* symbolic links. + 20151006: Clang, llvm, lldb, compiler-rt and libc++ have been upgraded to 3.7.0. Please see the 20141231 entry below for information about prerequisites Modified: head/sbin/geom/class/raid/graid.8 ============================================================================== --- head/sbin/geom/class/raid/graid.8 Sun Oct 11 08:28:49 2015 (r289136) +++ head/sbin/geom/class/raid/graid.8 Sun Oct 11 13:01:51 2015 (r289137) @@ -304,9 +304,6 @@ Write errors are always considered as di Time to wait for missing array components on startup. .It Va kern.geom.raid. Ns Ar X Ns Va .enable : No 1 Enable taste for specific metadata or transformation module. -.It Va kern.geom.raid.legacy_aliases : No 0 -Enable geom raid emulation of legacy /dev/ar%d devices. -This should aid the upgrade of systems from legacy to modern releases. .El .Sh EXIT STATUS Exit status is 0 on success, and non-zero if the command fails. Modified: head/share/man/man4/ada.4 ============================================================================== --- head/share/man/man4/ada.4 Sun Oct 11 08:28:49 2015 (r289136) +++ head/share/man/man4/ada.4 Sun Oct 11 13:01:51 2015 (r289137) @@ -146,16 +146,6 @@ instead of .Pa /etc/sysctl.conf . The global default is currently 1. The per-device default is to leave it as-is (follow global setting). -.It Va kern.cam.ada.legacy_aliases -.Pp -This variable determines whether -.Pa /dev/ad Ns Ar Y -symbolic links are created, -which tries to mimic old -.Xr ata 4 -numbering. -Set to 1 to enable legacy aliases symlinks, 0 to disable. -The default is currently enabled. .El .Sh FILES .Bl -tag -width ".Pa /dev/ada*" -compact Modified: head/sys/amd64/conf/GENERIC ============================================================================== --- head/sys/amd64/conf/GENERIC Sun Oct 11 08:28:49 2015 (r289136) +++ head/sys/amd64/conf/GENERIC Sun Oct 11 13:01:51 2015 (r289137) @@ -109,7 +109,6 @@ device fdc # ATA controllers device ahci # AHCI-compatible SATA controllers device ata # Legacy ATA/SATA controllers -options ATA_STATIC_ID # Static device numbering device mvs # Marvell 88SX50XX/88SX60XX/88SX70XX/SoC SATA device siis # SiliconImage SiI3124/SiI3132/SiI3531 SATA Modified: head/sys/arm/conf/A20 ============================================================================== --- head/sys/arm/conf/A20 Sun Oct 11 08:28:49 2015 (r289136) +++ head/sys/arm/conf/A20 Sun Oct 11 13:01:51 2015 (r289137) @@ -62,7 +62,6 @@ device mmcsd # mmc/sd flash cards # ATA controllers device ahci # AHCI-compatible SATA controllers #device ata # Legacy ATA/SATA controllers -#options ATA_STATIC_ID # Static device numbering # Console and misc device uart Modified: head/sys/arm/conf/ALPINE ============================================================================== --- head/sys/arm/conf/ALPINE Sun Oct 11 08:28:49 2015 (r289136) +++ head/sys/arm/conf/ALPINE Sun Oct 11 13:01:51 2015 (r289137) @@ -48,7 +48,6 @@ device gpio # ATA controllers device ahci # AHCI-compatible SATA controllers device ata # Legacy ATA/SATA controllers -options ATA_STATIC_ID # Static device numbering # ATA/SCSI peripherals device scbus # SCSI bus (required for ATA/SCSI) Modified: head/sys/arm/conf/CRB ============================================================================== --- head/sys/arm/conf/CRB Sun Oct 11 08:28:49 2015 (r289136) +++ head/sys/arm/conf/CRB Sun Oct 11 13:01:51 2015 (r289137) @@ -76,7 +76,6 @@ device uart device pci device ata -options ATA_STATIC_ID # Static device numbering device scbus # SCSI bus (required for ATA/SCSI) device cd # CD Modified: head/sys/arm/conf/CUBIEBOARD ============================================================================== --- head/sys/arm/conf/CUBIEBOARD Sun Oct 11 08:28:49 2015 (r289136) +++ head/sys/arm/conf/CUBIEBOARD Sun Oct 11 13:01:51 2015 (r289137) @@ -59,7 +59,6 @@ device mmcsd # mmc/sd flash cards # ATA controllers device ahci # AHCI-compatible SATA controllers #device ata # Legacy ATA/SATA controllers -#options ATA_STATIC_ID # Static device numbering # Console and misc device uart Modified: head/sys/arm/conf/EFIKA_MX ============================================================================== --- head/sys/arm/conf/EFIKA_MX Sun Oct 11 08:28:49 2015 (r289136) +++ head/sys/arm/conf/EFIKA_MX Sun Oct 11 13:01:51 2015 (r289137) @@ -91,7 +91,6 @@ options ALT_BREAK_TO_DEBUGGER device ata device atapci # Only for helper functions device imxata -options ATA_STATIC_ID # Static device numbering device gpio device gpioled Modified: head/sys/arm/conf/EP80219 ============================================================================== --- head/sys/arm/conf/EP80219 Sun Oct 11 08:28:49 2015 (r289136) +++ head/sys/arm/conf/EP80219 Sun Oct 11 13:01:51 2015 (r289137) @@ -76,7 +76,6 @@ device uart device pci device ata -options ATA_STATIC_ID # Static device numbering device scbus # SCSI bus (required for ATA/SCSI) device cd # CD Modified: head/sys/arm/conf/IMX53 ============================================================================== --- head/sys/arm/conf/IMX53 Sun Oct 11 08:28:49 2015 (r289136) +++ head/sys/arm/conf/IMX53 Sun Oct 11 13:01:51 2015 (r289137) @@ -80,7 +80,6 @@ options ALT_BREAK_TO_DEBUGGER device ata device atapci # Only for helper functions device imxata -options ATA_STATIC_ID # Static device numbering device gpio device gpioled Modified: head/sys/arm/conf/IQ31244 ============================================================================== --- head/sys/arm/conf/IQ31244 Sun Oct 11 08:28:49 2015 (r289136) +++ head/sys/arm/conf/IQ31244 Sun Oct 11 13:01:51 2015 (r289137) @@ -75,7 +75,6 @@ device uart device pci device ata -options ATA_STATIC_ID # Static device numbering device scbus # SCSI bus (required for ATA/SCSI) device cd # CD Modified: head/sys/cam/ata/ata_da.c ============================================================================== --- head/sys/cam/ata/ata_da.c Sun Oct 11 08:28:49 2015 (r289136) +++ head/sys/cam/ata/ata_da.c Sun Oct 11 13:01:51 2015 (r289137) @@ -582,7 +582,6 @@ static void adaresume(void *arg); #define ata_disk_firmware_geom_adjust(disk) #endif -static int ada_legacy_aliases = ADA_DEFAULT_LEGACY_ALIASES; static int ada_retry_count = ADA_DEFAULT_RETRY; static int ada_default_timeout = ADA_DEFAULT_TIMEOUT; static int ada_send_ordered = ADA_DEFAULT_SEND_ORDERED; @@ -593,8 +592,6 @@ static int ada_write_cache = ADA_DEFAULT static SYSCTL_NODE(_kern_cam, OID_AUTO, ada, CTLFLAG_RD, 0, "CAM Direct Access Disk driver"); -SYSCTL_INT(_kern_cam_ada, OID_AUTO, legacy_aliases, CTLFLAG_RWTUN, - &ada_legacy_aliases, 0, "Create legacy-like device aliases"); SYSCTL_INT(_kern_cam_ada, OID_AUTO, retry_count, CTLFLAG_RWTUN, &ada_retry_count, 0, "Normal I/O retry count"); SYSCTL_INT(_kern_cam_ada, OID_AUTO, default_timeout, CTLFLAG_RWTUN, @@ -1164,11 +1161,11 @@ adaregister(struct cam_periph *periph, v struct ada_softc *softc; struct ccb_pathinq cpi; struct ccb_getdev *cgd; - char announce_buf[80], buf1[32]; + char announce_buf[80]; struct disk_params *dp; caddr_t match; u_int maxio; - int legacy_id, quirks; + int quirks; cgd = (struct ccb_getdev *)arg; if (cgd == NULL) { @@ -1331,22 +1328,6 @@ adaregister(struct cam_periph *periph, v softc->disk->d_fwheads = softc->params.heads; ata_disk_firmware_geom_adjust(softc->disk); - if (ada_legacy_aliases) { -#ifdef ATA_STATIC_ID - legacy_id = xpt_path_legacy_ata_id(periph->path); -#else - legacy_id = softc->disk->d_unit; -#endif - if (legacy_id >= 0) { - snprintf(announce_buf, sizeof(announce_buf), - "kern.devalias.%s%d", - softc->disk->d_name, softc->disk->d_unit); - snprintf(buf1, sizeof(buf1), - "ad%d", legacy_id); - kern_setenv(announce_buf, buf1); - } - } else - legacy_id = -1; /* * Acquire a reference to the periph before we register with GEOM. * We'll release this reference once GEOM calls us back (via @@ -1372,9 +1353,6 @@ adaregister(struct cam_periph *periph, v dp->secs_per_track, dp->cylinders); xpt_announce_periph(periph, announce_buf); xpt_announce_quirks(periph, softc->quirks, ADA_Q_BIT_STRING); - if (legacy_id >= 0) - printf("%s%d: Previously was known as ad%d\n", - periph->periph_name, periph->unit_number, legacy_id); /* * Create our sysctl variables, now that we know Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Sun Oct 11 08:28:49 2015 (r289136) +++ head/sys/cam/cam_xpt.c Sun Oct 11 13:01:51 2015 (r289137) @@ -3756,45 +3756,6 @@ xpt_path_periph(struct cam_path *path) return (path->periph); } -int -xpt_path_legacy_ata_id(struct cam_path *path) -{ - struct cam_eb *bus; - int bus_id; - - if ((strcmp(path->bus->sim->sim_name, "ata") != 0) && - strcmp(path->bus->sim->sim_name, "ahcich") != 0 && - strcmp(path->bus->sim->sim_name, "mvsch") != 0 && - strcmp(path->bus->sim->sim_name, "siisch") != 0) - return (-1); - - if (strcmp(path->bus->sim->sim_name, "ata") == 0 && - path->bus->sim->unit_number < 2) { - bus_id = path->bus->sim->unit_number; - } else { - bus_id = 2; - xpt_lock_buses(); - TAILQ_FOREACH(bus, &xsoftc.xpt_busses, links) { - if (bus == path->bus) - break; - if ((strcmp(bus->sim->sim_name, "ata") == 0 && - bus->sim->unit_number >= 2) || - strcmp(bus->sim->sim_name, "ahcich") == 0 || - strcmp(bus->sim->sim_name, "mvsch") == 0 || - strcmp(bus->sim->sim_name, "siisch") == 0) - bus_id++; - } - xpt_unlock_buses(); - } - if (path->target != NULL) { - if (path->target->target_id < 2) - return (bus_id * 2 + path->target->target_id); - else - return (-1); - } else - return (bus_id * 2); -} - /* * Release a CAM control block for the caller. Remit the cost of the structure * to the device referenced by the path. If the this device had no 'credits' Modified: head/sys/cam/cam_xpt.h ============================================================================== --- head/sys/cam/cam_xpt.h Sun Oct 11 08:28:49 2015 (r289136) +++ head/sys/cam/cam_xpt.h Sun Oct 11 13:01:51 2015 (r289137) @@ -101,7 +101,6 @@ int xpt_path_string(struct cam_path *p path_id_t xpt_path_path_id(struct cam_path *path); target_id_t xpt_path_target_id(struct cam_path *path); lun_id_t xpt_path_lun_id(struct cam_path *path); -int xpt_path_legacy_ata_id(struct cam_path *path); struct cam_sim *xpt_path_sim(struct cam_path *path); struct cam_periph *xpt_path_periph(struct cam_path *path); void xpt_async(u_int32_t async_code, struct cam_path *path, Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Sun Oct 11 08:28:49 2015 (r289136) +++ head/sys/conf/NOTES Sun Oct 11 13:01:51 2015 (r289137) @@ -1759,12 +1759,9 @@ hint.ata.1.irq="15" # # The following options are valid on the ATA driver: # -# ATA_STATIC_ID: controller numbering is static ie depends on location -# else the device numbers are dynamically allocated. # ATA_REQUEST_TIMEOUT: the number of seconds to wait for an ATA request # before timing out. -options ATA_STATIC_ID #options ATA_REQUEST_TIMEOUT=10 # Modified: head/sys/geom/geom_dev.c ============================================================================== --- head/sys/geom/geom_dev.c Sun Oct 11 08:28:49 2015 (r289136) +++ head/sys/geom/geom_dev.c Sun Oct 11 13:01:51 2015 (r289137) @@ -280,9 +280,9 @@ g_dev_taste(struct g_class *mp, struct g 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 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); Modified: head/sys/geom/raid/g_raid.c ============================================================================== --- head/sys/geom/raid/g_raid.c Sun Oct 11 08:28:49 2015 (r289136) +++ head/sys/geom/raid/g_raid.c Sun Oct 11 13:01:51 2015 (r289137) @@ -82,10 +82,6 @@ static u_int g_raid_idle_threshold = 100 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_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_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) { Modified: head/sys/i386/conf/GENERIC ============================================================================== --- head/sys/i386/conf/GENERIC Sun Oct 11 08:28:49 2015 (r289136) +++ head/sys/i386/conf/GENERIC Sun Oct 11 13:01:51 2015 (r289137) @@ -109,7 +109,6 @@ device fdc # ATA controllers device ahci # AHCI-compatible SATA controllers device ata # Legacy ATA/SATA controllers -options ATA_STATIC_ID # Static device numbering device mvs # Marvell 88SX50XX/88SX60XX/88SX70XX/SoC SATA device siis # SiliconImage SiI3124/SiI3132/SiI3531 SATA Modified: head/sys/i386/conf/XBOX ============================================================================== --- head/sys/i386/conf/XBOX Sun Oct 11 08:28:49 2015 (r289136) +++ head/sys/i386/conf/XBOX Sun Oct 11 13:01:51 2015 (r289137) @@ -51,7 +51,6 @@ device pci # ATA and ATAPI devices device ata -options ATA_STATIC_ID # Static device numbering # ATA/SCSI peripherals device scbus # SCSI bus (required for ATA/SCSI) Modified: head/sys/mips/conf/OCTEON1 ============================================================================== --- head/sys/mips/conf/OCTEON1 Sun Oct 11 08:28:49 2015 (r289136) +++ head/sys/mips/conf/OCTEON1 Sun Oct 11 13:01:51 2015 (r289137) @@ -108,7 +108,6 @@ device pci # ATA controllers device ahci # AHCI-compatible SATA controllers device ata # Legacy ATA/SATA controllers -options ATA_STATIC_ID # Static device numbering device mvs # Marvell 88SX50XX/88SX60XX/88SX70XX/SoC SATA device siis # SiliconImage SiI3124/SiI3132/SiI3531 SATA Modified: head/sys/mips/conf/std.SWARM ============================================================================== --- head/sys/mips/conf/std.SWARM Sun Oct 11 08:28:49 2015 (r289136) +++ head/sys/mips/conf/std.SWARM Sun Oct 11 13:01:51 2015 (r289137) @@ -57,4 +57,3 @@ device da device pass device ata -options ATA_STATIC_ID # Static device numbering Modified: head/sys/pc98/conf/GENERIC ============================================================================== --- head/sys/pc98/conf/GENERIC Sun Oct 11 08:28:49 2015 (r289136) +++ head/sys/pc98/conf/GENERIC Sun Oct 11 13:01:51 2015 (r289137) @@ -93,7 +93,6 @@ device fdc # ATA controllers device ahci # AHCI-compatible SATA controllers device ata # Legacy ATA/SATA controllers -options ATA_STATIC_ID # Static device numbering device mvs # Marvell 88SX50XX/88SX60XX/88SX70XX/SoC SATA device siis # SiliconImage SiI3124/SiI3132/SiI3531 SATA