From owner-svn-src-all@FreeBSD.ORG Sat Jul 12 16:18:07 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B9F27FAE; Sat, 12 Jul 2014 16:18:07 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5CEA72F16; Sat, 12 Jul 2014 16:18:07 +0000 (UTC) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id s6CGI1o8094890 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 12 Jul 2014 19:18:01 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.3 kib.kiev.ua s6CGI1o8094890 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id s6CGI1NM094889; Sat, 12 Jul 2014 19:18:01 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 12 Jul 2014 19:18:01 +0300 From: Konstantin Belousov To: Mateusz Guzik Subject: Re: svn commit: r268570 - head/sys/kern Message-ID: <20140712161801.GS93733@kib.kiev.ua> References: <201407121535.s6CFZ42f063120@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="MeyeQYaqfWO5VP1p" Content-Disposition: inline In-Reply-To: <201407121535.s6CFZ42f063120@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 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: Sat, 12 Jul 2014 16:18:07 -0000 --MeyeQYaqfWO5VP1p Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jul 12, 2014 at 03:35:04PM +0000, Mateusz Guzik wrote: > Author: mjg > Date: Sat Jul 12 15:35:04 2014 > New Revision: 268570 > URL: http://svnweb.freebsd.org/changeset/base/268570 >=20 > Log: > Clear nonblock and async on devctl close instaed of open. > =20 > This is a purely cosmetic change. >=20 > Modified: > head/sys/kern/subr_bus.c >=20 > Modified: head/sys/kern/subr_bus.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/kern/subr_bus.c Sat Jul 12 15:19:30 2014 (r268569) > +++ head/sys/kern/subr_bus.c Sat Jul 12 15:35:04 2014 (r268570) > @@ -438,8 +438,6 @@ devopen(struct cdev *dev, int oflags, in > } > /* move to init */ > devsoftc.inuse =3D 1; > - devsoftc.nonblock =3D 0; > - devsoftc.async =3D 0; > mtx_unlock(&devsoftc.mtx); > return (0); > } > @@ -450,6 +448,8 @@ devclose(struct cdev *dev, int fflag, in > =20 > mtx_lock(&devsoftc.mtx); > devsoftc.inuse =3D 0; > + devsoftc.nonblock =3D 0; > + devsoftc.async =3D 0; > cv_broadcast(&devsoftc.cv); > funsetown(&devsoftc.sigio); > mtx_unlock(&devsoftc.mtx); This is not pure cosmetic. devctl does not track closes, so opens are not matched with close calls. Now any close clears nonblock and async, which is not how it was done before. Tracking close calls does not work reliably. FWIW, I think that both old and new behaviour are bugs, and I am not sure why changing one for another (instead of fix). --MeyeQYaqfWO5VP1p Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJTwV+4AAoJEJDCuSvBvK1BBGkP+wZV2gDH+kEENgBk/6ufXcEo MTV988mSl44Wit86JSQcAVJ3CRosp39WbqQsHcWnQdNViWl8bDw9AWGkVZ52mF04 7JFlRnTF7ZDYQTIM2l43xgtiGom+CesfdAjucSrfgm0ESfrYVPjrWgpV4c1KmP5z i3nNWG9mUujZG0tVkLzrFt888XW4mFtEFP5MVfYP7jTaoZTkWAY4M0ELeF0FdCSw OTVxDNknBAgvozTEiI8Q+ekBcDDd/fNFnTr5vJQ3V1YD9ZqyWLp8mHZRHwhG9ML7 MkHmf4EEk6Od0pFfE+RjM9vcEHsmyJLLP5JFSRtO0dohw847dn7J4JzFFlmdoA8M 1FXh4OHIOcTwTTEax8hWYrS3Oif30ZSGqPNmwcB3sy937RTfVM49Z6SvS4QTbDiJ FWNRWbVtkNnuYds5rF08qAHgBUWyp0NfFuDHOqM3a5D4dDexsl/Vu5WF1ZoIXluT L0iFLnr+Z1XFb6HVqRZ5outsp2AKYSTT6m431Xv1gcafeo5LW7b6OLef+02j33p4 5TomfNHvMDxLcaJusnIdeNmplxDwpaHSyXa9W/OKLc4L0lDgUounGZTuhcvhs0fY dMHzd/t/tby7FgzdbR/rU5DrFOd4L4x0d7AsNnCd++R4l55gjHTT6GfCrD0CohJz 0K9Hwe40Ug3YgqpxE/0b =8HQD -----END PGP SIGNATURE----- --MeyeQYaqfWO5VP1p--