From owner-svn-src-head@freebsd.org Mon Feb 13 18:24:14 2017 Return-Path: Delivered-To: svn-src-head@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 DF280CDD976; Mon, 13 Feb 2017 18:24:14 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 561FBD4F; Mon, 13 Feb 2017 18:24:13 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from thor.intern.walstatt.dynvpn.de ([92.225.33.179]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MCtNr-1cUmim2OeZ-009i9O; Mon, 13 Feb 2017 19:24:11 +0100 Date: Mon, 13 Feb 2017 19:24:04 +0100 From: "O. Hartmann" To: "Stephen J. Kiernan" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313701 - in head: sbin/mdconfig sys/dev/md Message-ID: <20170213192404.01c6072b@thor.intern.walstatt.dynvpn.de> In-Reply-To: <201702131744.v1DHi7NO064008@repo.freebsd.org> References: <201702131744.v1DHi7NO064008@repo.freebsd.org> Organization: WALSTATT User-Agent: OutScare 3.1415926 X-Operating-System: ImNotAnOperatingSystem 3.141592527 MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/FiJcbUNJfGiAp4FoX5w5yxA"; protocol="application/pgp-signature" X-Provags-ID: V03:K0:Fid6kGGinfhYgvarkz6g4qyINuHEHz0cILW0CzHRAlD+U6I12M8 o4MCL9GyRF+bPfd87iNc6dcrVxv8744lUuXLOBzY1VIfawcOJL2GjiOoJIHHEdsaM8kATKw faod8zPq5uxuty4qQCzAE40PEVJX4gtuFB9+tug3/NhuMwqcUF65rqxyv/PXuYPK/BCBsOY HJtMcAP5O+y2qXuRmJhXw== X-UI-Out-Filterresults: notjunk:1;V01:K0:AjgHcY4ydCE=:j0ADAWQoVwqSAe/fi2QzbP nLrt/KmW8IiYo+b1wme6RdpCvOYey5C1hEq4hRq0/NHCrvNdyYkTtNXFHZo3++vlbih5XYWkJ z7BiPDhVGquFJAkZ/zdoDHNZKiFCOpRMkjTXPMsWgspHDgjsyZpujIDcoqQj35bnr+QT/RtPq 9djsTb1/c8cMRvAEttVfXmL15+wNUyd4O5lj6Zqe220J9FlWUEo9S5k5lKBQqqKYli/HX9JDw GQmIB4LbfGXhlxttEHankOuaymG1TTXwfSbx5Xbt8lHSRYHYBebpRlcDv9KT/L4JxnAsd/dZh C8/dVzx7spYnfmEvgFcP9IiX9H55ac0OxBvlM/B9nWHmQ3cQgaJunCjFGn/kaYuEhjx79tYXq QHXtyuLNolsh1NCLsXxiwmTb1GHXf8t/zRGOXflv+lUwPCh7Ljz+R0At1tPYbi+sCcKY0/6p/ /chsrIfnw1PQcU8b1qijhK/lIAC2xfl5vnIyUtb0Gb/wS2aHnICdfyCG7A5+tAliDomgMmje6 qiaRoBLt6jXP/YHEfyrTIurLaP6XKqKZDn8dwKbcvTN4v+S9vuDG8plQfocrXDB+HMKd00RRP n7z4qdpLt8hITTJIX7pjfs1hYX50u6qWGUadWA9D5MvffcgmrFTFMGKcy8QuPODhnoyJz5Twg 5U2Giox2w5xJpyMxXuW6UqdTga/sS+YNuANQx4B2xTcUHOwE+mqUE0P1YuJV8jY/cu6uuB3Ji vATVyHwnlTJp72aJIkEnzJZ6/sBsEaeffWL4R9AUeyrnBpXAVshDfxXf4tA= X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Feb 2017 18:24:15 -0000 --Sig_/FiJcbUNJfGiAp4FoX5w5yxA Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Am Mon, 13 Feb 2017 17:44:07 +0000 (UTC) "Stephen J. Kiernan" schrieb: > Author: stevek > Date: Mon Feb 13 17:44:07 2017 > New Revision: 313701 > URL: https://svnweb.freebsd.org/changeset/base/313701 >=20 > Log: > For MD_PRELOAD type md(4) devices, if there is a file name in the prelo= aded > meta-data, copy it into the softc structure. > =20 > When returning md(4) device details to the caller, include the file nam= e in > any MD_PRELOAD type devices if it is set (first character is not NUL.) > =20 > In mdconfig, for "preload" type md(4) devices, if there is file config > available, print it in the file column of the output. > =20 > Reviewed by: brooks > Approved by: sjg (mentor) > MFC after: 1 month > Sponsored by: Juniper Networks, Inc. > Differential Revision: https://reviews.freebsd.org/D9529 >=20 > Modified: > head/sbin/mdconfig/mdconfig.c > head/sys/dev/md/md.c >=20 > Modified: head/sbin/mdconfig/mdconfig.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sbin/mdconfig/mdconfig.c Mon Feb 13 16:11:37 2017 (r313700) > +++ head/sbin/mdconfig/mdconfig.c Mon Feb 13 17:44:07 2017 (r313701) > @@ -452,7 +452,8 @@ md_list(const char *units, int opt, cons > } > gc =3D &pp->lg_config; > type =3D geom_config_get(gc, "type"); > - if (strcmp(type, "vnode") =3D=3D 0) { > + if (strcmp(type, "vnode") =3D=3D 0 || > + strcmp(type, "preload") =3D=3D 0) { > file =3D geom_config_get(gc, "file"); > if (fflag !=3D NULL && > strcmp(fflag, file) !=3D 0) >=20 > Modified: head/sys/dev/md/md.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/dev/md/md.c Mon Feb 13 16:11:37 2017 (r313700) > +++ head/sys/dev/md/md.c Mon Feb 13 17:44:07 2017 (r313701) > @@ -1689,7 +1689,8 @@ xmdctlioctl(struct cdev *dev, u_long cmd > mdio->md_options =3D sc->flags; > mdio->md_mediasize =3D sc->mediasize; > mdio->md_sectorsize =3D sc->sectorsize; > - if (sc->type =3D=3D MD_VNODE) > + if (sc->type =3D=3D MD_VNODE || > + (sc->type =3D=3D MD_PRELOAD && mdio->md_file !=3D NULL)) > error =3D copyout(sc->file, mdio->md_file, > strlen(sc->file) + 1); > return (error); > @@ -1733,6 +1734,8 @@ md_preloaded(u_char *image, size_t lengt > sc->pl_ptr =3D image; > sc->pl_len =3D length; > sc->start =3D mdstart_preload; > + if (name !=3D NULL) > + strlcpy(sc->file, name, sizeof(sc->file)); > #if defined(MD_ROOT) && !defined(ROOTDEVNAME) > if (sc->unit =3D=3D 0) > rootdevnames[0] =3D MD_ROOT_FSTYPE ":/dev/md0"; > @@ -1835,7 +1838,8 @@ g_md_dumpconf(struct sbuf *sb, const cha > sbuf_printf(sb, " fs %ju", (uintmax_t) mp->fwsectors); > sbuf_printf(sb, " l %ju", (uintmax_t) mp->mediasize); > sbuf_printf(sb, " t %s", type); > - if (mp->type =3D=3D MD_VNODE && mp->vnode !=3D NULL) > + if ((mp->type =3D=3D MD_VNODE && mp->vnode !=3D NULL) || > + (mp->type =3D=3D MD_PRELOAD && mp->file[0] !=3D '\0')) > sbuf_printf(sb, " file %s", mp->file); > } else { > sbuf_printf(sb, "%s%d\n", indent, > @@ -1855,7 +1859,8 @@ g_md_dumpconf(struct sbuf *sb, const cha > "read-only"); > sbuf_printf(sb, "%s%s\n", indent, > type); > - if (mp->type =3D=3D MD_VNODE && mp->vnode !=3D NULL) { > + if ((mp->type =3D=3D MD_VNODE && mp->vnode !=3D NULL) || > + (mp->type =3D=3D MD_PRELOAD && mp->file[0] !=3D '\0')) > sbuf_printf(sb, "%s", indent); > g_conf_printf_escaped(sb, "%s", mp->file); > sbuf_printf(sb, "\n"); > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" This broke kernel build on recent CURRENT: [...] =3D=3D=3D> mdio (all) --- all_subdir_md --- --- md.o --- /usr/src/sys/modules/md/../../dev/md/md.c:1870:1: error: extraneous closing= brace ('}') } ^ 1 error generated. *** [md.o] Error code 1 make[4]: stopped in /usr/src/sys/modules/md Kind regards, Oliver --Sig_/FiJcbUNJfGiAp4FoX5w5yxA Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iLUEARMKAB0WIQQZVZMzAtwC2T/86TrS528fyFhYlAUCWKH5xAAKCRDS528fyFhY lHPOAf9NZ0KCflGWxC/OdJk2So2EGrWxFHaEuMkwCB4bI3HyvqplMEKckWOkzQBQ d1zlpw6TLSs0hjOZIa8Wo0g5OvR7Af9vZygPRiXTUHZrPFocpFXpQbAbxe/jNsEY +OwBKgsJxz5NtoWPjzPd+Ch5QQjFP8ChJoJGDRyTuQQ2X2FI66LN =JTfk -----END PGP SIGNATURE----- --Sig_/FiJcbUNJfGiAp4FoX5w5yxA--