From owner-svn-src-stable-10@freebsd.org Sun Jul 23 18:00:12 2017 Return-Path: Delivered-To: svn-src-stable-10@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 D48FFDA99CE; Sun, 23 Jul 2017 18:00:12 +0000 (UTC) (envelope-from ngie@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 9E9496969D; Sun, 23 Jul 2017 18:00:12 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6NI0BEN030765; Sun, 23 Jul 2017 18:00:11 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6NI0BEd030764; Sun, 23 Jul 2017 18:00:11 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707231800.v6NI0BEd030764@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 23 Jul 2017 18:00:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r321389 - stable/10/usr.sbin/cron/cron X-SVN-Group: stable-10 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/10/usr.sbin/cron/cron X-SVN-Commit-Revision: 321389 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Jul 2017 18:00:12 -0000 Author: ngie Date: Sun Jul 23 18:00:11 2017 New Revision: 321389 URL: https://svnweb.freebsd.org/changeset/base/321389 Log: MFC r321240: cron(8) manpage updates - Document /etc/cron.d and /usr/local/etc/cron.d under FILES. - Reword documentation for -n: add appropriate soft-stop and remove contraction to appease igor. Modified: stable/10/usr.sbin/cron/cron/cron.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/cron/cron/cron.8 ============================================================================== --- stable/10/usr.sbin/cron/cron/cron.8 Sun Jul 23 18:00:03 2017 (r321388) +++ stable/10/usr.sbin/cron/cron/cron.8 Sun Jul 23 18:00:11 2017 (r321389) @@ -17,7 +17,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 31, 2016 +.Dd July 19, 2017 .Dt CRON 8 .Os .Sh NAME @@ -138,7 +138,7 @@ set to a null string, usually specified in a shell as or .Li \*q\*q . .It Fl n -Don't daemonize, run in foreground instead. +Do not daemonize; run in foreground instead. .It Fl s Enable special handling of situations when the GMT offset of the local timezone changes, such as the switches between the standard time and @@ -209,13 +209,17 @@ trace through the execution, but do not perform any ac .El .El .Sh FILES -.Bl -tag -width /etc/pam.d/cron -compact +.Bl -tag -width /usr/local/etc/cron.d -compact .It Pa /etc/crontab System crontab file +.It Pa /etc/cron.d +Directory for optional/modularized system crontab files. .It Pa /etc/pam.d/cron .Xr pam.conf 5 configuration file for .Nm +.It Pa /usr/local/etc/cron.d +Directory for third-party package provided crontab files. .It Pa /var/cron/tabs Directory for personal crontab files .El From owner-svn-src-stable-10@freebsd.org Mon Jul 24 02:13:48 2017 Return-Path: Delivered-To: svn-src-stable-10@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 3B317DB3BAB; Mon, 24 Jul 2017 02:13:48 +0000 (UTC) (envelope-from sephe@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 0768B775FE; Mon, 24 Jul 2017 02:13:47 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6O2DlUK033892; Mon, 24 Jul 2017 02:13:47 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6O2DleJ033891; Mon, 24 Jul 2017 02:13:47 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201707240213.v6O2DleJ033891@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Mon, 24 Jul 2017 02:13:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r321405 - stable/10/sys/dev/hyperv/storvsc X-SVN-Group: stable-10 X-SVN-Commit-Author: sephe X-SVN-Commit-Paths: stable/10/sys/dev/hyperv/storvsc X-SVN-Commit-Revision: 321405 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Jul 2017 02:13:48 -0000 Author: sephe Date: Mon Jul 24 02:13:46 2017 New Revision: 321405 URL: https://svnweb.freebsd.org/changeset/base/321405 Log: MFC 321286 hyperv/storvsc: Force SPC3 for CDROM attached. This unbreaks the CDROM attaching on GEN2 VMs. On GEN1 VMs, CDROM is attached to emulated ATA controller. PR: 220790 Submitted by: Hongjiang Zhang Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D11634 Modified: stable/10/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c ============================================================================== --- stable/10/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Mon Jul 24 01:39:58 2017 (r321404) +++ stable/10/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Mon Jul 24 02:13:46 2017 (r321405) @@ -2211,6 +2211,23 @@ storvsc_io_done(struct hv_storvsc_request *reqp) resp_buf[3], resp_buf[4]); } /* + * XXX: Hyper-V (since win2012r2) responses inquiry with + * unknown version (0) for GEN-2 DVD device. + * Manually set the version number to SPC3 in order to + * ask CAM to continue probing with "PROBE_REPORT_LUNS". + * see probedone() in scsi_xpt.c + */ + if (SID_TYPE(inq_data) == T_CDROM && + inq_data->version == 0 && + (vmstor_proto_version >= VMSTOR_PROTOCOL_VERSION_WIN8)) { + inq_data->version = SCSI_REV_SPC3; + if (bootverbose) { + xpt_print(ccb->ccb_h.path, + "set version from 0 to %d\n", + inq_data->version); + } + } + /* * XXX: Manually fix the wrong response returned from WS2012 */ if (!is_scsi_valid(inq_data) && @@ -2219,7 +2236,7 @@ storvsc_io_done(struct hv_storvsc_request *reqp) vmstor_proto_version == VMSTOR_PROTOCOL_VERSION_WIN7)) { if (data_len >= 4 && (resp_buf[2] == 0 || resp_buf[3] == 0)) { - resp_buf[2] = 5; // verion=5 means SPC-3 + resp_buf[2] = SCSI_REV_SPC3; resp_buf[3] = 2; // resp fmt must be 2 if (bootverbose) xpt_print(ccb->ccb_h.path, From owner-svn-src-stable-10@freebsd.org Mon Jul 24 14:42:47 2017 Return-Path: Delivered-To: svn-src-stable-10@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 4A924C7F96F; Mon, 24 Jul 2017 14:42:47 +0000 (UTC) (envelope-from ken@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 254936A7EC; Mon, 24 Jul 2017 14:42:47 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6OEgjUg038582; Mon, 24 Jul 2017 14:42:45 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6OEgjpW038580; Mon, 24 Jul 2017 14:42:45 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201707241442.v6OEgjpW038580@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Mon, 24 Jul 2017 14:42:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r321416 - in stable/10/sys/dev: mpr mps X-SVN-Group: stable-10 X-SVN-Commit-Author: ken X-SVN-Commit-Paths: in stable/10/sys/dev: mpr mps X-SVN-Commit-Revision: 321416 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Jul 2017 14:42:47 -0000 Author: ken Date: Mon Jul 24 14:42:45 2017 New Revision: 321416 URL: https://svnweb.freebsd.org/changeset/base/321416 Log: MFC r321207: ------------------------------------------------------------------------ r321207 | ken | 2017-07-19 09:39:01 -0600 (Wed, 19 Jul 2017) | 14 lines Fix spurious timeouts on commands sent to mps(4) and mpr(4) controllers. mps_wait_command() and mpr_wait_command() were using getmicrotime() to determine elapsed time when checking for a timeout in polled mode. getmicrotime() isn't guaranteed to monotonically increase, and that caused spurious timeouts occasionally. Switch to using getmicrouptime(), which does increase monotonically. This fixes the spurious timeouts in my test case. ------------------------------------------------------------------------ Reviewed by: slm, scottl Sponsored by: Spectra Logic Modified: stable/10/sys/dev/mpr/mpr.c stable/10/sys/dev/mps/mps.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/mpr/mpr.c ============================================================================== --- stable/10/sys/dev/mpr/mpr.c Mon Jul 24 14:42:43 2017 (r321415) +++ stable/10/sys/dev/mpr/mpr.c Mon Jul 24 14:42:45 2017 (r321416) @@ -3286,9 +3286,17 @@ mpr_wait_command(struct mpr_softc *sc, struct mpr_comm if (curthread->td_pflags & TDP_NOSLEEPING) #endif //__FreeBSD_version >= 1000029 sleep_flag = NO_SLEEP; - getmicrotime(&start_time); + getmicrouptime(&start_time); if (mtx_owned(&sc->mpr_mtx) && sleep_flag == CAN_SLEEP) { error = msleep(cm, &sc->mpr_mtx, 0, "mprwait", timeout*hz); + if (error == EWOULDBLOCK) { + /* + * Record the actual elapsed time in the case of a + * timeout for the message below. + */ + getmicrouptime(&cur_time); + timevalsub(&cur_time, &start_time); + } } else { while ((cm->cm_flags & MPR_CM_FLAGS_COMPLETE) == 0) { mpr_intr_locked(sc); @@ -3297,8 +3305,9 @@ mpr_wait_command(struct mpr_softc *sc, struct mpr_comm else DELAY(50000); - getmicrotime(&cur_time); - if ((cur_time.tv_sec - start_time.tv_sec) > timeout) { + getmicrouptime(&cur_time); + timevalsub(&cur_time, &start_time); + if (cur_time.tv_sec > timeout) { error = EWOULDBLOCK; break; } @@ -3306,7 +3315,9 @@ mpr_wait_command(struct mpr_softc *sc, struct mpr_comm } if (error == EWOULDBLOCK) { - mpr_dprint(sc, MPR_FAULT, "Calling Reinit from %s\n", __func__); + mpr_dprint(sc, MPR_FAULT, "Calling Reinit from %s, timeout=%d," + " elapsed=%jd\n", __func__, timeout, + (intmax_t)cur_time.tv_sec); rc = mpr_reinit(sc); mpr_dprint(sc, MPR_FAULT, "Reinit %s\n", (rc == 0) ? "success" : "failed"); Modified: stable/10/sys/dev/mps/mps.c ============================================================================== --- stable/10/sys/dev/mps/mps.c Mon Jul 24 14:42:43 2017 (r321415) +++ stable/10/sys/dev/mps/mps.c Mon Jul 24 14:42:45 2017 (r321416) @@ -2551,10 +2551,18 @@ mps_wait_command(struct mps_softc *sc, struct mps_comm */ if (curthread->td_no_sleeping != 0) sleep_flag = NO_SLEEP; - getmicrotime(&start_time); + getmicrouptime(&start_time); if (mtx_owned(&sc->mps_mtx) && sleep_flag == CAN_SLEEP) { cm->cm_flags |= MPS_CM_FLAGS_WAKEUP; error = msleep(cm, &sc->mps_mtx, 0, "mpswait", timeout*hz); + if (error == EWOULDBLOCK) { + /* + * Record the actual elapsed time in the case of a + * timeout for the message below. + */ + getmicrouptime(&cur_time); + timevalsub(&cur_time, &start_time); + } } else { while ((cm->cm_flags & MPS_CM_FLAGS_COMPLETE) == 0) { mps_intr_locked(sc); @@ -2563,8 +2571,9 @@ mps_wait_command(struct mps_softc *sc, struct mps_comm else DELAY(50000); - getmicrotime(&cur_time); - if ((cur_time.tv_sec - start_time.tv_sec) > timeout) { + getmicrouptime(&cur_time); + timevalsub(&cur_time, &start_time); + if (cur_time.tv_sec > timeout) { error = EWOULDBLOCK; break; } @@ -2572,7 +2581,9 @@ mps_wait_command(struct mps_softc *sc, struct mps_comm } if (error == EWOULDBLOCK) { - mps_dprint(sc, MPS_FAULT, "Calling Reinit from %s\n", __func__); + mps_dprint(sc, MPS_FAULT, "Calling Reinit from %s, timeout=%d," + " elapsed=%jd\n", __func__, timeout, + (intmax_t)cur_time.tv_sec); rc = mps_reinit(sc); mps_dprint(sc, MPS_FAULT, "Reinit %s\n", (rc == 0) ? "success" : "failed"); From owner-svn-src-stable-10@freebsd.org Mon Jul 24 16:45:39 2017 Return-Path: Delivered-To: svn-src-stable-10@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 D7C27CFE48A; Mon, 24 Jul 2017 16:45:39 +0000 (UTC) (envelope-from ngie@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 A03F36EE6E; Mon, 24 Jul 2017 16:45:39 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6OGjcOL088266; Mon, 24 Jul 2017 16:45:38 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6OGjcV6088264; Mon, 24 Jul 2017 16:45:38 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707241645.v6OGjcV6088264@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 24 Jul 2017 16:45:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r321421 - in stable/10/lib/msun: . man X-SVN-Group: stable-10 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: in stable/10/lib/msun: . man X-SVN-Commit-Revision: 321421 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Jul 2017 16:45:40 -0000 Author: ngie Date: Mon Jul 24 16:45:38 2017 New Revision: 321421 URL: https://svnweb.freebsd.org/changeset/base/321421 Log: MFC r290605,r290606: r290605: Document powl(3) PR: 191751 r290606: Bump .Dd Modified: stable/10/lib/msun/Makefile stable/10/lib/msun/man/exp.3 Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/msun/Makefile ============================================================================== --- stable/10/lib/msun/Makefile Mon Jul 24 16:33:06 2017 (r321420) +++ stable/10/lib/msun/Makefile Mon Jul 24 16:45:38 2017 (r321421) @@ -169,7 +169,8 @@ MLINKS+=cosh.3 coshf.3 cosh.3 coshl.3 MLINKS+=csqrt.3 csqrtf.3 csqrt.3 csqrtl.3 MLINKS+=erf.3 erfc.3 erf.3 erff.3 erf.3 erfcf.3 erf.3 erfl.3 erf.3 erfcl.3 MLINKS+=exp.3 expm1.3 exp.3 expm1f.3 exp.3 expm1l.3 exp.3 pow.3 exp.3 powf.3 \ - exp.3 exp2.3 exp.3 exp2f.3 exp.3 exp2l.3 exp.3 expf.3 exp.3 expl.3 + exp.3 powl.3 exp.3 exp2.3 exp.3 exp2f.3 exp.3 exp2l.3 exp.3 expf.3 \ + exp.3 expl.3 MLINKS+=fabs.3 fabsf.3 fabs.3 fabsl.3 MLINKS+=fdim.3 fdimf.3 fdim.3 fdiml.3 MLINKS+=feclearexcept.3 fegetexceptflag.3 feclearexcept.3 feraiseexcept.3 \ Modified: stable/10/lib/msun/man/exp.3 ============================================================================== --- stable/10/lib/msun/man/exp.3 Mon Jul 24 16:33:06 2017 (r321420) +++ stable/10/lib/msun/man/exp.3 Mon Jul 24 16:45:38 2017 (r321421) @@ -28,7 +28,7 @@ .\" from: @(#)exp.3 6.12 (Berkeley) 7/31/91 .\" $FreeBSD$ .\" -.Dd June 3, 2013 +.Dd November 9, 2015 .Dt EXP 3 .Os .Sh NAME @@ -43,7 +43,8 @@ .Nm expm1f , .Nm expm1l , .Nm pow , -.Nm powf +.Nm powf , +.Nm powl .Nd exponential and power functions .Sh LIBRARY .Lb libm @@ -71,6 +72,8 @@ .Fn pow "double x" "double y" .Ft float .Fn powf "float x" "float y" +.Ft long double +.Fn powl "long double x" "long double y" .Sh DESCRIPTION The .Fn exp , @@ -99,9 +102,10 @@ functions compute the value exp(x)\-1 accurately even .Fa x . .Pp The -.Fn pow +.Fn pow , +.Fn powf , and the -.Fn powf +.Fn powl functions compute the value of .Ar x @@ -122,9 +126,10 @@ Otherwise the error in these functions is generally be These functions will return the appropriate computation unless an error occurs or an argument is out of range. The functions -.Fn pow x y +.Fn pow x y , +.Fn powf x y , and -.Fn powf x y +.Fn powl x y raise an invalid exception and return an \*(Na if .Fa x < 0 and From owner-svn-src-stable-10@freebsd.org Tue Jul 25 04:13:44 2017 Return-Path: Delivered-To: svn-src-stable-10@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 84808DB4F17; Tue, 25 Jul 2017 04:13:44 +0000 (UTC) (envelope-from alc@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 4F0FA66B86; Tue, 25 Jul 2017 04:13:44 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6P4DhHO070301; Tue, 25 Jul 2017 04:13:43 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6P4DhQR070299; Tue, 25 Jul 2017 04:13:43 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201707250413.v6P4DhQR070299@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Tue, 25 Jul 2017 04:13:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r321459 - in stable/10/sys: kern sys X-SVN-Group: stable-10 X-SVN-Commit-Author: alc X-SVN-Commit-Paths: in stable/10/sys: kern sys X-SVN-Commit-Revision: 321459 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Jul 2017 04:13:44 -0000 Author: alc Date: Tue Jul 25 04:13:43 2017 New Revision: 321459 URL: https://svnweb.freebsd.org/changeset/base/321459 Log: MFC r320077 Change blist_alloc()'s allocation policy from first-fit to next-fit so that disk writes are more likely to be sequential. This change is beneficial on both the solid state and mechanical disks that I've tested. (A similar change in allocation policy was made by DragonFly BSD in 2013 to speed up Poudriere with "stressful memory parameters".) Increase the width of blst_meta_alloc()'s parameter "skip" and the local variables whose values are derived from it to 64 bits. (This matches the width of the field "skip" that is stored in the structure "blist" and passed to blst_meta_alloc().) Eliminate a pointless check for a NULL blist_t. Simplify blst_meta_alloc()'s handling of the ALL-FREE case. Address nearby style errors. MFC r320417 Address the remaining integer overflow issues with the "skip" parameters and "next_skip" variables. The "skip" value in struct blist has long been a 64-bit quantity but various functions have implicitly truncated this value to 32 bits. Now, all arithmetic involving the "skip" value is 64 bits wide. (This should allow us to relax the size limit on a swap device in the swap pager.) Maintain the ability to test this allocator as a user-space application by including . Remove an unused variable from blst_radix_print(). MFC r320527 Change blst_leaf_alloc() to handle a cursor argument, and to improve performance. To find in the leaf bitmap all ranges of sufficient length, use a doubling strategy with shift-and-and until each bit still set represents a bit sequence of length 'count', or until the bitmask is zero. In the latter case, update the hint based on the first bit sequence length not found to be available. For example, seeking an interval of length 12, the set bits of the bitmap would represent intervals of length 1, then 2, then 3, then 6, then 12. If no bits are set at the point when each bit represents an interval of length 6, then the hint can be updated to 5 and the search terminated. If long-enough intervals are found, discard those before the cursor. If any remain, use binary search to find the position of the first of them, and allocate that interval. Modified: stable/10/sys/kern/subr_blist.c stable/10/sys/sys/blist.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/subr_blist.c ============================================================================== --- stable/10/sys/kern/subr_blist.c Tue Jul 25 03:59:35 2017 (r321458) +++ stable/10/sys/kern/subr_blist.c Tue Jul 25 04:13:43 2017 (r321459) @@ -105,6 +105,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #define bitcount64(x) __bitcount64((uint64_t)(x)) #define malloc(a,b,c) calloc(a, 1) @@ -120,22 +121,23 @@ void panic(const char *ctl, ...); * static support functions */ -static daddr_t blst_leaf_alloc(blmeta_t *scan, daddr_t blk, int count); -static daddr_t blst_meta_alloc(blmeta_t *scan, daddr_t blk, - daddr_t count, daddr_t radix, int skip); +static daddr_t blst_leaf_alloc(blmeta_t *scan, daddr_t blk, int count, + daddr_t cursor); +static daddr_t blst_meta_alloc(blmeta_t *scan, daddr_t blk, daddr_t count, + daddr_t radix, daddr_t skip, daddr_t cursor); static void blst_leaf_free(blmeta_t *scan, daddr_t relblk, int count); static void blst_meta_free(blmeta_t *scan, daddr_t freeBlk, daddr_t count, - daddr_t radix, int skip, daddr_t blk); + daddr_t radix, daddr_t skip, daddr_t blk); static void blst_copy(blmeta_t *scan, daddr_t blk, daddr_t radix, daddr_t skip, blist_t dest, daddr_t count); static daddr_t blst_leaf_fill(blmeta_t *scan, daddr_t blk, int count); static daddr_t blst_meta_fill(blmeta_t *scan, daddr_t allocBlk, daddr_t count, - daddr_t radix, int skip, daddr_t blk); -static daddr_t blst_radix_init(blmeta_t *scan, daddr_t radix, - int skip, daddr_t count); + daddr_t radix, daddr_t skip, daddr_t blk); +static daddr_t blst_radix_init(blmeta_t *scan, daddr_t radix, daddr_t skip, + daddr_t count); #ifndef _KERNEL -static void blst_radix_print(blmeta_t *scan, daddr_t blk, - daddr_t radix, int skip, int tab); +static void blst_radix_print(blmeta_t *scan, daddr_t blk, daddr_t radix, + daddr_t skip, int tab); #endif #ifdef _KERNEL @@ -157,18 +159,18 @@ blist_t blist_create(daddr_t blocks, int flags) { blist_t bl; - daddr_t nodes, radix; - int skip = 0; + daddr_t nodes, radix, skip; /* * Calculate radix and skip field used for scanning. */ radix = BLIST_BMAP_RADIX; - + skip = 0; while (radix < blocks) { radix *= BLIST_META_RADIX; skip = (skip + 1) * BLIST_META_RADIX; } + nodes = 1 + blst_radix_init(NULL, radix, skip, blocks); bl = malloc(sizeof(struct blist), M_SWAP, flags); if (bl == NULL) @@ -177,13 +179,13 @@ blist_create(daddr_t blocks, int flags) bl->bl_blocks = blocks; bl->bl_radix = radix; bl->bl_skip = skip; - nodes = 1 + blst_radix_init(NULL, radix, bl->bl_skip, blocks); + bl->bl_cursor = 0; bl->bl_root = malloc(nodes * sizeof(blmeta_t), M_SWAP, flags); if (bl->bl_root == NULL) { free(bl, M_SWAP); return (NULL); } - blst_radix_init(bl->bl_root, radix, bl->bl_skip, blocks); + blst_radix_init(bl->bl_root, radix, skip, blocks); #if defined(BLIST_DEBUG) printf( @@ -218,13 +220,24 @@ blist_alloc(blist_t bl, daddr_t count) { daddr_t blk; - if (bl != NULL && count <= bl->bl_root->bm_bighint) { + /* + * This loop iterates at most twice. An allocation failure in the + * first iteration leads to a second iteration only if the cursor was + * non-zero. When the cursor is zero, an allocation failure will + * reduce the hint, stopping further iterations. + */ + while (count <= bl->bl_root->bm_bighint) { if (bl->bl_radix == BLIST_BMAP_RADIX) - blk = blst_leaf_alloc(bl->bl_root, 0, count); + blk = blst_leaf_alloc(bl->bl_root, 0, count, + bl->bl_cursor); else blk = blst_meta_alloc(bl->bl_root, 0, count, - bl->bl_radix, bl->bl_skip); - return (blk); + bl->bl_radix, bl->bl_skip, bl->bl_cursor); + if (blk != SWAPBLK_NONE) { + bl->bl_cursor = blk + count; + return (blk); + } else if (bl->bl_cursor != 0) + bl->bl_cursor = 0; } return (SWAPBLK_NONE); } @@ -341,77 +354,92 @@ blist_print(blist_t bl) /* * blist_leaf_alloc() - allocate at a leaf in the radix tree (a bitmap). * - * This is the core of the allocator and is optimized for the 1 block - * and the BLIST_BMAP_RADIX block allocation cases. Other cases are - * somewhat slower. The 1 block allocation case is log2 and extremely - * quick. + * This is the core of the allocator and is optimized for the + * BLIST_BMAP_RADIX block allocation case. Otherwise, execution + * time is proportional to log2(count) + log2(BLIST_BMAP_RADIX). */ static daddr_t -blst_leaf_alloc( - blmeta_t *scan, - daddr_t blk, - int count -) { - u_daddr_t orig = scan->u.bmu_bitmap; +blst_leaf_alloc(blmeta_t *scan, daddr_t blk, int count, daddr_t cursor) +{ + u_daddr_t mask; + int count1, hi, lo, mid, num_shifts, range1, range_ext; - if (orig == 0) { + if (count == BLIST_BMAP_RADIX) { /* - * Optimize bitmap all-allocated case. Also, count = 1 - * case assumes at least 1 bit is free in the bitmap, so - * we have to take care of this case here. + * Optimize allocation of BLIST_BMAP_RADIX bits. If this wasn't + * a special case, then forming the final value of 'mask' below + * would require special handling to avoid an invalid left shift + * when count equals the number of bits in mask. */ + if (~scan->u.bmu_bitmap != 0) { + scan->bm_bighint = BLIST_BMAP_RADIX - 1; + return (SWAPBLK_NONE); + } + if (cursor != blk) + return (SWAPBLK_NONE); + scan->u.bmu_bitmap = 0; scan->bm_bighint = 0; - return(SWAPBLK_NONE); + return (blk); } - if (count == 1) { + range1 = 0; + count1 = count - 1; + num_shifts = fls(count1); + mask = scan->u.bmu_bitmap; + while (mask != 0 && num_shifts > 0) { /* - * Optimized code to allocate one bit out of the bitmap + * If bit i is set in mask, then bits in [i, i+range1] are set + * in scan->u.bmu_bitmap. The value of range1 is equal to + * count1 >> num_shifts. Grow range and reduce num_shifts to 0, + * while preserving these invariants. The updates to mask leave + * fewer bits set, but each bit that remains set represents a + * longer string of consecutive bits set in scan->u.bmu_bitmap. */ - u_daddr_t mask; - int j = BLIST_BMAP_RADIX/2; - int r = 0; - - mask = (u_daddr_t)-1 >> (BLIST_BMAP_RADIX/2); - - while (j) { - if ((orig & mask) == 0) { - r += j; - orig >>= j; - } - j >>= 1; - mask >>= j; - } - scan->u.bmu_bitmap &= ~((u_daddr_t)1 << r); - return(blk + r); + num_shifts--; + range_ext = range1 + ((count1 >> num_shifts) & 1); + mask &= mask >> range_ext; + range1 += range_ext; } - if (count <= BLIST_BMAP_RADIX) { + if (mask == 0) { /* - * non-optimized code to allocate N bits out of the bitmap. - * The more bits, the faster the code runs. It will run - * the slowest allocating 2 bits, but since there aren't any - * memory ops in the core loop (or shouldn't be, anyway), - * you probably won't notice the difference. + * Update bighint. There is no allocation bigger than range1 + * available in this leaf. */ - int j; - int n = BLIST_BMAP_RADIX - count; - u_daddr_t mask; + scan->bm_bighint = range1; + return (SWAPBLK_NONE); + } - mask = (u_daddr_t)-1 >> n; + /* + * Discard any candidates that appear before the cursor. + */ + lo = cursor - blk; + mask &= ~(u_daddr_t)0 << lo; - for (j = 0; j <= n; ++j) { - if ((orig & mask) == mask) { - scan->u.bmu_bitmap &= ~mask; - return(blk + j); - } - mask = (mask << 1); - } + if (mask == 0) + return (SWAPBLK_NONE); + + /* + * The least significant set bit in mask marks the start of the first + * available range of sufficient size. Clear all the bits but that one, + * and then perform a binary search to find its position. + */ + mask &= -mask; + hi = BLIST_BMAP_RADIX - count1; + while (lo + 1 < hi) { + mid = (lo + hi) >> 1; + if ((mask >> mid) != 0) + lo = mid; + else + hi = mid; } + /* - * We couldn't allocate count in this subtree, update bighint. + * Set in mask exactly the bits being allocated, and clear them from + * the set of available bits. */ - scan->bm_bighint = count - 1; - return(SWAPBLK_NONE); + mask = (mask << count) - mask; + scan->u.bmu_bitmap &= ~mask; + return (blk + lo); } /* @@ -424,16 +452,12 @@ blst_leaf_alloc( */ static daddr_t -blst_meta_alloc( - blmeta_t *scan, - daddr_t blk, - daddr_t count, - daddr_t radix, - int skip -) { - daddr_t r; - int i; - int next_skip = ((u_int)skip / BLIST_META_RADIX); +blst_meta_alloc(blmeta_t *scan, daddr_t blk, daddr_t count, daddr_t radix, + daddr_t skip, daddr_t cursor) +{ + daddr_t i, next_skip, r; + int child; + bool scan_from_start; if (scan->u.bmu_avail < count) { /* @@ -444,6 +468,7 @@ blst_meta_alloc( scan->bm_bighint = scan->u.bmu_avail; return (SWAPBLK_NONE); } + next_skip = skip / BLIST_META_RADIX; /* * An ALL-FREE meta node requires special handling before allocating @@ -457,13 +482,11 @@ blst_meta_alloc( * meta node cannot have a terminator in any subtree. */ for (i = 1; i <= skip; i += next_skip) { - if (next_skip == 1) { + if (next_skip == 1) scan[i].u.bmu_bitmap = (u_daddr_t)-1; - scan[i].bm_bighint = BLIST_BMAP_RADIX; - } else { - scan[i].bm_bighint = radix; + else scan[i].u.bmu_avail = radix; - } + scan[i].bm_bighint = radix; } } else { radix /= BLIST_META_RADIX; @@ -476,16 +499,21 @@ blst_meta_alloc( */ panic("allocation too large"); } - for (i = 1; i <= skip; i += next_skip) { + scan_from_start = cursor == blk; + child = (cursor - blk) / radix; + blk += child * radix; + for (i = 1 + child * next_skip; i <= skip; i += next_skip) { if (count <= scan[i].bm_bighint) { /* * The allocation might fit in the i'th subtree. */ if (next_skip == 1) { - r = blst_leaf_alloc(&scan[i], blk, count); + r = blst_leaf_alloc(&scan[i], blk, count, + cursor > blk ? cursor : blk); } else { r = blst_meta_alloc(&scan[i], blk, count, - radix, next_skip - 1); + radix, next_skip - 1, cursor > blk ? + cursor : blk); } if (r != SWAPBLK_NONE) { scan->u.bmu_avail -= count; @@ -503,9 +531,10 @@ blst_meta_alloc( /* * We couldn't allocate count in this subtree, update bighint. */ - if (scan->bm_bighint >= count) + if (scan_from_start && scan->bm_bighint >= count) scan->bm_bighint = count - 1; - return(SWAPBLK_NONE); + + return (SWAPBLK_NONE); } /* @@ -558,16 +587,11 @@ blst_leaf_free( */ static void -blst_meta_free( - blmeta_t *scan, - daddr_t freeBlk, - daddr_t count, - daddr_t radix, - int skip, - daddr_t blk -) { - int i; - int next_skip = ((u_int)skip / BLIST_META_RADIX); +blst_meta_free(blmeta_t *scan, daddr_t freeBlk, daddr_t count, daddr_t radix, + daddr_t skip, daddr_t blk) +{ + daddr_t i, next_skip, v; + int child; #if 0 printf("free (%llx,%lld) FROM (%llx,%lld)\n", @@ -575,6 +599,7 @@ blst_meta_free( (long long)blk, (long long)radix ); #endif + next_skip = skip / BLIST_META_RADIX; if (scan->u.bmu_avail == 0) { /* @@ -619,13 +644,10 @@ blst_meta_free( radix /= BLIST_META_RADIX; - i = (freeBlk - blk) / radix; - blk += i * radix; - i = i * next_skip + 1; - + child = (freeBlk - blk) / radix; + blk += child * radix; + i = 1 + child * next_skip; while (i <= skip && blk < freeBlk + count) { - daddr_t v; - v = blk + radix - freeBlk; if (v > count) v = count; @@ -662,8 +684,7 @@ static void blst_copy( blist_t dest, daddr_t count ) { - int next_skip; - int i; + daddr_t i, next_skip; /* * Leaf node @@ -708,7 +729,7 @@ static void blst_copy( radix /= BLIST_META_RADIX; - next_skip = ((u_int)skip / BLIST_META_RADIX); + next_skip = skip / BLIST_META_RADIX; for (i = 1; count && i <= skip; i += next_skip) { if (scan[i].bm_bighint == (daddr_t)-1) @@ -775,17 +796,11 @@ blst_leaf_fill(blmeta_t *scan, daddr_t blk, int count) * number of blocks allocated by the call. */ static daddr_t -blst_meta_fill( - blmeta_t *scan, - daddr_t allocBlk, - daddr_t count, - daddr_t radix, - int skip, - daddr_t blk -) { - int i; - int next_skip = ((u_int)skip / BLIST_META_RADIX); - daddr_t nblks = 0; +blst_meta_fill(blmeta_t *scan, daddr_t allocBlk, daddr_t count, daddr_t radix, + daddr_t skip, daddr_t blk) +{ + daddr_t i, nblks, next_skip, v; + int child; if (count > radix) { /* @@ -803,6 +818,7 @@ blst_meta_fill( scan->bm_bighint = 0; return nblks; } + next_skip = skip / BLIST_META_RADIX; /* * An ALL-FREE meta node requires special handling before allocating @@ -828,13 +844,11 @@ blst_meta_fill( radix /= BLIST_META_RADIX; } - i = (allocBlk - blk) / radix; - blk += i * radix; - i = i * next_skip + 1; - + nblks = 0; + child = (allocBlk - blk) / radix; + blk += child * radix; + i = 1 + child * next_skip; while (i <= skip && blk < allocBlk + count) { - daddr_t v; - v = blk + radix - allocBlk; if (v > count) v = count; @@ -867,12 +881,12 @@ blst_meta_fill( */ static daddr_t -blst_radix_init(blmeta_t *scan, daddr_t radix, int skip, daddr_t count) +blst_radix_init(blmeta_t *scan, daddr_t radix, daddr_t skip, daddr_t count) { - int i; - int next_skip; - daddr_t memindex = 0; + daddr_t i, memindex, next_skip; + memindex = 0; + /* * Leaf node */ @@ -897,7 +911,7 @@ blst_radix_init(blmeta_t *scan, daddr_t radix, int ski } radix /= BLIST_META_RADIX; - next_skip = ((u_int)skip / BLIST_META_RADIX); + next_skip = skip / BLIST_META_RADIX; for (i = 1; i <= skip; i += next_skip) { if (count >= radix) { @@ -939,11 +953,10 @@ blst_radix_init(blmeta_t *scan, daddr_t radix, int ski #ifdef BLIST_DEBUG static void -blst_radix_print(blmeta_t *scan, daddr_t blk, daddr_t radix, int skip, int tab) +blst_radix_print(blmeta_t *scan, daddr_t blk, daddr_t radix, daddr_t skip, + int tab) { - int i; - int next_skip; - int lastState = 0; + daddr_t i, next_skip; if (radix == BLIST_BMAP_RADIX) { printf( @@ -985,7 +998,7 @@ blst_radix_print(blmeta_t *scan, daddr_t blk, daddr_t ); radix /= BLIST_META_RADIX; - next_skip = ((u_int)skip / BLIST_META_RADIX); + next_skip = skip / BLIST_META_RADIX; tab += 4; for (i = 1; i <= skip; i += next_skip) { @@ -995,7 +1008,6 @@ blst_radix_print(blmeta_t *scan, daddr_t blk, daddr_t tab, tab, "", (long long)blk, (long long)radix ); - lastState = 0; break; } blst_radix_print( Modified: stable/10/sys/sys/blist.h ============================================================================== --- stable/10/sys/sys/blist.h Tue Jul 25 03:59:35 2017 (r321458) +++ stable/10/sys/sys/blist.h Tue Jul 25 04:13:43 2017 (r321459) @@ -82,6 +82,7 @@ typedef struct blist { daddr_t bl_blocks; /* area of coverage */ daddr_t bl_radix; /* coverage radix */ daddr_t bl_skip; /* starting skip */ + daddr_t bl_cursor; /* next-fit search starts at */ blmeta_t *bl_root; /* root of radix tree */ } *blist_t; From owner-svn-src-stable-10@freebsd.org Wed Jul 26 01:23:37 2017 Return-Path: Delivered-To: svn-src-stable-10@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 17C11DAD7EE; Wed, 26 Jul 2017 01:23:37 +0000 (UTC) (envelope-from davidcs@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 D8DBE6F670; Wed, 26 Jul 2017 01:23:36 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6Q1Naiq096157; Wed, 26 Jul 2017 01:23:36 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6Q1NZ3v096155; Wed, 26 Jul 2017 01:23:35 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201707260123.v6Q1NZ3v096155@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Wed, 26 Jul 2017 01:23:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r321497 - stable/10/sys/dev/qlxgbe X-SVN-Group: stable-10 X-SVN-Commit-Author: davidcs X-SVN-Commit-Paths: stable/10/sys/dev/qlxgbe X-SVN-Commit-Revision: 321497 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Jul 2017 01:23:37 -0000 Author: davidcs Date: Wed Jul 26 01:23:35 2017 New Revision: 321497 URL: https://svnweb.freebsd.org/changeset/base/321497 Log: MFC 320694 Allow MTU changes without ifconfig down/up Modified: stable/10/sys/dev/qlxgbe/ql_hw.c stable/10/sys/dev/qlxgbe/ql_os.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/qlxgbe/ql_hw.c ============================================================================== --- stable/10/sys/dev/qlxgbe/ql_hw.c Wed Jul 26 01:19:49 2017 (r321496) +++ stable/10/sys/dev/qlxgbe/ql_hw.c Wed Jul 26 01:23:35 2017 (r321497) @@ -2498,6 +2498,9 @@ ql_init_hw_if(qla_host_t *ha) if (qla_hw_add_all_mcast(ha)) return (-1); + if (ql_set_max_mtu(ha, ha->max_frame_size, ha->hw.rcv_cntxt_id)) + return (-1); + if (qla_config_rss(ha, ha->hw.rcv_cntxt_id)) return (-1); Modified: stable/10/sys/dev/qlxgbe/ql_os.c ============================================================================== --- stable/10/sys/dev/qlxgbe/ql_os.c Wed Jul 26 01:19:49 2017 (r321496) +++ stable/10/sys/dev/qlxgbe/ql_os.c Wed Jul 26 01:23:35 2017 (r321497) @@ -985,8 +985,7 @@ qla_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) ifp->if_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN; if ((ifp->if_drv_flags & IFF_DRV_RUNNING)) { - ret = ql_set_max_mtu(ha, ha->max_frame_size, - ha->hw.rcv_cntxt_id); + qla_init_locked(ha); } if (ifp->if_mtu > ETHERMTU) @@ -1019,11 +1018,9 @@ qla_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) ret = ql_set_allmulti(ha); } } else { - qla_init_locked(ha); ha->max_frame_size = ifp->if_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN; - ret = ql_set_max_mtu(ha, ha->max_frame_size, - ha->hw.rcv_cntxt_id); + qla_init_locked(ha); } } else { if (ifp->if_drv_flags & IFF_DRV_RUNNING) From owner-svn-src-stable-10@freebsd.org Wed Jul 26 01:25:53 2017 Return-Path: Delivered-To: svn-src-stable-10@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 1C0FDDAD8B4; Wed, 26 Jul 2017 01:25:53 +0000 (UTC) (envelope-from davidcs@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 DC7486F7BB; Wed, 26 Jul 2017 01:25:52 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6Q1PpCt096296; Wed, 26 Jul 2017 01:25:51 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6Q1Pp8F096295; Wed, 26 Jul 2017 01:25:51 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201707260125.v6Q1Pp8F096295@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Wed, 26 Jul 2017 01:25:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r321498 - stable/10/sys/dev/qlxgbe X-SVN-Group: stable-10 X-SVN-Commit-Author: davidcs X-SVN-Commit-Paths: stable/10/sys/dev/qlxgbe X-SVN-Commit-Revision: 321498 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Jul 2017 01:25:53 -0000 Author: davidcs Date: Wed Jul 26 01:25:51 2017 New Revision: 321498 URL: https://svnweb.freebsd.org/changeset/base/321498 Log: MFC 320705 Release mtx hw_lock before calling pause() in qla_stop() and qla_error_recovery() Modified: stable/10/sys/dev/qlxgbe/ql_os.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/qlxgbe/ql_os.c ============================================================================== --- stable/10/sys/dev/qlxgbe/ql_os.c Wed Jul 26 01:23:35 2017 (r321497) +++ stable/10/sys/dev/qlxgbe/ql_os.c Wed Jul 26 01:25:51 2017 (r321498) @@ -1524,8 +1524,11 @@ qla_stop(qla_host_t *ha) ha->flags.qla_watchdog_pause = 1; - while (!ha->qla_watchdog_paused) + while (!ha->qla_watchdog_paused) { + QLA_UNLOCK(ha); qla_mdelay(__func__, 1); + QLA_LOCK(ha); + } ha->flags.qla_interface_up = 0; @@ -1920,7 +1923,10 @@ qla_error_recovery(void *context, int pending) if (ha->flags.qla_interface_up) { ha->hw.imd_compl = 1; + + QLA_UNLOCK(ha); qla_mdelay(__func__, 300); + QLA_LOCK(ha); ifp->if_drv_flags &= ~(IFF_DRV_OACTIVE | IFF_DRV_RUNNING); From owner-svn-src-stable-10@freebsd.org Wed Jul 26 01:28:29 2017 Return-Path: Delivered-To: svn-src-stable-10@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 35D63DAD96D; Wed, 26 Jul 2017 01:28:29 +0000 (UTC) (envelope-from davidcs@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 0E90D6F93E; Wed, 26 Jul 2017 01:28:28 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6Q1SSEA096436; Wed, 26 Jul 2017 01:28:28 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6Q1SRp5096432; Wed, 26 Jul 2017 01:28:27 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201707260128.v6Q1SRp5096432@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Wed, 26 Jul 2017 01:28:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r321499 - stable/10/sys/dev/qlxgbe X-SVN-Group: stable-10 X-SVN-Commit-Author: davidcs X-SVN-Commit-Paths: stable/10/sys/dev/qlxgbe X-SVN-Commit-Revision: 321499 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Jul 2017 01:28:29 -0000 Author: davidcs Date: Wed Jul 26 01:28:27 2017 New Revision: 321499 URL: https://svnweb.freebsd.org/changeset/base/321499 Log: MFC 321233 Raise the watchdog timer interval to 2 ticks, there by guaranteeing that it fires between 1ms and 2ms. ` Treat two consecutive occurrences of Heartbeat failures as a legitimate Heartbeat failure Modified: stable/10/sys/dev/qlxgbe/ql_def.h stable/10/sys/dev/qlxgbe/ql_hw.c stable/10/sys/dev/qlxgbe/ql_hw.h stable/10/sys/dev/qlxgbe/ql_os.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/qlxgbe/ql_def.h ============================================================================== --- stable/10/sys/dev/qlxgbe/ql_def.h Wed Jul 26 01:25:51 2017 (r321498) +++ stable/10/sys/dev/qlxgbe/ql_def.h Wed Jul 26 01:28:27 2017 (r321499) @@ -105,7 +105,7 @@ struct qla_ivec { typedef struct qla_ivec qla_ivec_t; -#define QLA_WATCHDOG_CALLOUT_TICKS 1 +#define QLA_WATCHDOG_CALLOUT_TICKS 2 typedef struct _qla_tx_ring { qla_tx_buf_t tx_buf[NUM_TX_DESCRIPTORS]; Modified: stable/10/sys/dev/qlxgbe/ql_hw.c ============================================================================== --- stable/10/sys/dev/qlxgbe/ql_hw.c Wed Jul 26 01:25:51 2017 (r321498) +++ stable/10/sys/dev/qlxgbe/ql_hw.c Wed Jul 26 01:28:27 2017 (r321499) @@ -3366,7 +3366,7 @@ ql_hw_check_health(qla_host_t *ha) ha->hw.health_count++; - if (ha->hw.health_count < 1000) + if (ha->hw.health_count < 500) return 0; ha->hw.health_count = 0; @@ -3385,10 +3385,18 @@ ql_hw_check_health(qla_host_t *ha) if ((val != ha->hw.hbeat_value) && (!(QL_ERR_INJECT(ha, INJCT_HEARTBEAT_FAILURE)))) { ha->hw.hbeat_value = val; + ha->hw.hbeat_failure = 0; return 0; } - device_printf(ha->pci_dev, "%s: Heartbeat Failue [0x%08x]\n", - __func__, val); + + ha->hw.hbeat_failure++; + + if (ha->hw.hbeat_failure < 2) /* we ignore the first failure */ + return 0; + else + device_printf(ha->pci_dev, "%s: Heartbeat Failue [0x%08x]\n", + __func__, val); + return -1; } Modified: stable/10/sys/dev/qlxgbe/ql_hw.h ============================================================================== --- stable/10/sys/dev/qlxgbe/ql_hw.h Wed Jul 26 01:25:51 2017 (r321498) +++ stable/10/sys/dev/qlxgbe/ql_hw.h Wed Jul 26 01:28:27 2017 (r321499) @@ -1671,6 +1671,7 @@ typedef struct _qla_hw { /* heart beat register value */ uint32_t hbeat_value; uint32_t health_count; + uint32_t hbeat_failure; uint32_t max_tx_segs; uint32_t min_lro_pkt_size; Modified: stable/10/sys/dev/qlxgbe/ql_os.c ============================================================================== --- stable/10/sys/dev/qlxgbe/ql_os.c Wed Jul 26 01:25:51 2017 (r321498) +++ stable/10/sys/dev/qlxgbe/ql_os.c Wed Jul 26 01:28:27 2017 (r321499) @@ -276,7 +276,7 @@ qla_watchdog(void *arg) ha->qla_watchdog_paused = 1; } - ha->watchdog_ticks = ha->watchdog_ticks++ % 1000; + ha->watchdog_ticks = ha->watchdog_ticks++ % 500; callout_reset(&ha->tx_callout, QLA_WATCHDOG_CALLOUT_TICKS, qla_watchdog, ha); } From owner-svn-src-stable-10@freebsd.org Wed Jul 26 11:03:15 2017 Return-Path: Delivered-To: svn-src-stable-10@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 405B1DB7701; Wed, 26 Jul 2017 11:03:15 +0000 (UTC) (envelope-from ae@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 0F11183101; Wed, 26 Jul 2017 11:03:14 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6QB3E1t033158; Wed, 26 Jul 2017 11:03:14 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6QB3EId033156; Wed, 26 Jul 2017 11:03:14 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201707261103.v6QB3EId033156@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Wed, 26 Jul 2017 11:03:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r321516 - stable/10/sys/dev/bxe X-SVN-Group: stable-10 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: stable/10/sys/dev/bxe X-SVN-Commit-Revision: 321516 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Jul 2017 11:03:15 -0000 Author: ae Date: Wed Jul 26 11:03:13 2017 New Revision: 321516 URL: https://svnweb.freebsd.org/changeset/base/321516 Log: MFC r321203: Add HPE FlexFabric 10Gb 4-port 536FLR-T device id to the bxe(4) driver. Modified: stable/10/sys/dev/bxe/bxe.c stable/10/sys/dev/bxe/bxe.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/bxe/bxe.c ============================================================================== --- stable/10/sys/dev/bxe/bxe.c Wed Jul 26 07:00:27 2017 (r321515) +++ stable/10/sys/dev/bxe/bxe.c Wed Jul 26 11:03:13 2017 (r321516) @@ -167,6 +167,12 @@ static struct bxe_device_type bxe_devs[] = { "QLogic NetXtreme II BCM57840 4x10GbE" }, { + QLOGIC_VENDORID, + CHIP_NUM_57840_4_10, + PCI_ANY_ID, PCI_ANY_ID, + "QLogic NetXtreme II BCM57840 4x10GbE" + }, + { BRCM_VENDORID, CHIP_NUM_57840_MF, PCI_ANY_ID, PCI_ANY_ID, Modified: stable/10/sys/dev/bxe/bxe.h ============================================================================== --- stable/10/sys/dev/bxe/bxe.h Wed Jul 26 07:00:27 2017 (r321515) +++ stable/10/sys/dev/bxe/bxe.h Wed Jul 26 11:03:13 2017 (r321516) @@ -168,6 +168,7 @@ int bxe_ilog2(int x) #include "ecore_sp.h" #define BRCM_VENDORID 0x14e4 +#define QLOGIC_VENDORID 0x1077 #define PCI_ANY_ID (uint16_t)(~0U) struct bxe_device_type From owner-svn-src-stable-10@freebsd.org Wed Jul 26 23:05:27 2017 Return-Path: Delivered-To: svn-src-stable-10@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 31433DB2E16; Wed, 26 Jul 2017 23:05:27 +0000 (UTC) (envelope-from emaste@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 F41AC7F400; Wed, 26 Jul 2017 23:05:26 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6QN5QEf036962; Wed, 26 Jul 2017 23:05:26 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6QN5QYE036961; Wed, 26 Jul 2017 23:05:26 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201707262305.v6QN5QYE036961@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 26 Jul 2017 23:05:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r321592 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 321592 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Jul 2017 23:05:27 -0000 Author: emaste Date: Wed Jul 26 23:05:25 2017 New Revision: 321592 URL: https://svnweb.freebsd.org/changeset/base/321592 Log: MFC r321218: zfs: Fix a typo in the delay_min_dirty_percent sysctl description The description is FreeBSD-specific and was added in r266497 to fix PR189865. PR: 220825 Submitted by: Fabian Keil Obtained from: ElectroBSD Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Wed Jul 26 23:03:21 2017 (r321591) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Wed Jul 26 23:05:25 2017 (r321592) @@ -166,7 +166,7 @@ static int sysctl_zfs_delay_min_dirty_percent(SYSCTL_H SYSCTL_PROC(_vfs_zfs, OID_AUTO, delay_min_dirty_percent, CTLTYPE_INT | CTLFLAG_MPSAFE | CTLFLAG_RW, 0, sizeof(int), sysctl_zfs_delay_min_dirty_percent, "I", - "The limit of outstanding dirty data before transations are delayed"); + "The limit of outstanding dirty data before transactions are delayed"); static int sysctl_zfs_delay_scale(SYSCTL_HANDLER_ARGS); /* No zfs_delay_scale tunable due to limit requirements */ From owner-svn-src-stable-10@freebsd.org Thu Jul 27 00:04:10 2017 Return-Path: Delivered-To: svn-src-stable-10@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 EDFECDB444E; Thu, 27 Jul 2017 00:04:10 +0000 (UTC) (envelope-from rmacklem@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 C3232816A5; Thu, 27 Jul 2017 00:04:10 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6R049Fg061625; Thu, 27 Jul 2017 00:04:09 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6R049ee061624; Thu, 27 Jul 2017 00:04:09 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201707270004.v6R049ee061624@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Thu, 27 Jul 2017 00:04:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r321597 - stable/10/usr.sbin/nfsd X-SVN-Group: stable-10 X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: stable/10/usr.sbin/nfsd X-SVN-Commit-Revision: 321597 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Jul 2017 00:04:11 -0000 Author: rmacklem Date: Thu Jul 27 00:04:09 2017 New Revision: 321597 URL: https://svnweb.freebsd.org/changeset/base/321597 Log: MFC: r321248 Update the nfsv4 man page to reflect recent changes to support the newer RFCs (5661 and 7530). The main man changes are for the case of "numbers in strings" for user/groups that RFC7530 allows and avoids use of nfsuserd(8). This is a content change. Modified: stable/10/usr.sbin/nfsd/nfsv4.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/nfsd/nfsv4.4 ============================================================================== --- stable/10/usr.sbin/nfsd/nfsv4.4 Wed Jul 26 23:23:33 2017 (r321596) +++ stable/10/usr.sbin/nfsd/nfsv4.4 Thu Jul 27 00:04:09 2017 (r321597) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 1, 2013 +.Dd July 19, 2017 .Dt NFSV4 4 .Os .Sh NAME @@ -34,7 +34,8 @@ The NFS client and server provides support for the .Tn NFSv4 specification; see -.%T "Network File System (NFS) Version 4 Protocol RFC 3530" . +.%T "Network File System (NFS) Version 4 Protocol RFC 7530" and +.%T "Network File System (NFS) Version 4 Minor Version 1 Protocol RFC 5661" . The protocol is somewhat similar to NFS Version 3, but differs in significant ways. It uses a single compound RPC that concatenates operations to-gether. @@ -74,6 +75,7 @@ It provides several optional features not present in N - Referrals, which redirect subtrees to other servers (not yet implemented) - Delegations, which allow a client to operate on a file locally +- pNFS, where I/O operations are separated from Metadata operations .Ed .Pp The @@ -115,8 +117,8 @@ multiple server file systems, although not all clients this. .Pp .Nm -uses names for users and groups instead of numbers. -On the wire, they +uses strings for users and groups instead of numbers. +On the wire, these strings can either have the numbers in the string or take the form: .sp .Bd -literal -offset indent -compact @@ -136,15 +138,37 @@ Under FreeBSD, the mapping daemon is called .Xr nfsuserd 8 and has a command line option that overrides the domain component of the machine's hostname. -For use of +For use of this form of string on .Nm , either client or server, this daemon must be running. -If this ``'' is not set correctly or the daemon is not running, ``ls -l'' will typically +.Pp +The form where the numbers are in the strings can only be used for AUTH_SYS. +To configure your systems this way, the +.Xr nfsuserd 8 +daemon does not need to be running on the server, but the following sysctls need to be +set to 1 on the server. +.sp +.Bd -literal -offset indent -compact +vfs.nfs.enable_uidtostring +vfs.nfsd.enable_stringtouid +.Ed +.sp +On the client, the sysctl +.sp +.Bd -literal -offset indent -compact +vfs.nfs.enable_uidtostring +.Ed +.sp +must be set to 1 and the +.Xr nfsuserd 8 +daemon does not need to be running. +.Pp +If these strings are not configured correctly, ``ls -l'' will typically report a lot of ``nobody'' and ``nogroup'' ownerships. .Pp Although uid/gid numbers are no longer used in the .Nm -protocol, they will still be in the RPC authentication fields when +protocol except optionally in the above strings, they will still be in the RPC authentication fields when using AUTH_SYS (sec=sys), which is the default. As such, in this case both the user/group name and number spaces must be consistent between the client and server. @@ -156,24 +180,24 @@ will go on the wire. .Sh SERVER SETUP To set up the NFS server that supports .Nm , -you will need to either set the variables in +you will need to set the variables in .Xr rc.conf 5 as follows: .sp .Bd -literal -offset indent -compact nfs_server_enable="YES" nfsv4_server_enable="YES" +.Ed +.sp +plus +.sp +.Bd -literal -offset indent -compact nfsuserd_enable="YES" .Ed .sp -or start -.Xr mountd 8 -and -.Xr nfsd 8 -without the ``-o'' option, which would force use of the old server. -The -.Xr nfsuserd 8 -daemon must also be running. +if the server is using the ``@'' form of user/group strings or +is using the ``-manage-gids'' option for +.Xr nfsuserd 8 . .Pp You will also need to add at least one ``V4:'' line to the .Xr exports 5 @@ -232,7 +256,7 @@ plus set ``tcp'' and .Pp The .Xr nfsuserd 8 -must be running, as above. +must be running if name<->uid/gid mapping is being used, as above. Also, since an .Nm mount uses the host uuid to identify the client uniquely to the server, @@ -255,7 +279,7 @@ daemon to handle client side callbacks. This will occur if .sp .Bd -literal -offset indent -compact -nfsuserd_enable="YES" +nfsuserd_enable="YES" <-- If name<->uid/gid mapping is being used. nfscbd_enable="YES" .Ed .sp @@ -265,7 +289,7 @@ are set in Without a functioning callback path, a server will never issue Delegations to a client. .sp -By default, the callback address will be set to the IP address acquired via +For NFSv4.0, by default, the callback address will be set to the IP address acquired via rtalloc() in the kernel and port# 7745. To override the default port#, a command line option for .Xr nfscbd 8 @@ -281,6 +305,10 @@ N.N.N.N.N.N .sp where the first 4 Ns are the host IP address and the last two are the port# in network byte order (all decimal #s in the range 0-255). +.Pp +For NFSv4.1, the callback path (called a backchannel) uses the same TCP connection as the mount, +so none of the above applies and should work through gateways without +any issues. .Pp To build a kernel with the client that supports .Nm From owner-svn-src-stable-10@freebsd.org Thu Jul 27 23:15:26 2017 Return-Path: Delivered-To: svn-src-stable-10@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 02806DB3431; Thu, 27 Jul 2017 23:15:26 +0000 (UTC) (envelope-from rmacklem@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 C5816691D5; Thu, 27 Jul 2017 23:15:25 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6RNFP8h033565; Thu, 27 Jul 2017 23:15:25 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6RNFPic033564; Thu, 27 Jul 2017 23:15:25 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201707272315.v6RNFPic033564@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Thu, 27 Jul 2017 23:15:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r321634 - stable/10/sys/fs/nfsclient X-SVN-Group: stable-10 X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: stable/10/sys/fs/nfsclient X-SVN-Commit-Revision: 321634 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Jul 2017 23:15:26 -0000 Author: rmacklem Date: Thu Jul 27 23:15:24 2017 New Revision: 321634 URL: https://svnweb.freebsd.org/changeset/base/321634 Log: MFC: r321314 r320062 introduced a bug when doing NFSv4.1 mounts against some non-FreeBSD servers. r320062 used nm_rsize, nm_wsize to set the maximum request/response sizes for the NFSv4.1 session. If rsize,wsize are not specified as options, the value of nm_rsize, nm_wsize is 0 at session creation, resulting in values for request/response that are too small. This patch fixes the problem. A workaround is to specify rsize=N,wsize=N mount options explicitly, so they are set before session creation. This bug only affects NFSv4.1 mounts against some non-FreeBSD servers. Modified: stable/10/sys/fs/nfsclient/nfs_clrpcops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- stable/10/sys/fs/nfsclient/nfs_clrpcops.c Thu Jul 27 23:14:17 2017 (r321633) +++ stable/10/sys/fs/nfsclient/nfs_clrpcops.c Thu Jul 27 23:15:24 2017 (r321634) @@ -4616,6 +4616,11 @@ nfsrpc_createsession(struct nfsmount *nmp, struct nfsc struct nfsrv_descript *nd = &nfsd; int error, irdcnt; + /* Make sure nm_rsize, nm_wsize is set. */ + if (nmp->nm_rsize > NFS_MAXBSIZE || nmp->nm_rsize == 0) + nmp->nm_rsize = NFS_MAXBSIZE; + if (nmp->nm_wsize > NFS_MAXBSIZE || nmp->nm_wsize == 0) + nmp->nm_wsize = NFS_MAXBSIZE; nfscl_reqstart(nd, NFSPROC_CREATESESSION, nmp, NULL, 0, NULL, NULL); NFSM_BUILD(tl, uint32_t *, 4 * NFSX_UNSIGNED); *tl++ = sep->nfsess_clientid.lval[0]; From owner-svn-src-stable-10@freebsd.org Fri Jul 28 03:24:58 2017 Return-Path: Delivered-To: svn-src-stable-10@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 64F57DBC4F6; Fri, 28 Jul 2017 03:24:58 +0000 (UTC) (envelope-from ngie@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 32863710DF; Fri, 28 Jul 2017 03:24:58 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6S3OvLR037828; Fri, 28 Jul 2017 03:24:57 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6S3OvRD037827; Fri, 28 Jul 2017 03:24:57 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707280324.v6S3OvRD037827@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 28 Jul 2017 03:24:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r321641 - stable/10/tests/sys/vfs X-SVN-Group: stable-10 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/10/tests/sys/vfs X-SVN-Commit-Revision: 321641 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Jul 2017 03:24:58 -0000 Author: ngie Date: Fri Jul 28 03:24:57 2017 New Revision: 321641 URL: https://svnweb.freebsd.org/changeset/base/321641 Log: MFC r320445: Don't hardcode path to file in /tmp; this violates the kyua sandbox Modified: stable/10/tests/sys/vfs/trailing_slash.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/tests/sys/vfs/trailing_slash.sh ============================================================================== --- stable/10/tests/sys/vfs/trailing_slash.sh Fri Jul 28 03:18:18 2017 (r321640) +++ stable/10/tests/sys/vfs/trailing_slash.sh Fri Jul 28 03:24:57 2017 (r321641) @@ -6,8 +6,9 @@ # point to files. See kern/21768 for details. Fixed in r193028. # -testfile="/tmp/testfile-$$" -testlink="/tmp/testlink-$$" +: ${TMPDIR=/tmp} +testfile="$TMPDIR/testfile-$$" +testlink="$TMPDIR/testlink-$$" tests=" $testfile:$testlink:$testfile:0 From owner-svn-src-stable-10@freebsd.org Fri Jul 28 03:26:06 2017 Return-Path: Delivered-To: svn-src-stable-10@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 BD459DBC623; Fri, 28 Jul 2017 03:26:06 +0000 (UTC) (envelope-from ngie@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 8CAEB71396; Fri, 28 Jul 2017 03:26:06 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6S3Q5d4038050; Fri, 28 Jul 2017 03:26:05 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6S3Q5U9038049; Fri, 28 Jul 2017 03:26:05 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707280326.v6S3Q5U9038049@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 28 Jul 2017 03:26:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r321644 - stable/10/tests/sys/vfs X-SVN-Group: stable-10 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/10/tests/sys/vfs X-SVN-Commit-Revision: 321644 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Jul 2017 03:26:06 -0000 Author: ngie Date: Fri Jul 28 03:26:05 2017 New Revision: 321644 URL: https://svnweb.freebsd.org/changeset/base/321644 Log: MFC r320446: trailing_slash is a TAP-compliant testcase; mark it as such, instead of calling is a plain testcase. Modified: stable/10/tests/sys/vfs/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/tests/sys/vfs/Makefile ============================================================================== --- stable/10/tests/sys/vfs/Makefile Fri Jul 28 03:25:58 2017 (r321643) +++ stable/10/tests/sys/vfs/Makefile Fri Jul 28 03:26:05 2017 (r321644) @@ -2,6 +2,6 @@ TESTSDIR= ${TESTSBASE}/sys/vfs -PLAIN_TESTS_SH+= trailing_slash +TAP_TESTS_SH+= trailing_slash .include From owner-svn-src-stable-10@freebsd.org Fri Jul 28 03:30:47 2017 Return-Path: Delivered-To: svn-src-stable-10@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 9A689DBC873; Fri, 28 Jul 2017 03:30:47 +0000 (UTC) (envelope-from ngie@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 7359171722; Fri, 28 Jul 2017 03:30:47 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6S3Ukjj038367; Fri, 28 Jul 2017 03:30:46 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6S3Uk3P038364; Fri, 28 Jul 2017 03:30:46 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707280330.v6S3Uk3P038364@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 28 Jul 2017 03:30:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r321646 - in stable/10: etc/mtree share/examples/tests/tests share/examples/tests/tests/tap X-SVN-Group: stable-10 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: in stable/10: etc/mtree share/examples/tests/tests share/examples/tests/tests/tap X-SVN-Commit-Revision: 321646 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Jul 2017 03:30:47 -0000 Author: ngie Date: Fri Jul 28 03:30:46 2017 New Revision: 321646 URL: https://svnweb.freebsd.org/changeset/base/321646 Log: MFC r320443,r320444: r320443: Add kyua TAP test integration examples The examples are patterned loosely after the ATF examples, similar to the plain test examples. r320444: Commit the corresponding mtree file change for the TAP test examples MFC with: r320443 Added: stable/10/share/examples/tests/tests/tap/ - copied from r320443, head/share/examples/tests/tests/tap/ Modified: stable/10/etc/mtree/BSD.tests.dist stable/10/share/examples/tests/tests/Makefile stable/10/share/examples/tests/tests/tap/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/mtree/BSD.tests.dist ============================================================================== --- stable/10/etc/mtree/BSD.tests.dist Fri Jul 28 03:27:41 2017 (r321645) +++ stable/10/etc/mtree/BSD.tests.dist Fri Jul 28 03:30:46 2017 (r321646) @@ -370,6 +370,8 @@ .. plain .. + tap + .. .. .. .. Modified: stable/10/share/examples/tests/tests/Makefile ============================================================================== --- stable/10/share/examples/tests/tests/Makefile Fri Jul 28 03:27:41 2017 (r321645) +++ stable/10/share/examples/tests/tests/Makefile Fri Jul 28 03:30:46 2017 (r321646) @@ -17,6 +17,7 @@ TESTSDIR= ${TESTSBASE}/share/examples/tests # of the system. We use TESTS_SUBDIRS instead of SUBDIR because we want # the auto-generated Kyuafile to recurse into these directories. TESTS_SUBDIRS= atf plain +TESTS_SUBDIRS+= tap # We leave KYUAFILE unset so that bsd.test.mk auto-generates a Kyuafile # for us based on the contents of the TESTS_SUBDIRS line above. The Modified: stable/10/share/examples/tests/tests/tap/Makefile ============================================================================== --- head/share/examples/tests/tests/tap/Makefile Wed Jun 28 08:22:04 2017 (r320443) +++ stable/10/share/examples/tests/tests/tap/Makefile Fri Jul 28 03:30:46 2017 (r321646) @@ -1,11 +1,5 @@ # $FreeBSD$ -# The release package to use for the tests contained within the directory -# -# This applies to components which rely on ^/projects/release-pkg support -# (see UPDATING XXXXXXXXX / svn revision r298107). -PACKAGE= tests - # Directory into which the Kyuafile provided by this directory will be # installed. # @@ -31,17 +25,10 @@ TAP_TESTS_SH= cp_test # definitions from above. KYUAFILE= yes -# Install file1 and file2 as files via bsd.prog.mk. Please note the intentional -# ${PACKAGE} namespace of files. -# -# The basic semantics of this are the same as FILES in bsd.prog.mk, e.g. the -# installation of the files can be manipulated via ${PACKAGE}FILESDIR, -# ${PACKAGE}FILESMODE, etc. -# -# Please see comment above about ${PACKAGE}. Feel free to omit the ${PACKAGE} -# namespace if release package support isn't needed. -${PACKAGE}FILES+= file1 -CLEANFILES+= file1 +# Install file1 and file2 as files via bsd.prog.mk. +FILES+= file1 +FILESDIR= ${TESTSDIR} +CLEANFILES+= file1 file1: @echo "File 1" > ${.TARGET} From owner-svn-src-stable-10@freebsd.org Fri Jul 28 03:33:10 2017 Return-Path: Delivered-To: svn-src-stable-10@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 4F653DBC969; Fri, 28 Jul 2017 03:33:10 +0000 (UTC) (envelope-from ngie@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 14C7371B93; Fri, 28 Jul 2017 03:33:10 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6S3X9sP042331; Fri, 28 Jul 2017 03:33:09 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6S3X9DG042330; Fri, 28 Jul 2017 03:33:09 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201707280333.v6S3X9DG042330@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 28 Jul 2017 03:33:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r321648 - stable/10/share/examples/tests/tests X-SVN-Group: stable-10 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/10/share/examples/tests/tests X-SVN-Commit-Revision: 321648 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Jul 2017 03:33:10 -0000 Author: ngie Date: Fri Jul 28 03:33:09 2017 New Revision: 321648 URL: https://svnweb.freebsd.org/changeset/base/321648 Log: MFC r320441: share/examples/tests/Makefile: clean up example snippets/documentation - TESTSDIR doesn't need to be specified after r289158. - Including bsd.own.mk isn't required since no MK_ knobs are being manipulated. - TESTS_SUBDIRS should be written out in an append format, one entry per line, to provide a better, more conflict resistant example. Modified: stable/10/share/examples/tests/tests/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/share/examples/tests/tests/Makefile ============================================================================== --- stable/10/share/examples/tests/tests/Makefile Fri Jul 28 03:32:36 2017 (r321647) +++ stable/10/share/examples/tests/tests/Makefile Fri Jul 28 03:33:09 2017 (r321648) @@ -1,7 +1,5 @@ # $FreeBSD$ -.include - # Directory into which the Kyuafile provided by this directory will be # installed. # @@ -11,12 +9,16 @@ # # For example: if this Makefile were in src/bin/cp/tests/, its TESTSDIR # would point at ${TESTSBASE}/bin/cp/. -TESTSDIR= ${TESTSBASE}/share/examples/tests +# +# The default path specified by bsd.test.mk is `${TESTSBASE}/${RELDIR:H}`, +# which happens to be the same as `${TESTSBASE}/share/examples/tests`. +#TESTSDIR= ${TESTSBASE}/share/examples/tests # List of subdirectories into which we want to recurse during the build # of the system. We use TESTS_SUBDIRS instead of SUBDIR because we want # the auto-generated Kyuafile to recurse into these directories. -TESTS_SUBDIRS= atf plain +TESTS_SUBDIRS+= atf +TESTS_SUBDIRS+= plain TESTS_SUBDIRS+= tap # We leave KYUAFILE unset so that bsd.test.mk auto-generates a Kyuafile From owner-svn-src-stable-10@freebsd.org Fri Jul 28 18:35:30 2017 Return-Path: Delivered-To: svn-src-stable-10@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 C5FE6DCBEFC; Fri, 28 Jul 2017 18:35:30 +0000 (UTC) (envelope-from dim@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 946586BAF5; Fri, 28 Jul 2017 18:35:30 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6SIZTQU010138; Fri, 28 Jul 2017 18:35:29 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6SIZTOn010137; Fri, 28 Jul 2017 18:35:29 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201707281835.v6SIZTOn010137@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 28 Jul 2017 18:35:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r321660 - in stable: 10/sys/boot/efi/boot1 11/sys/boot/efi/boot1 X-SVN-Group: stable-10 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 10/sys/boot/efi/boot1 11/sys/boot/efi/boot1 X-SVN-Commit-Revision: 321660 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Jul 2017 18:35:30 -0000 Author: dim Date: Fri Jul 28 18:35:29 2017 New Revision: 321660 URL: https://svnweb.freebsd.org/changeset/base/321660 Log: MFC r321305: Fix printf format warning in zfs_module.c Clang 5.0.0 got better warnings about print format strings using %zd, and this leads to the following -Werror warning on e.g. arm: sys/boot/efi/boot1/zfs_module.c:186:18: error: format specifies type 'ssize_t' (aka 'int') but the argument has type 'off_t' (aka 'long long') [-Werror,-Wformat] "(%lu)\n", st.st_size, spa->spa_name, filepath, EFI_ERROR_CODE(status)); ^~~~~~~~~~ Fix this by casting off_t arguments to intmax_t, and using %jd instead. Reviewed by: tsoome Differential Revision: https://reviews.freebsd.org/D11678 Modified: stable/10/sys/boot/efi/boot1/zfs_module.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/boot/efi/boot1/zfs_module.c Directory Properties: stable/11/ (props changed) Modified: stable/10/sys/boot/efi/boot1/zfs_module.c ============================================================================== --- stable/10/sys/boot/efi/boot1/zfs_module.c Fri Jul 28 18:27:30 2017 (r321659) +++ stable/10/sys/boot/efi/boot1/zfs_module.c Fri Jul 28 18:35:29 2017 (r321660) @@ -135,8 +135,8 @@ load(const char *filepath, dev_info_t *devinfo, void * if ((status = bs->AllocatePool(EfiLoaderData, (UINTN)st.st_size, &buf)) != EFI_SUCCESS) { - printf("Failed to allocate load buffer %zd for pool '%s' for '%s' " - "(%lu)\n", st.st_size, spa->spa_name, filepath, EFI_ERROR_CODE(status)); + printf("Failed to allocate load buffer %jd for pool '%s' for '%s' " + "(%lu)\n", (intmax_t)st.st_size, spa->spa_name, filepath, EFI_ERROR_CODE(status)); return (EFI_INVALID_PARAMETER); } From owner-svn-src-stable-10@freebsd.org Sat Jul 29 08:24:52 2017 Return-Path: Delivered-To: svn-src-stable-10@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 A2A47DBDE7A; Sat, 29 Jul 2017 08:24:52 +0000 (UTC) (envelope-from kib@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 7DDFE639FB; Sat, 29 Jul 2017 08:24:52 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6T8Op0q049350; Sat, 29 Jul 2017 08:24:51 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6T8Op79049349; Sat, 29 Jul 2017 08:24:51 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201707290824.v6T8Op79049349@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 29 Jul 2017 08:24:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r321677 - stable/10/sys/vm X-SVN-Group: stable-10 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/10/sys/vm X-SVN-Commit-Revision: 321677 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Jul 2017 08:24:52 -0000 Author: kib Date: Sat Jul 29 08:24:51 2017 New Revision: 321677 URL: https://svnweb.freebsd.org/changeset/base/321677 Log: MFC r321371: Do not allocate struct kinfo_vmobject on stack. Modified: stable/10/sys/vm/vm_object.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vm_object.c ============================================================================== --- stable/10/sys/vm/vm_object.c Sat Jul 29 07:59:28 2017 (r321676) +++ stable/10/sys/vm/vm_object.c Sat Jul 29 08:24:51 2017 (r321677) @@ -2279,7 +2279,7 @@ vm_object_vnode(vm_object_t object) static int sysctl_vm_object_list(SYSCTL_HANDLER_ARGS) { - struct kinfo_vmobject kvo; + struct kinfo_vmobject *kvo; char *fullpath, *freepath; struct vnode *vp; struct vattr va; @@ -2304,6 +2304,7 @@ sysctl_vm_object_list(SYSCTL_HANDLER_ARGS) count * 11 / 10)); } + kvo = malloc(sizeof(*kvo), M_TEMP, M_WAITOK); error = 0; /* @@ -2321,13 +2322,13 @@ sysctl_vm_object_list(SYSCTL_HANDLER_ARGS) continue; } mtx_unlock(&vm_object_list_mtx); - kvo.kvo_size = ptoa(obj->size); - kvo.kvo_resident = obj->resident_page_count; - kvo.kvo_ref_count = obj->ref_count; - kvo.kvo_shadow_count = obj->shadow_count; - kvo.kvo_memattr = obj->memattr; - kvo.kvo_active = 0; - kvo.kvo_inactive = 0; + kvo->kvo_size = ptoa(obj->size); + kvo->kvo_resident = obj->resident_page_count; + kvo->kvo_ref_count = obj->ref_count; + kvo->kvo_shadow_count = obj->shadow_count; + kvo->kvo_memattr = obj->memattr; + kvo->kvo_active = 0; + kvo->kvo_inactive = 0; TAILQ_FOREACH(m, &obj->memq, listq) { /* * A page may belong to the object but be @@ -2339,45 +2340,45 @@ sysctl_vm_object_list(SYSCTL_HANDLER_ARGS) * approximation of the system anyway. */ if (m->queue == PQ_ACTIVE) - kvo.kvo_active++; + kvo->kvo_active++; else if (m->queue == PQ_INACTIVE) - kvo.kvo_inactive++; + kvo->kvo_inactive++; } - kvo.kvo_vn_fileid = 0; - kvo.kvo_vn_fsid = 0; + kvo->kvo_vn_fileid = 0; + kvo->kvo_vn_fsid = 0; freepath = NULL; fullpath = ""; vp = NULL; switch (obj->type) { case OBJT_DEFAULT: - kvo.kvo_type = KVME_TYPE_DEFAULT; + kvo->kvo_type = KVME_TYPE_DEFAULT; break; case OBJT_VNODE: - kvo.kvo_type = KVME_TYPE_VNODE; + kvo->kvo_type = KVME_TYPE_VNODE; vp = obj->handle; vref(vp); break; case OBJT_SWAP: - kvo.kvo_type = KVME_TYPE_SWAP; + kvo->kvo_type = KVME_TYPE_SWAP; break; case OBJT_DEVICE: - kvo.kvo_type = KVME_TYPE_DEVICE; + kvo->kvo_type = KVME_TYPE_DEVICE; break; case OBJT_PHYS: - kvo.kvo_type = KVME_TYPE_PHYS; + kvo->kvo_type = KVME_TYPE_PHYS; break; case OBJT_DEAD: - kvo.kvo_type = KVME_TYPE_DEAD; + kvo->kvo_type = KVME_TYPE_DEAD; break; case OBJT_SG: - kvo.kvo_type = KVME_TYPE_SG; + kvo->kvo_type = KVME_TYPE_SG; break; case OBJT_MGTDEVICE: - kvo.kvo_type = KVME_TYPE_MGTDEVICE; + kvo->kvo_type = KVME_TYPE_MGTDEVICE; break; default: - kvo.kvo_type = KVME_TYPE_UNKNOWN; + kvo->kvo_type = KVME_TYPE_UNKNOWN; break; } VM_OBJECT_RUNLOCK(obj); @@ -2385,27 +2386,28 @@ sysctl_vm_object_list(SYSCTL_HANDLER_ARGS) vn_fullpath(curthread, vp, &fullpath, &freepath); vn_lock(vp, LK_SHARED | LK_RETRY); if (VOP_GETATTR(vp, &va, curthread->td_ucred) == 0) { - kvo.kvo_vn_fileid = va.va_fileid; - kvo.kvo_vn_fsid = va.va_fsid; + kvo->kvo_vn_fileid = va.va_fileid; + kvo->kvo_vn_fsid = va.va_fsid; } vput(vp); } - strlcpy(kvo.kvo_path, fullpath, sizeof(kvo.kvo_path)); + strlcpy(kvo->kvo_path, fullpath, sizeof(kvo->kvo_path)); if (freepath != NULL) free(freepath, M_TEMP); /* Pack record size down */ - kvo.kvo_structsize = offsetof(struct kinfo_vmobject, kvo_path) + - strlen(kvo.kvo_path) + 1; - kvo.kvo_structsize = roundup(kvo.kvo_structsize, + kvo->kvo_structsize = offsetof(struct kinfo_vmobject, kvo_path) + + strlen(kvo->kvo_path) + 1; + kvo->kvo_structsize = roundup(kvo->kvo_structsize, sizeof(uint64_t)); - error = SYSCTL_OUT(req, &kvo, kvo.kvo_structsize); + error = SYSCTL_OUT(req, kvo, kvo->kvo_structsize); mtx_lock(&vm_object_list_mtx); if (error) break; } mtx_unlock(&vm_object_list_mtx); + free(kvo, M_TEMP); return (error); } SYSCTL_PROC(_vm, OID_AUTO, objects, CTLTYPE_STRUCT | CTLFLAG_RW | CTLFLAG_SKIP |