From owner-svn-src-vendor@FreeBSD.ORG Tue Dec 2 07:34:08 2014 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2F7578A0; Tue, 2 Dec 2014 07:34:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 19C53E77; Tue, 2 Dec 2014 07:34:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sB27Y8lc057388; Tue, 2 Dec 2014 07:34:08 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sB27Y6hC057381; Tue, 2 Dec 2014 07:34:06 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201412020734.sB27Y6hC057381@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 2 Dec 2014 07:34:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r275397 - vendor/mdocml/dist X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Dec 2014 07:34:08 -0000 Author: bapt Date: Tue Dec 2 07:34:06 2014 New Revision: 275397 URL: https://svnweb.freebsd.org/changeset/base/275397 Log: Import CVS version of mandoc as of 20141201 Added: vendor/mdocml/dist/compat_fts.c (contents, props changed) vendor/mdocml/dist/compat_fts.h (contents, props changed) vendor/mdocml/dist/configure.local.example vendor/mdocml/dist/man.1 (contents, props changed) vendor/mdocml/dist/test-dirent-namlen.c (contents, props changed) vendor/mdocml/dist/test-fts.c (contents, props changed) vendor/mdocml/dist/test-sqlite3.c (contents, props changed) vendor/mdocml/dist/test-wchar.c (contents, props changed) Deleted: vendor/mdocml/dist/apropos.c vendor/mdocml/dist/arch.c vendor/mdocml/dist/arch.in vendor/mdocml/dist/att.in vendor/mdocml/dist/config.h.post vendor/mdocml/dist/config.h.pre vendor/mdocml/dist/preconv.1 vendor/mdocml/dist/vol.c vendor/mdocml/dist/vol.in Modified: vendor/mdocml/dist/INSTALL vendor/mdocml/dist/LICENSE vendor/mdocml/dist/Makefile vendor/mdocml/dist/Makefile.depend vendor/mdocml/dist/NEWS vendor/mdocml/dist/TODO vendor/mdocml/dist/apropos.1 vendor/mdocml/dist/att.c vendor/mdocml/dist/cgi.c vendor/mdocml/dist/chars.c vendor/mdocml/dist/chars.in vendor/mdocml/dist/compat_fgetln.c vendor/mdocml/dist/compat_getsubopt.c vendor/mdocml/dist/compat_ohash.c vendor/mdocml/dist/compat_reallocarray.c vendor/mdocml/dist/compat_sqlite3_errstr.c vendor/mdocml/dist/compat_strcasestr.c vendor/mdocml/dist/compat_strlcat.c vendor/mdocml/dist/compat_strlcpy.c vendor/mdocml/dist/compat_strsep.c vendor/mdocml/dist/configure vendor/mdocml/dist/demandoc.1 vendor/mdocml/dist/demandoc.c vendor/mdocml/dist/eqn.7 vendor/mdocml/dist/eqn.c vendor/mdocml/dist/eqn_html.c vendor/mdocml/dist/eqn_term.c vendor/mdocml/dist/example.style.css vendor/mdocml/dist/html.c vendor/mdocml/dist/html.h vendor/mdocml/dist/lib.c vendor/mdocml/dist/libman.h vendor/mdocml/dist/libmandoc.h vendor/mdocml/dist/libmdoc.h vendor/mdocml/dist/libroff.h vendor/mdocml/dist/main.c vendor/mdocml/dist/main.h vendor/mdocml/dist/makewhatis.8 vendor/mdocml/dist/man.c vendor/mdocml/dist/man.cgi.8 vendor/mdocml/dist/man.h vendor/mdocml/dist/man_hash.c vendor/mdocml/dist/man_html.c vendor/mdocml/dist/man_macro.c vendor/mdocml/dist/man_term.c vendor/mdocml/dist/man_validate.c vendor/mdocml/dist/mandoc.1 vendor/mdocml/dist/mandoc.3 vendor/mdocml/dist/mandoc.c vendor/mdocml/dist/mandoc.db.5 vendor/mdocml/dist/mandoc.h vendor/mdocml/dist/mandoc_aux.c vendor/mdocml/dist/mandoc_escape.3 vendor/mdocml/dist/mandocdb.c vendor/mdocml/dist/manpage.c vendor/mdocml/dist/manpath.c vendor/mdocml/dist/mansearch.c vendor/mdocml/dist/mansearch.h vendor/mdocml/dist/mansearch_const.c vendor/mdocml/dist/mchars_alloc.3 vendor/mdocml/dist/mdoc.7 vendor/mdocml/dist/mdoc.c vendor/mdocml/dist/mdoc_argv.c vendor/mdocml/dist/mdoc_hash.c vendor/mdocml/dist/mdoc_html.c vendor/mdocml/dist/mdoc_macro.c vendor/mdocml/dist/mdoc_man.c vendor/mdocml/dist/mdoc_term.c vendor/mdocml/dist/mdoc_validate.c vendor/mdocml/dist/msec.c vendor/mdocml/dist/msec.in vendor/mdocml/dist/out.c vendor/mdocml/dist/out.h vendor/mdocml/dist/preconv.c vendor/mdocml/dist/read.c vendor/mdocml/dist/roff.7 vendor/mdocml/dist/roff.c vendor/mdocml/dist/st.c vendor/mdocml/dist/st.in vendor/mdocml/dist/style.css vendor/mdocml/dist/tbl.7 vendor/mdocml/dist/tbl.c vendor/mdocml/dist/tbl_data.c vendor/mdocml/dist/tbl_html.c vendor/mdocml/dist/tbl_layout.c vendor/mdocml/dist/tbl_opts.c vendor/mdocml/dist/tbl_term.c vendor/mdocml/dist/term.c vendor/mdocml/dist/term.h vendor/mdocml/dist/term_ascii.c vendor/mdocml/dist/term_ps.c vendor/mdocml/dist/test-getsubopt.c vendor/mdocml/dist/tree.c Modified: vendor/mdocml/dist/INSTALL ============================================================================== --- vendor/mdocml/dist/INSTALL Tue Dec 2 06:24:45 2014 (r275396) +++ vendor/mdocml/dist/INSTALL Tue Dec 2 07:34:06 2014 (r275397) @@ -1,4 +1,4 @@ -$Id: INSTALL,v 1.2 2014/08/10 17:22:26 schwarze Exp $ +$Id: INSTALL,v 1.5 2014/08/18 13:27:47 kristaps Exp $ About mdocml, the portable mandoc distribution ---------------------------------------------- @@ -34,19 +34,52 @@ latest bundled and ported versions of ma systems is maintained at . If mandoc is installed, you can check the version by running "mandoc -V". -The version contained in this distribution tarball is listed near -the beginning of the file "Makefile". +You can find the version contained in this distribution tarball +by running "./configure". Regarding how packages and ports are maintained for your operating system, please consult your operating system documentation. To install mandoc manually, the following steps are needed: -1. Decide whether you want to build the base tools mandoc(1), -preconv(1) and demandoc(1) only or whether you also want to build the -database tools apropos(1) and makewhatis(8). For the latter, -the following dependencies are required: +1. If you want to build the CGI program, man.cgi(8), too, run the +command "echo BUILD_CGI=1 > configure.local". Then run "cp +cgi.h.examples cgi.h" and edit cgi.h as desired. + +2. Run "./configure". +This script attempts autoconfiguration of mandoc for your system. +Read both its standard output and the file "Makefile.local" it +generates. If anything looks wrong or different from what you +wish, read the file "configure.local.example", create and edit +a file "configure.local", and re-run "./configure" until the +result seems right to you. + +3. Run "make". +Any POSIX-compatible make, in particular both BSD make and GNU make, +should work. If the build fails, look at "configure.local.example" +and go back to step 2. + +4. Run "make -n install" and check whether everything will be +installed to the intended places. Otherwise, put some *DIR variables +into "configure.local" and go back to step 2. -1.1. The SQLite database system, see . +5. Run "sudo make install". If you intend to build a binary +package using some kind of fake root mechanism, you may need a +command like "make DESTDIR=... install". Read the *-install targets +in the "Makefile" to understand how DESTDIR is used. + +6. To set up a man.cgi(8) server, read its manual page. + +7. To use mandoc(1) as your man(1) formatter, read the "Deployment" +section below. + + +Understanding mandoc dependencies +--------------------------------- +The mandoc(1), preconv(1), and demandoc(1) utilities have no external +dependencies. However, makewhatis(8) and apropos(1) depend on the +following software: + +1. The SQLite database system, see . The recommended version of SQLite is 3.8.4.3 or newer. The mandoc toolset is known to work with version 3.7.5 or newer. Versions older than 3.8.3 may not achieve full performance due to the @@ -57,47 +90,16 @@ problems, apropos(1) is fully usable wit older than 3.7.5 may or may not work, they have not been tested. 1.2. The fts(3) directory traversion functions. -A compatibility version will be bundled for 1.13.2 but is not available -yet. If you want apropos(1) and makewhatis(8) but do not have fts(3), -please stay with mandoc 1.12.3 for now and upgrade first to 1.12.4, -then to 1.13.2 when these versionns are released. Be careful: the +If your system does not have them, the bundled compatibility version +will be used, so you need not worry in that case. But be careful: the glibc version of fts(3) is known to be broken on 32bit platforms, see . +If you run into that problem, set "HAVE_FTS=0" in configure.local. 1.3. Marc Espie's ohash(3) library. If your system does not have it, the bundled compatibility version will be used, so you probably need not worry about it. -2. If you choose to build the database tools, too, decide whether -you also want to build the CGI program, man.cgi(8). - -3. Read the beginning of the file "Makefile" from "USER SETTINGS" -to "END OF USER SETTINGS" and edit it as required. In particular, -disable "BUILD_TARGETS += db-build" if you do not want database -support or enable "BUILD_TARGETS += cgi-build" if you do want -the CGI program. - -4. Run "make". No separate "./configure" or "make depend" steps -are needed. The former is run automatically by "make". The latter -is a maintainer target. If you merely want to build the released -version as opposed to doing active development, there is no need -to regenerate the dependency specifications. Any POSIX-compatible -make, in particular both BSD make and GNU make, should work. - -5. Run "make -n install" and check whether everything will be -installed to the intended places. Otherwise, edit the *DIR variables -in the Makefile until it is. - -6. Run "sudo make install". If you intend to build a binary -package using some kind of fake root mechanism, you may need a -command like "make DESTDIR=... install". Read the *-install targets -in the "Makefile" to understand how DESTDIR is used. - -7. To set up a man.cgi(8) server, read its manual page. - -8. To use mandoc(1) as your man(1) formatter, read the "Deployment" -section below. - Checking autoconfiguration quality ---------------------------------- @@ -130,9 +132,9 @@ please report whatever is missing on you The following steps can be used to manually check the automatic configuration on your platform: -1. Run "make clean". +1. Run "make distclean". -2. Run "make config.h" +2. Run "./configure" 3. Read the file "config.log". It shows the compiler commands used to test the libraries installed on your system and the standard @@ -140,8 +142,7 @@ output and standard error output these c for unexpected failures. Those are most likely to happen if headers or libraries are installed in unusual places or interfaces defined in unusual headers. You can also look at the file "config.h" and -check that no expected "#define HAVE_*" lines are missing. The -list of tests run can be found in the file "configure". +check that no "#define HAVE_*" differ from your expectations. Deployment Modified: vendor/mdocml/dist/LICENSE ============================================================================== --- vendor/mdocml/dist/LICENSE Tue Dec 2 06:24:45 2014 (r275396) +++ vendor/mdocml/dist/LICENSE Tue Dec 2 07:34:06 2014 (r275397) @@ -1,4 +1,4 @@ -$Id: LICENSE,v 1.2 2014/04/23 21:06:41 schwarze Exp $ +$Id: LICENSE,v 1.4 2014/08/21 00:42:38 schwarze Exp $ With the exceptions noted below, all code and documentation contained in the mdocml toolkit is protected by the Copyright @@ -37,8 +37,10 @@ The following files included from outsid other people's Copyright and are distributed under a 3-clause BSD license; see these individual files for details. -compat_getsubopt.c, compat_strcasestr.c, compat_strsep.c: -Copyright (c) 1990, 1993 The Regents of the University of California +compat_fts.c, compat_fts.h, +compat_getsubopt.c, compat_strcasestr.c, compat_strsep.c, +man.1: +Copyright (c) 1989,1990,1993,1994 The Regents of the University of California compat_fgetln.c: Copyright (c) 1998 The NetBSD Foundation, Inc. Modified: vendor/mdocml/dist/Makefile ============================================================================== --- vendor/mdocml/dist/Makefile Tue Dec 2 06:24:45 2014 (r275396) +++ vendor/mdocml/dist/Makefile Tue Dec 2 07:34:06 2014 (r275397) @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.435 2014/08/10 02:45:04 schwarze Exp $ +# $Id: Makefile,v 1.448 2014/11/28 18:57:31 schwarze Exp $ # # Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons # Copyright (c) 2011, 2013, 2014 Ingo Schwarze @@ -15,126 +15,31 @@ # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -VERSION = 1.13.1 - -# === USER SETTINGS ==================================================== - -# --- user settings relevant for all builds ---------------------------- - -# Specify this if you want to hard-code the operating system to appear -# in the lower-left hand corner of -mdoc manuals. -# -# CFLAGS += -DOSNAME="\"OpenBSD 5.5\"" - -# IFF your system supports multi-byte functions (setlocale(), wcwidth(), -# putwchar()) AND has __STDC_ISO_10646__ (that is, wchar_t is simply a -# UCS-4 value) should you define USE_WCHAR. If you define it and your -# system DOESN'T support this, -Tlocale will produce garbage. -# If you don't define it, -Tlocale is a synonym for -Tacsii. -# -CFLAGS += -DUSE_WCHAR - -CFLAGS += -g -DHAVE_CONFIG_H -CFLAGS += -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Wwrite-strings -PREFIX = /usr/local -BINDIR = $(PREFIX)/bin -INCLUDEDIR = $(PREFIX)/include/mandoc -LIBDIR = $(PREFIX)/lib/mandoc -MANDIR = $(PREFIX)/man -EXAMPLEDIR = $(PREFIX)/share/examples/mandoc - -INSTALL = install -INSTALL_PROGRAM = $(INSTALL) -m 0555 -INSTALL_DATA = $(INSTALL) -m 0444 -INSTALL_LIB = $(INSTALL) -m 0444 -INSTALL_SOURCE = $(INSTALL) -m 0644 -INSTALL_MAN = $(INSTALL_DATA) - -# --- user settings related to database support ------------------------ - -# Building apropos(1) and makewhatis(8) requires both SQLite3 and fts(3). -# To avoid those dependencies, comment the following line. -# Be careful: the fts(3) implementation in glibc is broken on 32bit -# machines, see: https://sourceware.org/bugzilla/show_bug.cgi?id=15838 -# -BUILD_TARGETS += db-build - -# The remaining settings in this section -# are only relevant if db-build is enabled. -# Otherwise, they have no effect either way. - -# If your system has manpath(1), uncomment this. This is most any -# system that's not OpenBSD or NetBSD. If uncommented, apropos(1) -# and makewhatis(8) will use manpath(1) to get the MANPATH variable. -# -#CFLAGS += -DUSE_MANPATH - -# On some systems, SQLite3 may be installed below /usr/local. -# In that case, uncomment the following two lines. -# -#CFLAGS += -I/usr/local/include -#DBLIB += -L/usr/local/lib - -# OpenBSD has the ohash functions in libutil. -# Comment the following line if your system doesn't. -# -DBLIB += -lutil - -SBINDIR = $(PREFIX)/sbin - -# --- user settings related to man.cgi --------------------------------- - -# To build man.cgi, copy cgi.h.example to cgi.h, edit it, -# and enable the following line. -# Obviously, this requires that db-build is enabled, too. -# -#BUILD_TARGETS += cgi-build - -# The remaining settings in this section -# are only relevant if cgi-build is enabled. -# Otherwise, they have no effect either way. - -# If your system does not support static binaries, comment this, -# for example on Mac OS X. -# -STATIC = -static - -# Linux requires -pthread for statical linking. -# -#STATIC += -pthread - -WWWPREFIX = /var/www -HTDOCDIR = $(WWWPREFIX)/htdocs -CGIBINDIR = $(WWWPREFIX)/cgi-bin - -# === END OF USER SETTINGS ============================================= - -INSTALL_TARGETS = $(BUILD_TARGETS:-build=-install) - -BASEBIN = mandoc preconv demandoc -DBBIN = apropos makewhatis +BASEBIN = mandoc demandoc +DBBIN = makewhatis CGIBIN = man.cgi -DBLIB += -lsqlite3 - -TESTSRCS = test-fgetln.c \ +TESTSRCS = test-dirent-namlen.c \ + test-fgetln.c \ + test-fts.c \ test-getsubopt.c \ test-mmap.c \ test-ohash.c \ test-reallocarray.c \ + test-sqlite3.c \ test-sqlite3_errstr.c \ test-strcasestr.c \ test-strlcat.c \ test-strlcpy.c \ test-strptime.c \ - test-strsep.c + test-strsep.c \ + test-wchar.c -SRCS = apropos.c \ - arch.c \ - att.c \ +SRCS = att.c \ cgi.c \ chars.c \ compat_fgetln.c \ + compat_fts.c \ compat_getsubopt.c \ compat_ohash.c \ compat_reallocarray.c \ @@ -187,7 +92,6 @@ SRCS = apropos.c \ term_ascii.c \ term_ps.c \ tree.c \ - vol.c \ $(TESTSRCS) DISTFILES = INSTALL \ @@ -197,14 +101,12 @@ DISTFILES = INSTALL \ NEWS \ TODO \ apropos.1 \ - arch.in \ - att.in \ cgi.h.example \ chars.in \ + compat_fts.h \ compat_ohash.h \ - config.h.post \ - config.h.pre \ configure \ + configure.local.example \ demandoc.1 \ eqn.7 \ example.style.css \ @@ -218,6 +120,7 @@ DISTFILES = INSTALL \ main.h \ makewhatis.8 \ man-cgi.css \ + man.1 \ man.7 \ man.cgi.8 \ man.h \ @@ -238,7 +141,6 @@ DISTFILES = INSTALL \ mdoc.h \ msec.in \ out.h \ - preconv.1 \ predefs.in \ roff.7 \ st.in \ @@ -246,7 +148,6 @@ DISTFILES = INSTALL \ tbl.3 \ tbl.7 \ term.h \ - vol.in \ $(SRCS) LIBMAN_OBJS = man.o \ @@ -254,16 +155,14 @@ LIBMAN_OBJS = man.o \ man_macro.o \ man_validate.o -LIBMDOC_OBJS = arch.o \ - att.o \ +LIBMDOC_OBJS = att.o \ lib.o \ mdoc.o \ mdoc_argv.o \ mdoc_hash.o \ mdoc_macro.o \ mdoc_validate.o \ - st.o \ - vol.o + st.o LIBROFF_OBJS = eqn.o \ roff.o \ @@ -279,9 +178,11 @@ LIBMANDOC_OBJS = $(LIBMAN_OBJS) \ mandoc.o \ mandoc_aux.o \ msec.o \ + preconv.o \ read.o COMPAT_OBJS = compat_fgetln.o \ + compat_fts.o \ compat_getsubopt.o \ compat_ohash.o \ compat_reallocarray.o \ @@ -314,11 +215,11 @@ MANDOC_OBJS = $(MANDOC_HTML_OBJS) \ out.o \ tree.o -MAKEWHATIS_OBJS = mandocdb.o mansearch_const.o manpath.o +MAN_OBJS = $(MANDOC_OBJS) -PRECONV_OBJS = preconv.o +MAKEWHATIS_OBJS = mandocdb.o mansearch_const.o manpath.o -APROPOS_OBJS = apropos.o mansearch.o mansearch_const.o manpath.o +APROPOS_OBJS = mansearch.o mansearch_const.o manpath.o CGI_OBJS = $(MANDOC_HTML_OBJS) \ cgi.o \ @@ -332,8 +233,8 @@ DEMANDOC_OBJS = demandoc.o WWW_MANS = apropos.1.html \ demandoc.1.html \ + man.1.html \ mandoc.1.html \ - preconv.1.html \ mandoc.3.html \ mandoc_escape.3.html \ mandoc_html.3.html \ @@ -360,9 +261,13 @@ WWW_MANS = apropos.1.html \ WWW_OBJS = mdocml.tar.gz \ mdocml.sha256 +include Makefile.local + +INSTALL_TARGETS = $(BUILD_TARGETS:-build=-install) + # === DEPENDENCY HANDLING ============================================== -all: base-build $(BUILD_TARGETS) +all: base-build $(BUILD_TARGETS) Makefile.local base-build: $(BASEBIN) @@ -374,20 +279,22 @@ install: base-install $(INSTALL_TARGETS) www: $(WWW_OBJS) $(WWW_MANS) +$(WWW_MANS): mandoc + include Makefile.depend # === TARGETS CONTAINING SHELL COMMANDS ================================ +distclean: clean + rm -f Makefile.local config.h config.h.old config.log config.log.old + clean: - rm -f libmandoc.a $(LIBMANDOC_OBJS) - rm -f apropos $(APROPOS_OBJS) + rm -f libmandoc.a $(LIBMANDOC_OBJS) $(COMPAT_OBJS) + rm -f mandoc $(MANDOC_OBJS) $(APROPOS_OBJS) rm -f makewhatis $(MAKEWHATIS_OBJS) - rm -f preconv $(PRECONV_OBJS) rm -f man.cgi $(CGI_OBJS) rm -f manpage $(MANPAGE_OBJS) rm -f demandoc $(DEMANDOC_OBJS) - rm -f mandoc $(MANDOC_OBJS) - rm -f config.h config.log $(COMPAT_OBJS) rm -f $(WWW_MANS) $(WWW_OBJS) rm -rf *.dSYM @@ -403,7 +310,8 @@ base-install: base-build $(INSTALL_LIB) libmandoc.a $(DESTDIR)$(LIBDIR) $(INSTALL_LIB) man.h mandoc.h mandoc_aux.h mdoc.h \ $(DESTDIR)$(INCLUDEDIR) - $(INSTALL_MAN) mandoc.1 preconv.1 demandoc.1 $(DESTDIR)$(MANDIR)/man1 + $(INSTALL_MAN) man.1 mandoc.1 demandoc.1 \ + $(DESTDIR)$(MANDIR)/man1 $(INSTALL_MAN) mandoc.3 mandoc_escape.3 mandoc_malloc.3 \ mchars_alloc.3 tbl.3 $(DESTDIR)$(MANDIR)/man3 $(INSTALL_MAN) man.7 mdoc.7 roff.7 eqn.7 tbl.7 mandoc_char.7 \ @@ -417,8 +325,8 @@ db-install: db-build mkdir -p $(DESTDIR)$(MANDIR)/man3 mkdir -p $(DESTDIR)$(MANDIR)/man5 mkdir -p $(DESTDIR)$(MANDIR)/man8 - $(INSTALL_PROGRAM) apropos $(DESTDIR)$(BINDIR) - ln -f $(DESTDIR)$(BINDIR)/apropos $(DESTDIR)$(BINDIR)/whatis + ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/apropos + ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/whatis $(INSTALL_PROGRAM) makewhatis $(DESTDIR)$(SBINDIR) $(INSTALL_MAN) apropos.1 $(DESTDIR)$(MANDIR)/man1 ln -f $(DESTDIR)$(MANDIR)/man1/apropos.1 \ @@ -447,30 +355,29 @@ www-install: www $(INSTALL_DATA) mdocml.sha256 \ $(DESTDIR)$(HTDOCDIR)/snapshots/mdocml-$(VERSION).sha256 +Makefile.local config.h: configure ${TESTSRCS} + @echo "$@ is out of date; please run ./configure" + @exit 1 + depend: config.h mkdep -f Makefile.depend $(CFLAGS) $(SRCS) perl -e 'undef $$/; $$_ = <>; s|/usr/include/\S+||g; \ - s|\\\n||g; s| +| |g; print;' Makefile.depend > Makefile.tmp + s|\\\n||g; s| +| |g; s| $$||mg; print;' \ + Makefile.depend > Makefile.tmp mv Makefile.tmp Makefile.depend libmandoc.a: $(COMPAT_OBJS) $(LIBMANDOC_OBJS) $(AR) rs $@ $(COMPAT_OBJS) $(LIBMANDOC_OBJS) -mandoc: $(MANDOC_OBJS) libmandoc.a - $(CC) $(LDFLAGS) -o $@ $(MANDOC_OBJS) libmandoc.a +mandoc: $(MAN_OBJS) libmandoc.a + $(CC) $(LDFLAGS) -o $@ $(MAN_OBJS) libmandoc.a $(DBLIB) makewhatis: $(MAKEWHATIS_OBJS) libmandoc.a $(CC) $(LDFLAGS) -o $@ $(MAKEWHATIS_OBJS) libmandoc.a $(DBLIB) -preconv: $(PRECONV_OBJS) - $(CC) $(LDFLAGS) -o $@ $(PRECONV_OBJS) - manpage: $(MANPAGE_OBJS) libmandoc.a $(CC) $(LDFLAGS) -o $@ $(MANPAGE_OBJS) libmandoc.a $(DBLIB) -apropos: $(APROPOS_OBJS) libmandoc.a - $(CC) $(LDFLAGS) -o $@ $(APROPOS_OBJS) libmandoc.a $(DBLIB) - man.cgi: $(CGI_OBJS) libmandoc.a $(CC) $(LDFLAGS) $(STATIC) -o $@ $(CGI_OBJS) libmandoc.a $(DBLIB) @@ -482,18 +389,13 @@ mdocml.sha256: mdocml.tar.gz mdocml.tar.gz: $(DISTFILES) mkdir -p .dist/mdocml-$(VERSION)/ - $(INSTALL_SOURCE) $(DISTFILES) .dist/mdocml-$(VERSION) + $(INSTALL) -m 0644 $(DISTFILES) .dist/mdocml-$(VERSION) chmod 755 .dist/mdocml-$(VERSION)/configure ( cd .dist/ && tar zcf ../$@ mdocml-$(VERSION) ) rm -rf .dist/ -config.h: configure config.h.pre config.h.post $(TESTSRCS) - rm -f config.log - CC="$(CC)" CFLAGS="$(CFLAGS)" DBLIB="$(DBLIB)" \ - VERSION="$(VERSION)" ./configure - .PHONY: base-install cgi-install db-install install www-install -.PHONY: clean depend +.PHONY: clean distclean depend .SUFFIXES: .1 .3 .5 .7 .8 .h .SUFFIXES: .1.html .3.html .5.html .7.html .8.html .h.html Modified: vendor/mdocml/dist/Makefile.depend ============================================================================== --- vendor/mdocml/dist/Makefile.depend Tue Dec 2 06:24:45 2014 (r275396) +++ vendor/mdocml/dist/Makefile.depend Tue Dec 2 07:34:06 2014 (r275397) @@ -1,24 +1,23 @@ -apropos.o: apropos.c config.h manpath.h mansearch.h -arch.o: arch.c config.h mdoc.h libmdoc.h arch.in -att.o: att.c config.h mdoc.h libmdoc.h att.in +att.o: att.c config.h mdoc.h libmdoc.h cgi.o: cgi.c config.h mandoc.h mandoc_aux.h main.h manpath.h mansearch.h cgi.h chars.o: chars.c config.h mandoc.h mandoc_aux.h libmandoc.h chars.in -compat_fgetln.o: compat_fgetln.c config.h -compat_getsubopt.o: compat_getsubopt.c config.h -compat_ohash.o: compat_ohash.c config.h -compat_reallocarray.o: compat_reallocarray.c config.h -compat_sqlite3_errstr.o: compat_sqlite3_errstr.c config.h -compat_strcasestr.o: compat_strcasestr.c config.h -compat_strlcat.o: compat_strlcat.c config.h -compat_strlcpy.o: compat_strlcpy.c config.h -compat_strsep.o: compat_strsep.c config.h +compat_fgetln.o: compat_fgetln.c config.h +compat_fts.o: compat_fts.c config.h compat_fts.h +compat_getsubopt.o: compat_getsubopt.c config.h +compat_ohash.o: compat_ohash.c config.h compat_ohash.h +compat_reallocarray.o: compat_reallocarray.c config.h +compat_sqlite3_errstr.o: compat_sqlite3_errstr.c config.h +compat_strcasestr.o: compat_strcasestr.c config.h +compat_strlcat.o: compat_strlcat.c config.h +compat_strlcpy.o: compat_strlcpy.c config.h +compat_strsep.o: compat_strsep.c config.h demandoc.o: demandoc.c config.h man.h mdoc.h mandoc.h eqn.o: eqn.c config.h mandoc.h mandoc_aux.h libmandoc.h libroff.h eqn_html.o: eqn_html.c config.h mandoc.h out.h html.h eqn_term.o: eqn_term.c config.h mandoc.h out.h term.h html.o: html.c config.h mandoc.h mandoc_aux.h libmandoc.h out.h html.h main.h lib.o: lib.c config.h mdoc.h libmdoc.h lib.in -main.o: main.c config.h mandoc.h mandoc_aux.h main.h mdoc.h man.h +main.o: main.c config.h mandoc.h mandoc_aux.h main.h mdoc.h man.h manpath.h mansearch.h man.o: man.c config.h man.h mandoc.h mandoc_aux.h libman.h libmandoc.h man_hash.o: man_hash.c config.h man.h mandoc.h libman.h man_html.o: man_html.c config.h mandoc.h mandoc_aux.h out.h html.h man.h main.h @@ -27,10 +26,10 @@ man_term.o: man_term.c config.h mandoc.h man_validate.o: man_validate.c config.h man.h mandoc.h mandoc_aux.h libman.h libmandoc.h mandoc.o: mandoc.c config.h mandoc.h mandoc_aux.h libmandoc.h mandoc_aux.o: mandoc_aux.c config.h mandoc.h mandoc_aux.h -mandocdb.o: mandocdb.c config.h mdoc.h man.h mandoc.h mandoc_aux.h manpath.h mansearch.h +mandocdb.o: mandocdb.c config.h compat_fts.h compat_ohash.h mdoc.h man.h mandoc.h mandoc_aux.h manpath.h mansearch.h manpage.o: manpage.c config.h manpath.h mansearch.h manpath.o: manpath.c config.h mandoc_aux.h manpath.h -mansearch.o: mansearch.c config.h mandoc.h mandoc_aux.h manpath.h mansearch.h +mansearch.o: mansearch.c config.h compat_ohash.h mandoc.h mandoc_aux.h manpath.h mansearch.h mansearch_const.o: mansearch_const.c config.h manpath.h mansearch.h mdoc.o: mdoc.c config.h mdoc.h mandoc.h mandoc_aux.h libmdoc.h libmandoc.h mdoc_argv.o: mdoc_argv.c config.h mdoc.h mandoc.h mandoc_aux.h libmdoc.h libmandoc.h @@ -42,9 +41,9 @@ mdoc_term.o: mdoc_term.c config.h mandoc mdoc_validate.o: mdoc_validate.c config.h mdoc.h mandoc.h mandoc_aux.h libmdoc.h libmandoc.h msec.o: msec.c config.h mandoc.h libmandoc.h msec.in out.o: out.c config.h mandoc_aux.h mandoc.h out.h -preconv.o: preconv.c config.h +preconv.o: preconv.c config.h mandoc.h libmandoc.h read.o: read.c config.h mandoc.h mandoc_aux.h libmandoc.h mdoc.h man.h main.h -roff.o: roff.c config.h mandoc.h mandoc_aux.h libroff.h libmandoc.h predefs.in +roff.o: roff.c config.h mandoc.h mandoc_aux.h libmandoc.h libroff.h predefs.in st.o: st.c config.h mdoc.h libmdoc.h st.in tbl.o: tbl.c config.h mandoc.h mandoc_aux.h libmandoc.h libroff.h tbl_data.o: tbl_data.c config.h mandoc.h mandoc_aux.h libmandoc.h libroff.h @@ -56,15 +55,18 @@ term.o: term.c config.h mandoc.h mandoc_ term_ascii.o: term_ascii.c config.h mandoc.h mandoc_aux.h out.h term.h main.h term_ps.o: term_ps.c config.h mandoc.h mandoc_aux.h out.h main.h term.h tree.o: tree.c config.h mandoc.h mdoc.h man.h main.h -vol.o: vol.c config.h mdoc.h libmdoc.h vol.in -test-fgetln.o: test-fgetln.c -test-getsubopt.o: test-getsubopt.c -test-mmap.o: test-mmap.c -test-ohash.o: test-ohash.c -test-reallocarray.o: test-reallocarray.c -test-sqlite3_errstr.o: test-sqlite3_errstr.c -test-strcasestr.o: test-strcasestr.c -test-strlcat.o: test-strlcat.c -test-strlcpy.o: test-strlcpy.c -test-strptime.o: test-strptime.c -test-strsep.o: test-strsep.c +test-dirent-namlen.o: test-dirent-namlen.c +test-fgetln.o: test-fgetln.c +test-fts.o: test-fts.c +test-getsubopt.o: test-getsubopt.c +test-mmap.o: test-mmap.c +test-ohash.o: test-ohash.c +test-reallocarray.o: test-reallocarray.c +test-sqlite3.o: test-sqlite3.c +test-sqlite3_errstr.o: test-sqlite3_errstr.c +test-strcasestr.o: test-strcasestr.c +test-strlcat.o: test-strlcat.c +test-strlcpy.o: test-strlcpy.c +test-strptime.o: test-strptime.c +test-strsep.o: test-strsep.c +test-wchar.o: test-wchar.c Modified: vendor/mdocml/dist/NEWS ============================================================================== --- vendor/mdocml/dist/NEWS Tue Dec 2 06:24:45 2014 (r275396) +++ vendor/mdocml/dist/NEWS Tue Dec 2 07:34:06 2014 (r275397) @@ -1,4 +1,4 @@ -$Id: NEWS,v 1.5 2014/08/10 16:32:57 schwarze Exp $ +$Id: NEWS,v 1.6 2014/08/11 01:39:00 schwarze Exp $ This file lists the most important changes in the mdocml.bsd.lv distribution. @@ -7,9 +7,6 @@ Changes in version 1.13.1, released on A --- MAJOR NEW FEATURES --- * A complete apropos(1)/makewhatis(8)/man.cgi(8) suite based on SQLite3 is now included. - CAVEAT: This also requires a working fts(3) implementation. - If your system lacks that *and* you want apropos(1)/makewhatis(8), - stay with 1.12.3 for now, then go to 1.12.4 and 1.13.2. * The roff(7) parser now provides an almost complete implementation of numerical expressions. * Warning and error messages have been improved in many ways. Modified: vendor/mdocml/dist/TODO ============================================================================== --- vendor/mdocml/dist/TODO Tue Dec 2 06:24:45 2014 (r275396) +++ vendor/mdocml/dist/TODO Tue Dec 2 07:34:06 2014 (r275397) @@ -1,8 +1,37 @@ ************************************************************************ * Official mandoc TODO. -* $Id: TODO,v 1.176 2014/08/09 14:24:53 schwarze Exp $ +* $Id: TODO,v 1.189 2014/11/26 21:40:17 schwarze Exp $ ************************************************************************ +Many issues are annotated for difficulty as follows: + + - loc = locality of the issue + * single file issue, affects file only, or very few + ** single module issue, affects several files of one module + *** cross-module issue, significantly impacts multiple modules + and may require substantial changes to internal interfaces + - exist = difficulty of the existing code in this area + * affected code is straightforward and easy to read and change + ** affected code is somewhat complex, but once you understand + the design, not particularly difficult to understand + *** affected code uses a special, exceptionally tricky design + - algo = difficulty of the new algorithm to be written + * the required logic and code is straightforward + ** the required logic is somewhat complex and needs a careful design + *** the required logic is exceptionally tricky, + maybe an approach to solve that is not even known yet + - size = the amount of code to be written or changed + * a small number of lines (at most 100, usually much less) + ** a considerable amount of code (several dozen to a few hundred) + *** a large amount of code (many hundreds, maybe thousands) + - imp = importance of the issue + * mostly for completeness + ** would be nice to have + *** issue causes considerable inconvenience + +Obviously, as the issues have not been solved yet, these annotations +are mere guesses, and some may be wrong. + ************************************************************************ * crashes ************************************************************************ @@ -10,6 +39,7 @@ - The abort() in bufcat(), html.c, can be triggered via buffmt_includes() by running -Thtml -Oincludes on a file containing a long .In argument. Fixing this will probably require reworking the whole bufcat() concept. + loc ** exist * algo * size ** imp ** ************************************************************************ * missing features @@ -25,49 +55,62 @@ .na -- temporarily disable adjustment without changing the mode .ad -- re-enable adjustment without changing the mode Adjustment mode is ignored while in no-fill mode (.nf). + loc *** exist *** algo ** size ** imp ** (parser reorg would help) - .fc (field control) found by naddy@ in xloadimage(1) + loc ** exist *** algo * size * imp * - .nr third argument (auto-increment step size, requires \n+) found by bentley@ in sbcl(1) Mon, 9 Dec 2013 18:36:57 -0700 + loc * exist * algo * size * imp ** - .ns (no-space mode) occurs in xine-config(1) reported by brad@ Sat, 15 Jan 2011 15:45:23 -0500 + loc *** exist *** algo *** size ** imp * - .ta (tab settings) occurs in ircbug(1) and probably gnats(1) reported by brad@ Sat, 15 Jan 2011 15:50:51 -0500 also Tcl_NewStringObj(3) via wiz@ Wed, 5 Mar 2014 22:27:43 +0100 + loc ** exist *** algo ** size ** imp ** - .ti (temporary indent) found by naddy@ in xloadimage(1) found by bentley@ in nmh(1) Mon, 23 Apr 2012 13:38:28 -0600 + loc ** exist ** algo ** size * imp ** (parser reorg helps a lot) - .while and .shift found by jca@ in ratpoison(1) Sun, 30 Jun 2013 12:01:09 +0200 + loc * exist ** algo ** size ** imp ** - \c (interrupted text) should prevent the line break even inside .Bd literal; that occurs in chat(8) also found in cclive(1) - DocBook output + loc ** exist *** algo ** size * imp * - \h horizontal move found in cclive(1) DocBook output Anthony J. Bentley on discuss@ Sat, 21 Sep 2013 22:29:34 -0600 + loc ** exist ** algo ** size * imp ** (parser reorg helps a lot) - \n+ and \n- numerical register increment and decrement found by bentley@ in sbcl(1) Mon, 9 Dec 2013 18:36:57 -0700 + loc * exist * algo * size * imp ** -- \w'' width measurements +- \w'' improve width measurements would not be very useful without an expression parser, see below needed for Tcl_NewStringObj(3) via wiz@ Wed, 5 Mar 2014 22:27:43 +0100 + loc ** exist *** algo *** size * imp *** - using undefined strings or macros defines them to be empty wl@ Mon, 14 Nov 2011 14:37:01 +0000 + loc * exist * algo * size * imp * --- missing mdoc features ---------------------------------------------- - fix bad block nesting involving multiple identical explicit blocks see the OpenBSD mdoc_macro.c 1.47 commit message + loc * exist *** algo *** size * imp ** - .Bl -column .Xo support is missing ultimate goal: @@ -75,10 +118,12 @@ lib/libc/compat-43/sigvec.3 lib/libc/gen/signal.3 lib/libc/sys/sigaction.2 + loc * exist *** algo *** size * imp ** - edge case: decide how to deal with blk_full bad nesting, e.g. .Sh .Nm .Bk .Nm .Ek .Sh found by jmc@ in ssh-keygen(1) from jmc@ Wed, 14 Jul 2010 18:10:32 +0100 + loc * exist *** algo *** size ** imp ** - \\ is now implemented correctly * when defining strings and macros using .ds and .de @@ -92,18 +137,22 @@ we don't have either. Besides, groff has bug causing text right *before* .Bd -centered to be centered as well. + loc *** exist *** algo ** size ** imp ** (parser reorg would help) - .Bd -filled should not be the same as .Bd -ragged, but align both the left and right margin. In groff, it is implemented in terms of .ad b, which we don't have either. Found in cksum(1). + loc *** exist *** algo ** size ** imp ** (parser reorg would help) - implement blank `Bl -column', such as .Bl -column .It foo Ta bar .El + loc * exist *** algo *** size * imp * - explicitly disallow nested `Bl -column', which would clobber internal flags defined for struct mdoc_macro + loc * exist * algo * size * imp ** - In .Bl -column .It, the end of the line probably has to be regarded as an implicit .Ta, if there could be one, see the following mildly @@ -114,6 +163,7 @@ Default search path. reported by Michal Mazurek via jmc@ Thu, 7 Apr 2011 16:00:53 +0059 + loc * exist *** algo ** size * imp ** - inside `.Bl -column' phrases, punctuation is handled like normal text, e.g. `.Bl -column .It Fl x . Ta ...' should give "-x -." @@ -123,11 +173,14 @@ but should give "ab ." - set a meaningful default if no `Bl' list type is assigned + loc * exist * algo * size * imp ** (already done?) - have a blank `It' head for `Bl -tag' not puke + loc * exist * algo * size * imp ** (already done?) - check whether it is correct that `D1' uses INDENT+1; does it need its own constant? + loc * exist ** algo ** size * imp ** - prohibit `Nm' from having non-text HEAD children (e.g., NetBSD mDNSShared/dns-sd.1) @@ -138,6 +191,7 @@ that one uses NOMBRE because it is spanish... deraadt tends to think that section-dependent macro behaviour is a bad idea in the first place, so this may be irrelevant + loc ** exist ** algo ** size * imp ** - When there is free text in the SYNOPSIS and that free text contains the .Nm macro, groff somehow understands to treat the .Nm as an in-line @@ -146,6 +200,7 @@ should be, needs investigation. uqs@ Thu, 2 Jun 2011 11:03:51 +0200 uqs@ Thu, 2 Jun 2011 11:33:35 +0200 + loc * exist ** algo *** size * imp ** --- missing man features ----------------------------------------------- @@ -155,18 +210,36 @@ - look at the POSIX manuals in the books/man-pages-posix port, they use some unsupported tbl(7) features. + loc * exist ** algo ** size ** imp *** -- investigate tbl(1) errors in sox(1) - see also naddy@ Sat, 16 Oct 2010 23:51:57 +0200 +- use Unicode U+2500 to U+256C for table borders + in tbl(7) -Tutf-8 output + suggested by bentley@ Tue, 14 Oct 2014 04:10:55 -0600 + loc * exist ** algo * size * imp ** - allow standalone `.' to be interpreted as an end-of-layout delimiter instead of being thrown away as a no-op roff line reported by Yuri Pankov, Wed 18 May 2011 11:34:59 CEST + loc ** exist ** algo ** size * imp ** + +--- missing eqn features ----------------------------------------------- + +- The "size" keyword is parsed, but ignored by the formatter. + loc * exist * algo * size * imp * + +- The spacing characters `~', `^', and tab are currently ignored, + see User's Guide (Second Edition) page 2 section 4. + loc * exist * algo ** size * imp ** + +- Mark and lineup are parsed and ignored, + see User's Guide (Second Edition) page 5 section 15. + loc ** exist ** algo ** size ** imp ** --- missing misc features ---------------------------------------------- - italic correction (\/) in PostScript mode Werner LEMBERG on groff at gnu dot org Sun, 10 Nov 2013 12:47:46 + loc ** exist ** algo * size * imp * - When makewhatis(8) encounters a FATAL parse error, it silently treats the file as formatted, which makes no sense @@ -174,13 +247,16 @@ what the manual says at the end of the description. The end result will be ENOENT for file names returned by mansearch() in manpage.file. + loc * exist * algo * size * imp ** - makewhatis(8) for preformatted pages: parse the section number from the header line and compare to the section number from the directory name + loc * exist * algo * size * imp ** - Does makewhatis(8) detect missing NAME sections, missing names, and missing descriptions in all the file formats? + loc * exist * algo * size * imp *** - clean up escape sequence handling, creating three classes: (1) fully implemented, or parsed and ignored without loss of content @@ -188,8 +264,10 @@ or serious mangling of formatting (e.g. \n) -> ERROR see textproc/mgdiff(1) for nice examples (3) undefined, just output the character -> perhaps WARNING + loc *** exist ** algo ** size ** imp *** (parser reorg helps) - kettenis wants base roff, ms, and me Fri, 1 Jan 2010 22:13:15 +0100 (CET) + loc ** exist ** algo ** size *** imp * --- compatibility checks ----------------------------------------------- @@ -199,6 +277,10 @@ - compare output to Heirloom roff, Solaris roff, and http://repo.or.cz/w/neatroff.git http://litcave.rudi.ir/ +- look at AT&T DWB http://www2.research.att.com/sw/download + Carsten Kunze has patches + Mon, 4 Aug 2014 17:01:28 +0200 + - look at pages generated from reStructeredText, e.g. devel/mercurial hg(1) These are a weird mixture of man(7) and custom autogenerated low-level roff stuff. Figure out to what extent we can cope. @@ -224,6 +306,11 @@ - check compatibility with the man(7) formatter https://raw.githubusercontent.com/rofl0r/hardcore-utils/master/man.c +- check compatibility with + http://ikiwiki.info/plugins/contrib/mandoc/ + https://github.com/schmonz/ikiwiki/compare/mandoc + Amitai Schlair Mon, 19 May 2014 14:05:53 -0400 + ************************************************************************ * formatting issues: ugly output ************************************************************************ @@ -236,10 +323,12 @@ ought to render "Key Length" with emphasis, too, see OpenBSD iked.conf(5). reported again Nicolas Joly via wiz@ Wed, 12 Oct 2011 00:20:00 +0200 + loc * exist *** algo *** size ** imp *** - empty phrases in .Bl column produce too few blanks try e.g. .Bl -column It Ta Ta reported by millert Fri, 02 Apr 2010 16:13:46 -0400 + loc * exist *** algo *** size * imp ** - .%T can have trailing punctuation. Currently, it puts the trailing punctuation into a trailing MDOC_TEXT element inside its own scope. @@ -249,11 +338,13 @@ slurp all arguments into one single text element - and one feature of in_line() - put trailing punctuation out of scope. Found in mount_nfs(8) and exports(5), search for "Appendix". + loc ** exist ** algo *** size * imp ** - Trailing punctuation after .%T triggers EOS spacing, at least outside .Rs (eek!). Simply setting ARGSFL_DELIM for .%T is not the right solution, it sends mandoc into an endless loop. reported by Nicolas Joly Sat, 17 Nov 2012 11:49:54 +0100 + loc * exist ** algo ** size * imp ** - global variables in the SYNOPSIS of section 3 pages .Vt vs .Vt/.Va vs .Ft/.Va vs .Ft/.Fa ... @@ -261,6 +352,7 @@ - in enclosures, mandoc sometimes fancies a bogus end of sentence reminded by jmc@ Thu, 23 Sep 2010 18:13:39 +0059 + loc * exist ** algo *** size * imp *** - formatting /usr/local/man/man1/latex2man.1 with groff and mandoc reveals lots of bugs both in groff and mandoc... @@ -273,6 +365,10 @@ Search the text "Routing tables". Also check what PostScript mode does when fixing this. reported by juanfra@ Wed, 04 Jun 2014 21:44:58 +0200 + instructions from juanfra@ Wed, 11 Jun 2014 02:21:01 +0200 + add a new <> block to the PDF files with /BaseFont /Courier + and change the /Name from /F0 to the new font (/F5 (?)). + loc * exist ** algo ** size * imp ** --- HTML issues -------------------------------------------------------- @@ -280,6 +376,20 @@ hints are easy to find on the web, e.g. http://stackoverflow.com/questions/1713048/ see also matthew@ Fri, 18 Jul 2014 19:25:12 -0700 + loc * exist * algo ** size * imp *** + +- jsg on icb, Nov 3, 2014: + try to guess Xr in man(7) for hyperlinking + +- The tables used to render the three-part page headers actually force + the width of the to the max-width given for . + Not yet sure how to fix that... + Observed by an Anonymous Coward on undeadly.org: + http://undeadly.org/cgi?action=article&sid=20140925064244&pid=1 + loc * exist * algo ** size * imp *** + +- consider whether can be used for Ar Dv Er Ev Fa Va. + from bentley@ Wed, 13 Aug 2014 09:17:55 -0600 - check https://github.com/trentm/mdocml @@ -287,42 +397,57 @@ * formatting issues: gratuitous differences ************************************************************************ +- .Fn reopens a new scope after punctuation in mandoc, + but closes its scope for good in groff. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@FreeBSD.ORG Tue Dec 2 07:36:04 2014 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8EB989E7; Tue, 2 Dec 2014 07:36:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 78678E88; Tue, 2 Dec 2014 07:36:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sB27a4r9057709; Tue, 2 Dec 2014 07:36:04 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sB27a33S057702; Tue, 2 Dec 2014 07:36:03 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201412020736.sB27a33S057702@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 2 Dec 2014 07:36:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r275398 - vendor/mdocml/20141201 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Dec 2014 07:36:04 -0000 Author: bapt Date: Tue Dec 2 07:36:02 2014 New Revision: 275398 URL: https://svnweb.freebsd.org/changeset/base/275398 Log: Tag import for mandoc cvs 20141201 Added: vendor/mdocml/20141201/ - copied from r273756, vendor/mdocml/dist/ vendor/mdocml/20141201/INSTALL - copied unchanged from r275397, vendor/mdocml/dist/INSTALL vendor/mdocml/20141201/LICENSE - copied unchanged from r275397, vendor/mdocml/dist/LICENSE vendor/mdocml/20141201/Makefile.depend - copied unchanged from r275397, vendor/mdocml/dist/Makefile.depend vendor/mdocml/20141201/cgi.h.example - copied unchanged from r274876, vendor/mdocml/dist/cgi.h.example vendor/mdocml/20141201/compat_fts.c - copied unchanged from r275397, vendor/mdocml/dist/compat_fts.c vendor/mdocml/20141201/compat_fts.h - copied unchanged from r275397, vendor/mdocml/dist/compat_fts.h vendor/mdocml/20141201/compat_ohash.c - copied unchanged from r275397, vendor/mdocml/dist/compat_ohash.c vendor/mdocml/20141201/compat_ohash.h - copied unchanged from r274876, vendor/mdocml/dist/compat_ohash.h vendor/mdocml/20141201/compat_reallocarray.c - copied unchanged from r275397, vendor/mdocml/dist/compat_reallocarray.c vendor/mdocml/20141201/compat_sqlite3_errstr.c - copied unchanged from r275397, vendor/mdocml/dist/compat_sqlite3_errstr.c vendor/mdocml/20141201/compat_strcasestr.c - copied unchanged from r275397, vendor/mdocml/dist/compat_strcasestr.c vendor/mdocml/20141201/compat_strsep.c - copied unchanged from r275397, vendor/mdocml/dist/compat_strsep.c vendor/mdocml/20141201/configure - copied unchanged from r275397, vendor/mdocml/dist/configure vendor/mdocml/20141201/configure.local.example - copied unchanged from r275397, vendor/mdocml/dist/configure.local.example vendor/mdocml/20141201/makewhatis.8 - copied unchanged from r275397, vendor/mdocml/dist/makewhatis.8 vendor/mdocml/20141201/man.1 - copied unchanged from r275397, vendor/mdocml/dist/man.1 vendor/mdocml/20141201/man.cgi.8 - copied unchanged from r275397, vendor/mdocml/dist/man.cgi.8 vendor/mdocml/20141201/mandoc.db.5 - copied unchanged from r275397, vendor/mdocml/dist/mandoc.db.5 vendor/mdocml/20141201/mandoc_aux.c - copied unchanged from r275397, vendor/mdocml/dist/mandoc_aux.c vendor/mdocml/20141201/mandoc_aux.h - copied unchanged from r274876, vendor/mdocml/dist/mandoc_aux.h vendor/mdocml/20141201/mandoc_escape.3 - copied unchanged from r275397, vendor/mdocml/dist/mandoc_escape.3 vendor/mdocml/20141201/mandoc_html.3 - copied unchanged from r274876, vendor/mdocml/dist/mandoc_html.3 vendor/mdocml/20141201/mandoc_malloc.3 - copied unchanged from r274876, vendor/mdocml/dist/mandoc_malloc.3 vendor/mdocml/20141201/manpage.c - copied unchanged from r275397, vendor/mdocml/dist/manpage.c vendor/mdocml/20141201/mansearch.3 - copied unchanged from r274876, vendor/mdocml/dist/mansearch.3 vendor/mdocml/20141201/mansearch.c - copied unchanged from r275397, vendor/mdocml/dist/mansearch.c vendor/mdocml/20141201/mansearch.h - copied unchanged from r275397, vendor/mdocml/dist/mansearch.h vendor/mdocml/20141201/mansearch_const.c - copied unchanged from r275397, vendor/mdocml/dist/mansearch_const.c vendor/mdocml/20141201/mchars_alloc.3 - copied unchanged from r275397, vendor/mdocml/dist/mchars_alloc.3 vendor/mdocml/20141201/test-dirent-namlen.c - copied unchanged from r275397, vendor/mdocml/dist/test-dirent-namlen.c vendor/mdocml/20141201/test-fts.c - copied unchanged from r275397, vendor/mdocml/dist/test-fts.c vendor/mdocml/20141201/test-ohash.c - copied unchanged from r274876, vendor/mdocml/dist/test-ohash.c vendor/mdocml/20141201/test-reallocarray.c - copied unchanged from r274876, vendor/mdocml/dist/test-reallocarray.c vendor/mdocml/20141201/test-sqlite3.c - copied unchanged from r275397, vendor/mdocml/dist/test-sqlite3.c vendor/mdocml/20141201/test-sqlite3_errstr.c - copied unchanged from r274876, vendor/mdocml/dist/test-sqlite3_errstr.c vendor/mdocml/20141201/test-strcasestr.c - copied unchanged from r274876, vendor/mdocml/dist/test-strcasestr.c vendor/mdocml/20141201/test-strsep.c - copied unchanged from r274876, vendor/mdocml/dist/test-strsep.c vendor/mdocml/20141201/test-wchar.c - copied unchanged from r275397, vendor/mdocml/dist/test-wchar.c Replaced: vendor/mdocml/20141201/Makefile - copied unchanged from r275397, vendor/mdocml/dist/Makefile vendor/mdocml/20141201/NEWS - copied unchanged from r275397, vendor/mdocml/dist/NEWS vendor/mdocml/20141201/TODO - copied unchanged from r275397, vendor/mdocml/dist/TODO vendor/mdocml/20141201/apropos.1 - copied unchanged from r275397, vendor/mdocml/dist/apropos.1 vendor/mdocml/20141201/att.c - copied unchanged from r275397, vendor/mdocml/dist/att.c vendor/mdocml/20141201/cgi.c - copied unchanged from r275397, vendor/mdocml/dist/cgi.c vendor/mdocml/20141201/chars.c - copied unchanged from r275397, vendor/mdocml/dist/chars.c vendor/mdocml/20141201/chars.in - copied unchanged from r275397, vendor/mdocml/dist/chars.in vendor/mdocml/20141201/compat_fgetln.c - copied unchanged from r275397, vendor/mdocml/dist/compat_fgetln.c vendor/mdocml/20141201/compat_getsubopt.c - copied unchanged from r275397, vendor/mdocml/dist/compat_getsubopt.c vendor/mdocml/20141201/compat_strlcat.c - copied unchanged from r275397, vendor/mdocml/dist/compat_strlcat.c vendor/mdocml/20141201/compat_strlcpy.c - copied unchanged from r275397, vendor/mdocml/dist/compat_strlcpy.c vendor/mdocml/20141201/demandoc.1 - copied unchanged from r275397, vendor/mdocml/dist/demandoc.1 vendor/mdocml/20141201/demandoc.c - copied unchanged from r275397, vendor/mdocml/dist/demandoc.c vendor/mdocml/20141201/eqn.7 - copied unchanged from r275397, vendor/mdocml/dist/eqn.7 vendor/mdocml/20141201/eqn.c - copied unchanged from r275397, vendor/mdocml/dist/eqn.c vendor/mdocml/20141201/eqn_html.c - copied unchanged from r275397, vendor/mdocml/dist/eqn_html.c vendor/mdocml/20141201/eqn_term.c - copied unchanged from r275397, vendor/mdocml/dist/eqn_term.c vendor/mdocml/20141201/example.style.css - copied unchanged from r275397, vendor/mdocml/dist/example.style.css vendor/mdocml/20141201/gmdiff - copied unchanged from r274876, vendor/mdocml/dist/gmdiff vendor/mdocml/20141201/html.c - copied unchanged from r275397, vendor/mdocml/dist/html.c vendor/mdocml/20141201/html.h - copied unchanged from r275397, vendor/mdocml/dist/html.h vendor/mdocml/20141201/lib.c - copied unchanged from r275397, vendor/mdocml/dist/lib.c vendor/mdocml/20141201/lib.in - copied unchanged from r274876, vendor/mdocml/dist/lib.in vendor/mdocml/20141201/libman.h - copied unchanged from r275397, vendor/mdocml/dist/libman.h vendor/mdocml/20141201/libmandoc.h - copied unchanged from r275397, vendor/mdocml/dist/libmandoc.h vendor/mdocml/20141201/libmdoc.h - copied unchanged from r275397, vendor/mdocml/dist/libmdoc.h vendor/mdocml/20141201/libroff.h - copied unchanged from r275397, vendor/mdocml/dist/libroff.h vendor/mdocml/20141201/main.c - copied unchanged from r275397, vendor/mdocml/dist/main.c vendor/mdocml/20141201/main.h - copied unchanged from r275397, vendor/mdocml/dist/main.h vendor/mdocml/20141201/man.7 - copied unchanged from r274876, vendor/mdocml/dist/man.7 vendor/mdocml/20141201/man.c - copied unchanged from r275397, vendor/mdocml/dist/man.c vendor/mdocml/20141201/man.h - copied unchanged from r275397, vendor/mdocml/dist/man.h vendor/mdocml/20141201/man_hash.c - copied unchanged from r275397, vendor/mdocml/dist/man_hash.c vendor/mdocml/20141201/man_html.c - copied unchanged from r275397, vendor/mdocml/dist/man_html.c vendor/mdocml/20141201/man_macro.c - copied unchanged from r275397, vendor/mdocml/dist/man_macro.c vendor/mdocml/20141201/man_term.c - copied unchanged from r275397, vendor/mdocml/dist/man_term.c vendor/mdocml/20141201/man_validate.c - copied unchanged from r275397, vendor/mdocml/dist/man_validate.c vendor/mdocml/20141201/mandoc.1 - copied unchanged from r275397, vendor/mdocml/dist/mandoc.1 vendor/mdocml/20141201/mandoc.3 - copied unchanged from r275397, vendor/mdocml/dist/mandoc.3 vendor/mdocml/20141201/mandoc.c - copied unchanged from r275397, vendor/mdocml/dist/mandoc.c vendor/mdocml/20141201/mandoc.h - copied unchanged from r275397, vendor/mdocml/dist/mandoc.h vendor/mdocml/20141201/mandocdb.c - copied unchanged from r275397, vendor/mdocml/dist/mandocdb.c vendor/mdocml/20141201/manpath.c - copied unchanged from r275397, vendor/mdocml/dist/manpath.c vendor/mdocml/20141201/mdoc.7 - copied unchanged from r275397, vendor/mdocml/dist/mdoc.7 vendor/mdocml/20141201/mdoc.c - copied unchanged from r275397, vendor/mdocml/dist/mdoc.c vendor/mdocml/20141201/mdoc.h - copied unchanged from r274876, vendor/mdocml/dist/mdoc.h vendor/mdocml/20141201/mdoc_argv.c - copied unchanged from r275397, vendor/mdocml/dist/mdoc_argv.c vendor/mdocml/20141201/mdoc_hash.c - copied unchanged from r275397, vendor/mdocml/dist/mdoc_hash.c vendor/mdocml/20141201/mdoc_html.c - copied unchanged from r275397, vendor/mdocml/dist/mdoc_html.c vendor/mdocml/20141201/mdoc_macro.c - copied unchanged from r275397, vendor/mdocml/dist/mdoc_macro.c vendor/mdocml/20141201/mdoc_man.c - copied unchanged from r275397, vendor/mdocml/dist/mdoc_man.c vendor/mdocml/20141201/mdoc_term.c - copied unchanged from r275397, vendor/mdocml/dist/mdoc_term.c vendor/mdocml/20141201/mdoc_validate.c - copied unchanged from r275397, vendor/mdocml/dist/mdoc_validate.c vendor/mdocml/20141201/msec.c - copied unchanged from r275397, vendor/mdocml/dist/msec.c vendor/mdocml/20141201/msec.in - copied unchanged from r275397, vendor/mdocml/dist/msec.in vendor/mdocml/20141201/out.c - copied unchanged from r275397, vendor/mdocml/dist/out.c vendor/mdocml/20141201/out.h - copied unchanged from r275397, vendor/mdocml/dist/out.h vendor/mdocml/20141201/preconv.c - copied unchanged from r275397, vendor/mdocml/dist/preconv.c vendor/mdocml/20141201/read.c - copied unchanged from r275397, vendor/mdocml/dist/read.c vendor/mdocml/20141201/roff.7 - copied unchanged from r275397, vendor/mdocml/dist/roff.7 vendor/mdocml/20141201/roff.c - copied unchanged from r275397, vendor/mdocml/dist/roff.c vendor/mdocml/20141201/st.c - copied unchanged from r275397, vendor/mdocml/dist/st.c vendor/mdocml/20141201/st.in - copied unchanged from r275397, vendor/mdocml/dist/st.in vendor/mdocml/20141201/style.css - copied unchanged from r275397, vendor/mdocml/dist/style.css vendor/mdocml/20141201/tbl.7 - copied unchanged from r275397, vendor/mdocml/dist/tbl.7 vendor/mdocml/20141201/tbl.c - copied unchanged from r275397, vendor/mdocml/dist/tbl.c vendor/mdocml/20141201/tbl_data.c - copied unchanged from r275397, vendor/mdocml/dist/tbl_data.c vendor/mdocml/20141201/tbl_html.c - copied unchanged from r275397, vendor/mdocml/dist/tbl_html.c vendor/mdocml/20141201/tbl_layout.c - copied unchanged from r275397, vendor/mdocml/dist/tbl_layout.c vendor/mdocml/20141201/tbl_opts.c - copied unchanged from r275397, vendor/mdocml/dist/tbl_opts.c vendor/mdocml/20141201/tbl_term.c - copied unchanged from r275397, vendor/mdocml/dist/tbl_term.c vendor/mdocml/20141201/term.c - copied unchanged from r275397, vendor/mdocml/dist/term.c vendor/mdocml/20141201/term.h - copied unchanged from r275397, vendor/mdocml/dist/term.h vendor/mdocml/20141201/term_ascii.c - copied unchanged from r275397, vendor/mdocml/dist/term_ascii.c vendor/mdocml/20141201/term_ps.c - copied unchanged from r275397, vendor/mdocml/dist/term_ps.c vendor/mdocml/20141201/test-fgetln.c - copied unchanged from r274876, vendor/mdocml/dist/test-fgetln.c vendor/mdocml/20141201/test-getsubopt.c - copied unchanged from r275397, vendor/mdocml/dist/test-getsubopt.c vendor/mdocml/20141201/test-mmap.c - copied unchanged from r274876, vendor/mdocml/dist/test-mmap.c vendor/mdocml/20141201/test-strlcat.c - copied unchanged from r274876, vendor/mdocml/dist/test-strlcat.c vendor/mdocml/20141201/test-strlcpy.c - copied unchanged from r274876, vendor/mdocml/dist/test-strlcpy.c vendor/mdocml/20141201/test-strptime.c - copied unchanged from r274876, vendor/mdocml/dist/test-strptime.c vendor/mdocml/20141201/tree.c - copied unchanged from r275397, vendor/mdocml/dist/tree.c Deleted: vendor/mdocml/20141201/apropos.c vendor/mdocml/20141201/apropos_db.c vendor/mdocml/20141201/apropos_db.h vendor/mdocml/20141201/arch.c vendor/mdocml/20141201/arch.in vendor/mdocml/20141201/att.in vendor/mdocml/20141201/catman.8 vendor/mdocml/20141201/catman.c vendor/mdocml/20141201/config.h.post vendor/mdocml/20141201/config.h.pre vendor/mdocml/20141201/external.png vendor/mdocml/20141201/index.css vendor/mdocml/20141201/index.sgml vendor/mdocml/20141201/man.cgi.7 vendor/mdocml/20141201/mandocdb.8 vendor/mdocml/20141201/mandocdb.h vendor/mdocml/20141201/preconv.1 vendor/mdocml/20141201/test-betoh64.c vendor/mdocml/20141201/vol.c vendor/mdocml/20141201/vol.in vendor/mdocml/20141201/whatis.1 Copied: vendor/mdocml/20141201/INSTALL (from r275397, vendor/mdocml/dist/INSTALL) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/mdocml/20141201/INSTALL Tue Dec 2 07:36:02 2014 (r275398, copy of r275397, vendor/mdocml/dist/INSTALL) @@ -0,0 +1,188 @@ +$Id: INSTALL,v 1.5 2014/08/18 13:27:47 kristaps Exp $ + +About mdocml, the portable mandoc distribution +---------------------------------------------- +The mandoc manpage compiler toolset is a suite of tools compiling +mdoc(7), the roff(7) macro language of choice for BSD manual pages, +and man(7), the predominant historical language for UNIX manuals. +The toolset does not yet implement man(1); that is only scheduled +for the next release, 1.13.2. It can, however, already serve to +translate source manpages to the output displayed by man(1). +For general information, see . + +In this document, we describe the installation and deployment of +mandoc(1), first as a simple, standalone formatter, and then as part of +the man(1) system. + +In case you have questions or want to provide feedback, read +. Consider subscribing to the +discuss@ mailing list mentioned on that page. If you intend to +help with the development of mandoc, consider subscribing to the +tech@ mailing list, too. + +Enjoy using the mandoc toolset! + +Ingo Schwarze, Karlsruhe, August 2014 + + +Installation +------------ +Before manually installing mandoc on your system, please check +whether the newest version of mandoc is already installed by default +or available via a binary package or a ports system. A list of the +latest bundled and ported versions of mandoc for various operating +systems is maintained at . + +If mandoc is installed, you can check the version by running "mandoc -V". +You can find the version contained in this distribution tarball +by running "./configure". + +Regarding how packages and ports are maintained for your operating +system, please consult your operating system documentation. +To install mandoc manually, the following steps are needed: + +1. If you want to build the CGI program, man.cgi(8), too, run the +command "echo BUILD_CGI=1 > configure.local". Then run "cp +cgi.h.examples cgi.h" and edit cgi.h as desired. + +2. Run "./configure". +This script attempts autoconfiguration of mandoc for your system. +Read both its standard output and the file "Makefile.local" it +generates. If anything looks wrong or different from what you +wish, read the file "configure.local.example", create and edit +a file "configure.local", and re-run "./configure" until the +result seems right to you. + +3. Run "make". +Any POSIX-compatible make, in particular both BSD make and GNU make, +should work. If the build fails, look at "configure.local.example" +and go back to step 2. + +4. Run "make -n install" and check whether everything will be +installed to the intended places. Otherwise, put some *DIR variables +into "configure.local" and go back to step 2. + +5. Run "sudo make install". If you intend to build a binary +package using some kind of fake root mechanism, you may need a +command like "make DESTDIR=... install". Read the *-install targets +in the "Makefile" to understand how DESTDIR is used. + +6. To set up a man.cgi(8) server, read its manual page. + +7. To use mandoc(1) as your man(1) formatter, read the "Deployment" +section below. + + +Understanding mandoc dependencies +--------------------------------- +The mandoc(1), preconv(1), and demandoc(1) utilities have no external +dependencies. However, makewhatis(8) and apropos(1) depend on the +following software: + +1. The SQLite database system, see . +The recommended version of SQLite is 3.8.4.3 or newer. The mandoc +toolset is known to work with version 3.7.5 or newer. Versions +older than 3.8.3 may not achieve full performance due to the +missing SQLITE_DETERMINISTIC optimization flag. Versions older +than 3.8.0 may not show full error information if opening a database +fails due to the missing sqlite3_errstr() API. Both are very minor +problems, apropos(1) is fully usable with SQLite 3.7.5. Versions +older than 3.7.5 may or may not work, they have not been tested. + +1.2. The fts(3) directory traversion functions. +If your system does not have them, the bundled compatibility version +will be used, so you need not worry in that case. But be careful: the +glibc version of fts(3) is known to be broken on 32bit platforms, +see . +If you run into that problem, set "HAVE_FTS=0" in configure.local. + +1.3. Marc Espie's ohash(3) library. +If your system does not have it, the bundled compatibility version +will be used, so you probably need not worry about it. + + +Checking autoconfiguration quality +---------------------------------- +If you want to check whether automatic configuration works well +on your platform, consider the following: + +The mandoc package intentionally does not use GNU autoconf because +we consider that toolset a blatant example of overengineering that +is obsolete nowadays, since all modern operating systems are now +reasonably close to POSIX and do not need arcane shell magic any +longer. If your system does need such magic, consider upgrading +to reasonably modern POSIX-compliant tools rather than asking for +autoconf-style workarounds. + +As far as mandoc is using any features not mandated by ANSI X3.159-1989 +("ANSI C") or IEEE Std 1003.1-2008 ("POSIX") that some modern systems +do not have, we intend to provide autoconfiguration tests and +compat_*.c implementations. Please report any that turn out to be +missing. Note that while we do strive to produce portable code, +we do not slavishly restrict ourselves to POSIX-only interfaces. +For improved security and readability, we do use well-designed, +modern interfaces like reallocarray(3) even if they are still rather +uncommon, of course bundling compat_*.c implementations as needed. + +Where mandoc is using ANSI C or POSIX features that some systems +still lack and that compat_*.c implementations can be provided for +without too much hassle, we will consider adding them, too, so +please report whatever is missing on your platform. + +The following steps can be used to manually check the automatic +configuration on your platform: + +1. Run "make distclean". + +2. Run "./configure" + +3. Read the file "config.log". It shows the compiler commands used +to test the libraries installed on your system and the standard +output and standard error output these commands produce. Watch out +for unexpected failures. Those are most likely to happen if headers +or libraries are installed in unusual places or interfaces defined +in unusual headers. You can also look at the file "config.h" and +check that no "#define HAVE_*" differ from your expectations. + + +Deployment +---------- +If you want to integrate the mandoc(1) tools with your existing +man(1) system as a formatter, then contact us first: on systems without +mandoc(1) as the default, you may have your work cut out for you! +Usually, you can have your default installation and mandoc(1) work right +alongside each other by using user-specific versions of the files +mentioned below. + +0. Back up each file you want to change! + +1. First see whether your system has "/etc/man.conf" or "/etc/manpath.conf" +(if it has neither, but man(1) is functional, then let us know) or, +if running as your own user, a per-user override file. In either +case, find where man(1) is executing nroff(1) or groff(1) to format +manuals. Replace these calls with mandoc(1). + +2. Then make sure that man(1) isn't running preprocessors, so you may +need to replace tbl(1), eqn(1), and similar references with cat(1). +Some man(1) implementations, like that on Mac OSX, let you run "man -d" +to see how the formatter is invoked. Use this to test your changes. On +Mac OS X, for instance, man(1) will prepend all files with ".ll" and +".nr" to set the terminal size, so you need to pass "tail -n+2 | +mandoc(1)" to disregard them. + +3. Finally, make sure that mandoc(1) is actually being invoked instead +of cached pages being pulled up. You can usually do this by commenting +out NOCACHE or similar. + +mandoc(1) still has a long way to go in understanding non-trivial +low-level roff(7) markup embedded in some man(7) pages. On the BSD +systems using mandoc(1), third-party software is generally vetted +on whether it may be formatted with mandoc(1). If not, groff(1) +is pulled in as a dependency and used to install a pre-formatted +"catpage" intead of directly as manual page source. + +For more background on switching operating systems to use mandoc(1) +instead of groff(1) to format manuals, see the two BSDCan presentations +by Ingo Schwarze: + + Copied: vendor/mdocml/20141201/LICENSE (from r275397, vendor/mdocml/dist/LICENSE) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/mdocml/20141201/LICENSE Tue Dec 2 07:36:02 2014 (r275398, copy of r275397, vendor/mdocml/dist/LICENSE) @@ -0,0 +1,46 @@ +$Id: LICENSE,v 1.4 2014/08/21 00:42:38 schwarze Exp $ + +With the exceptions noted below, all code and documentation +contained in the mdocml toolkit is protected by the Copyright +of the following developers: + +Copyright (c) 2008, 2009, 2010, 2011, 2012 Kristaps Dzonsons +Copyright (c) 2010, 2011, 2012, 2013, 2014 Ingo Schwarze +Copyright (c) 2009, 2010, 2011, 2012 Joerg Sonnenberger +Copyright (c) 2013 Franco Fichtner +Copyright (c) 1999, 2004 Marc Espie +Copyright (c) 1998, 2010 Todd C. Miller +Copyright (c) 2008 Otto Moerbeek +Copyright (c) 2003 Jason McIntyre + +See the individual source files for information about who contributed +to which file during which years. + + +The mdocml distribution as a whole is distributed by its developers +under the following license: + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +The following files included from outside sources are protected by +other people's Copyright and are distributed under a 3-clause BSD +license; see these individual files for details. + +compat_fts.c, compat_fts.h, +compat_getsubopt.c, compat_strcasestr.c, compat_strsep.c, +man.1: +Copyright (c) 1989,1990,1993,1994 The Regents of the University of California + +compat_fgetln.c: +Copyright (c) 1998 The NetBSD Foundation, Inc. Copied: vendor/mdocml/20141201/Makefile (from r275397, vendor/mdocml/dist/Makefile) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/mdocml/20141201/Makefile Tue Dec 2 07:36:02 2014 (r275398, copy of r275397, vendor/mdocml/dist/Makefile) @@ -0,0 +1,407 @@ +# $Id: Makefile,v 1.448 2014/11/28 18:57:31 schwarze Exp $ +# +# Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons +# Copyright (c) 2011, 2013, 2014 Ingo Schwarze +# +# Permission to use, copy, modify, and distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +BASEBIN = mandoc demandoc +DBBIN = makewhatis +CGIBIN = man.cgi + +TESTSRCS = test-dirent-namlen.c \ + test-fgetln.c \ + test-fts.c \ + test-getsubopt.c \ + test-mmap.c \ + test-ohash.c \ + test-reallocarray.c \ + test-sqlite3.c \ + test-sqlite3_errstr.c \ + test-strcasestr.c \ + test-strlcat.c \ + test-strlcpy.c \ + test-strptime.c \ + test-strsep.c \ + test-wchar.c + +SRCS = att.c \ + cgi.c \ + chars.c \ + compat_fgetln.c \ + compat_fts.c \ + compat_getsubopt.c \ + compat_ohash.c \ + compat_reallocarray.c \ + compat_sqlite3_errstr.c \ + compat_strcasestr.c \ + compat_strlcat.c \ + compat_strlcpy.c \ + compat_strsep.c \ + demandoc.c \ + eqn.c \ + eqn_html.c \ + eqn_term.c \ + html.c \ + lib.c \ + main.c \ + man.c \ + man_hash.c \ + man_html.c \ + man_macro.c \ + man_term.c \ + man_validate.c \ + mandoc.c \ + mandoc_aux.c \ + mandocdb.c \ + manpage.c \ + manpath.c \ + mansearch.c \ + mansearch_const.c \ + mdoc.c \ + mdoc_argv.c \ + mdoc_hash.c \ + mdoc_html.c \ + mdoc_macro.c \ + mdoc_man.c \ + mdoc_term.c \ + mdoc_validate.c \ + msec.c \ + out.c \ + preconv.c \ + read.c \ + roff.c \ + st.c \ + tbl.c \ + tbl_data.c \ + tbl_html.c \ + tbl_layout.c \ + tbl_opts.c \ + tbl_term.c \ + term.c \ + term_ascii.c \ + term_ps.c \ + tree.c \ + $(TESTSRCS) + +DISTFILES = INSTALL \ + LICENSE \ + Makefile \ + Makefile.depend \ + NEWS \ + TODO \ + apropos.1 \ + cgi.h.example \ + chars.in \ + compat_fts.h \ + compat_ohash.h \ + configure \ + configure.local.example \ + demandoc.1 \ + eqn.7 \ + example.style.css \ + gmdiff \ + html.h \ + lib.in \ + libman.h \ + libmandoc.h \ + libmdoc.h \ + libroff.h \ + main.h \ + makewhatis.8 \ + man-cgi.css \ + man.1 \ + man.7 \ + man.cgi.8 \ + man.h \ + mandoc.1 \ + mandoc.3 \ + mandoc.db.5 \ + mandoc.h \ + mandoc_aux.h \ + mandoc_char.7 \ + mandoc_escape.3 \ + mandoc_html.3 \ + mandoc_malloc.3 \ + manpath.h \ + mansearch.3 \ + mansearch.h \ + mchars_alloc.3 \ + mdoc.7 \ + mdoc.h \ + msec.in \ + out.h \ + predefs.in \ + roff.7 \ + st.in \ + style.css \ + tbl.3 \ + tbl.7 \ + term.h \ + $(SRCS) + +LIBMAN_OBJS = man.o \ + man_hash.o \ + man_macro.o \ + man_validate.o + +LIBMDOC_OBJS = att.o \ + lib.o \ + mdoc.o \ + mdoc_argv.o \ + mdoc_hash.o \ + mdoc_macro.o \ + mdoc_validate.o \ + st.o + +LIBROFF_OBJS = eqn.o \ + roff.o \ + tbl.o \ + tbl_data.o \ + tbl_layout.o \ + tbl_opts.o + +LIBMANDOC_OBJS = $(LIBMAN_OBJS) \ + $(LIBMDOC_OBJS) \ + $(LIBROFF_OBJS) \ + chars.o \ + mandoc.o \ + mandoc_aux.o \ + msec.o \ + preconv.o \ + read.o + +COMPAT_OBJS = compat_fgetln.o \ + compat_fts.o \ + compat_getsubopt.o \ + compat_ohash.o \ + compat_reallocarray.o \ + compat_sqlite3_errstr.o \ + compat_strcasestr.o \ + compat_strlcat.o \ + compat_strlcpy.o \ + compat_strsep.o + +MANDOC_HTML_OBJS = eqn_html.o \ + html.o \ + man_html.o \ + mdoc_html.o \ + tbl_html.o + +MANDOC_MAN_OBJS = mdoc_man.o + +MANDOC_TERM_OBJS = eqn_term.o \ + man_term.o \ + mdoc_term.o \ + term.o \ + term_ascii.o \ + term_ps.o \ + tbl_term.o + +MANDOC_OBJS = $(MANDOC_HTML_OBJS) \ + $(MANDOC_MAN_OBJS) \ + $(MANDOC_TERM_OBJS) \ + main.o \ + out.o \ + tree.o + +MAN_OBJS = $(MANDOC_OBJS) + +MAKEWHATIS_OBJS = mandocdb.o mansearch_const.o manpath.o + +APROPOS_OBJS = mansearch.o mansearch_const.o manpath.o + +CGI_OBJS = $(MANDOC_HTML_OBJS) \ + cgi.o \ + mansearch.o \ + mansearch_const.o \ + out.o + +MANPAGE_OBJS = manpage.o mansearch.o mansearch_const.o manpath.o + +DEMANDOC_OBJS = demandoc.o + +WWW_MANS = apropos.1.html \ + demandoc.1.html \ + man.1.html \ + mandoc.1.html \ + mandoc.3.html \ + mandoc_escape.3.html \ + mandoc_html.3.html \ + mandoc_malloc.3.html \ + mansearch.3.html \ + mchars_alloc.3.html \ + tbl.3.html \ + mandoc.db.5.html \ + eqn.7.html \ + man.7.html \ + mandoc_char.7.html \ + mdoc.7.html \ + roff.7.html \ + tbl.7.html \ + makewhatis.8.html \ + man.cgi.8.html \ + man.h.html \ + mandoc.h.html \ + mandoc_aux.h.html \ + manpath.h.html \ + mansearch.h.html \ + mdoc.h.html + +WWW_OBJS = mdocml.tar.gz \ + mdocml.sha256 + +include Makefile.local + +INSTALL_TARGETS = $(BUILD_TARGETS:-build=-install) + +# === DEPENDENCY HANDLING ============================================== + +all: base-build $(BUILD_TARGETS) Makefile.local + +base-build: $(BASEBIN) + +db-build: $(DBBIN) + +cgi-build: $(CGIBIN) + +install: base-install $(INSTALL_TARGETS) + +www: $(WWW_OBJS) $(WWW_MANS) + +$(WWW_MANS): mandoc + +include Makefile.depend + +# === TARGETS CONTAINING SHELL COMMANDS ================================ + +distclean: clean + rm -f Makefile.local config.h config.h.old config.log config.log.old + +clean: + rm -f libmandoc.a $(LIBMANDOC_OBJS) $(COMPAT_OBJS) + rm -f mandoc $(MANDOC_OBJS) $(APROPOS_OBJS) + rm -f makewhatis $(MAKEWHATIS_OBJS) + rm -f man.cgi $(CGI_OBJS) + rm -f manpage $(MANPAGE_OBJS) + rm -f demandoc $(DEMANDOC_OBJS) + rm -f $(WWW_MANS) $(WWW_OBJS) + rm -rf *.dSYM + +base-install: base-build + mkdir -p $(DESTDIR)$(BINDIR) + mkdir -p $(DESTDIR)$(EXAMPLEDIR) + mkdir -p $(DESTDIR)$(LIBDIR) + mkdir -p $(DESTDIR)$(INCLUDEDIR) + mkdir -p $(DESTDIR)$(MANDIR)/man1 + mkdir -p $(DESTDIR)$(MANDIR)/man3 + mkdir -p $(DESTDIR)$(MANDIR)/man7 + $(INSTALL_PROGRAM) $(BASEBIN) $(DESTDIR)$(BINDIR) + $(INSTALL_LIB) libmandoc.a $(DESTDIR)$(LIBDIR) + $(INSTALL_LIB) man.h mandoc.h mandoc_aux.h mdoc.h \ + $(DESTDIR)$(INCLUDEDIR) + $(INSTALL_MAN) man.1 mandoc.1 demandoc.1 \ + $(DESTDIR)$(MANDIR)/man1 + $(INSTALL_MAN) mandoc.3 mandoc_escape.3 mandoc_malloc.3 \ + mchars_alloc.3 tbl.3 $(DESTDIR)$(MANDIR)/man3 + $(INSTALL_MAN) man.7 mdoc.7 roff.7 eqn.7 tbl.7 mandoc_char.7 \ + $(DESTDIR)$(MANDIR)/man7 + $(INSTALL_DATA) example.style.css $(DESTDIR)$(EXAMPLEDIR) + +db-install: db-build + mkdir -p $(DESTDIR)$(BINDIR) + mkdir -p $(DESTDIR)$(SBINDIR) + mkdir -p $(DESTDIR)$(MANDIR)/man1 + mkdir -p $(DESTDIR)$(MANDIR)/man3 + mkdir -p $(DESTDIR)$(MANDIR)/man5 + mkdir -p $(DESTDIR)$(MANDIR)/man8 + ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/apropos + ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/whatis + $(INSTALL_PROGRAM) makewhatis $(DESTDIR)$(SBINDIR) + $(INSTALL_MAN) apropos.1 $(DESTDIR)$(MANDIR)/man1 + ln -f $(DESTDIR)$(MANDIR)/man1/apropos.1 \ + $(DESTDIR)$(MANDIR)/man1/whatis.1 + $(INSTALL_MAN) mansearch.3 $(DESTDIR)$(MANDIR)/man3 + $(INSTALL_MAN) mandoc.db.5 $(DESTDIR)$(MANDIR)/man5 + $(INSTALL_MAN) makewhatis.8 $(DESTDIR)$(MANDIR)/man8 + +cgi-install: cgi-build + mkdir -p $(DESTDIR)$(CGIBINDIR) + mkdir -p $(DESTDIR)$(HTDOCDIR) + mkdir -p $(DESTDIR)$(WWWPREFIX)/man/mandoc/man1 + mkdir -p $(DESTDIR)$(WWWPREFIX)/man/mandoc/man8 + $(INSTALL_PROGRAM) man.cgi $(DESTDIR)$(CGIBINDIR) + $(INSTALL_DATA) example.style.css $(DESTDIR)$(HTDOCDIR)/man.css + $(INSTALL_DATA) man-cgi.css $(DESTDIR)$(HTDOCDIR) + $(INSTALL_MAN) apropos.1 $(DESTDIR)$(WWWPREFIX)/man/mandoc/man1/ + $(INSTALL_MAN) man.cgi.8 $(DESTDIR)$(WWWPREFIX)/man/mandoc/man8/ + +www-install: www + mkdir -p $(DESTDIR)$(HTDOCDIR)/snapshots + $(INSTALL_DATA) $(WWW_MANS) style.css $(DESTDIR)$(HTDOCDIR) + $(INSTALL_DATA) $(WWW_OBJS) $(DESTDIR)$(HTDOCDIR)/snapshots + $(INSTALL_DATA) mdocml.tar.gz \ + $(DESTDIR)$(HTDOCDIR)/snapshots/mdocml-$(VERSION).tar.gz + $(INSTALL_DATA) mdocml.sha256 \ + $(DESTDIR)$(HTDOCDIR)/snapshots/mdocml-$(VERSION).sha256 + +Makefile.local config.h: configure ${TESTSRCS} + @echo "$@ is out of date; please run ./configure" + @exit 1 + +depend: config.h + mkdep -f Makefile.depend $(CFLAGS) $(SRCS) + perl -e 'undef $$/; $$_ = <>; s|/usr/include/\S+||g; \ + s|\\\n||g; s| +| |g; s| $$||mg; print;' \ + Makefile.depend > Makefile.tmp + mv Makefile.tmp Makefile.depend + +libmandoc.a: $(COMPAT_OBJS) $(LIBMANDOC_OBJS) + $(AR) rs $@ $(COMPAT_OBJS) $(LIBMANDOC_OBJS) + +mandoc: $(MAN_OBJS) libmandoc.a + $(CC) $(LDFLAGS) -o $@ $(MAN_OBJS) libmandoc.a $(DBLIB) + +makewhatis: $(MAKEWHATIS_OBJS) libmandoc.a + $(CC) $(LDFLAGS) -o $@ $(MAKEWHATIS_OBJS) libmandoc.a $(DBLIB) + +manpage: $(MANPAGE_OBJS) libmandoc.a + $(CC) $(LDFLAGS) -o $@ $(MANPAGE_OBJS) libmandoc.a $(DBLIB) + +man.cgi: $(CGI_OBJS) libmandoc.a + $(CC) $(LDFLAGS) $(STATIC) -o $@ $(CGI_OBJS) libmandoc.a $(DBLIB) + +demandoc: $(DEMANDOC_OBJS) libmandoc.a + $(CC) $(LDFLAGS) -o $@ $(DEMANDOC_OBJS) libmandoc.a + +mdocml.sha256: mdocml.tar.gz + sha256 mdocml.tar.gz > $@ + +mdocml.tar.gz: $(DISTFILES) + mkdir -p .dist/mdocml-$(VERSION)/ + $(INSTALL) -m 0644 $(DISTFILES) .dist/mdocml-$(VERSION) + chmod 755 .dist/mdocml-$(VERSION)/configure + ( cd .dist/ && tar zcf ../$@ mdocml-$(VERSION) ) + rm -rf .dist/ + +.PHONY: base-install cgi-install db-install install www-install +.PHONY: clean distclean depend +.SUFFIXES: .1 .3 .5 .7 .8 .h +.SUFFIXES: .1.html .3.html .5.html .7.html .8.html .h.html + +.h.h.html: + highlight -I $< > $@ + +.1.1.html .3.3.html .5.5.html .7.7.html .8.8.html: mandoc + ./mandoc -Thtml -Wall,stop \ + -Ostyle=style.css,man=%N.%S.html,includes=%I.html $< > $@ Copied: vendor/mdocml/20141201/Makefile.depend (from r275397, vendor/mdocml/dist/Makefile.depend) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/mdocml/20141201/Makefile.depend Tue Dec 2 07:36:02 2014 (r275398, copy of r275397, vendor/mdocml/dist/Makefile.depend) @@ -0,0 +1,72 @@ +att.o: att.c config.h mdoc.h libmdoc.h +cgi.o: cgi.c config.h mandoc.h mandoc_aux.h main.h manpath.h mansearch.h cgi.h +chars.o: chars.c config.h mandoc.h mandoc_aux.h libmandoc.h chars.in +compat_fgetln.o: compat_fgetln.c config.h +compat_fts.o: compat_fts.c config.h compat_fts.h +compat_getsubopt.o: compat_getsubopt.c config.h +compat_ohash.o: compat_ohash.c config.h compat_ohash.h +compat_reallocarray.o: compat_reallocarray.c config.h +compat_sqlite3_errstr.o: compat_sqlite3_errstr.c config.h +compat_strcasestr.o: compat_strcasestr.c config.h +compat_strlcat.o: compat_strlcat.c config.h +compat_strlcpy.o: compat_strlcpy.c config.h +compat_strsep.o: compat_strsep.c config.h +demandoc.o: demandoc.c config.h man.h mdoc.h mandoc.h +eqn.o: eqn.c config.h mandoc.h mandoc_aux.h libmandoc.h libroff.h +eqn_html.o: eqn_html.c config.h mandoc.h out.h html.h +eqn_term.o: eqn_term.c config.h mandoc.h out.h term.h +html.o: html.c config.h mandoc.h mandoc_aux.h libmandoc.h out.h html.h main.h +lib.o: lib.c config.h mdoc.h libmdoc.h lib.in +main.o: main.c config.h mandoc.h mandoc_aux.h main.h mdoc.h man.h manpath.h mansearch.h +man.o: man.c config.h man.h mandoc.h mandoc_aux.h libman.h libmandoc.h +man_hash.o: man_hash.c config.h man.h mandoc.h libman.h +man_html.o: man_html.c config.h mandoc.h mandoc_aux.h out.h html.h man.h main.h +man_macro.o: man_macro.c config.h man.h mandoc.h libmandoc.h libman.h +man_term.o: man_term.c config.h mandoc.h mandoc_aux.h out.h man.h term.h main.h +man_validate.o: man_validate.c config.h man.h mandoc.h mandoc_aux.h libman.h libmandoc.h +mandoc.o: mandoc.c config.h mandoc.h mandoc_aux.h libmandoc.h +mandoc_aux.o: mandoc_aux.c config.h mandoc.h mandoc_aux.h +mandocdb.o: mandocdb.c config.h compat_fts.h compat_ohash.h mdoc.h man.h mandoc.h mandoc_aux.h manpath.h mansearch.h +manpage.o: manpage.c config.h manpath.h mansearch.h +manpath.o: manpath.c config.h mandoc_aux.h manpath.h +mansearch.o: mansearch.c config.h compat_ohash.h mandoc.h mandoc_aux.h manpath.h mansearch.h +mansearch_const.o: mansearch_const.c config.h manpath.h mansearch.h +mdoc.o: mdoc.c config.h mdoc.h mandoc.h mandoc_aux.h libmdoc.h libmandoc.h +mdoc_argv.o: mdoc_argv.c config.h mdoc.h mandoc.h mandoc_aux.h libmdoc.h libmandoc.h +mdoc_hash.o: mdoc_hash.c config.h mdoc.h libmdoc.h +mdoc_html.o: mdoc_html.c config.h mandoc.h mandoc_aux.h out.h html.h mdoc.h main.h +mdoc_macro.o: mdoc_macro.c config.h mdoc.h mandoc.h libmdoc.h libmandoc.h +mdoc_man.o: mdoc_man.c config.h mandoc.h mandoc_aux.h out.h man.h mdoc.h main.h +mdoc_term.o: mdoc_term.c config.h mandoc.h mandoc_aux.h out.h term.h mdoc.h main.h +mdoc_validate.o: mdoc_validate.c config.h mdoc.h mandoc.h mandoc_aux.h libmdoc.h libmandoc.h +msec.o: msec.c config.h mandoc.h libmandoc.h msec.in +out.o: out.c config.h mandoc_aux.h mandoc.h out.h +preconv.o: preconv.c config.h mandoc.h libmandoc.h +read.o: read.c config.h mandoc.h mandoc_aux.h libmandoc.h mdoc.h man.h main.h +roff.o: roff.c config.h mandoc.h mandoc_aux.h libmandoc.h libroff.h predefs.in +st.o: st.c config.h mdoc.h libmdoc.h st.in +tbl.o: tbl.c config.h mandoc.h mandoc_aux.h libmandoc.h libroff.h +tbl_data.o: tbl_data.c config.h mandoc.h mandoc_aux.h libmandoc.h libroff.h +tbl_html.o: tbl_html.c config.h mandoc.h out.h html.h +tbl_layout.o: tbl_layout.c config.h mandoc.h mandoc_aux.h libmandoc.h libroff.h +tbl_opts.o: tbl_opts.c config.h mandoc.h libmandoc.h libroff.h +tbl_term.o: tbl_term.c config.h mandoc.h out.h term.h +term.o: term.c config.h mandoc.h mandoc_aux.h out.h term.h main.h +term_ascii.o: term_ascii.c config.h mandoc.h mandoc_aux.h out.h term.h main.h +term_ps.o: term_ps.c config.h mandoc.h mandoc_aux.h out.h main.h term.h +tree.o: tree.c config.h mandoc.h mdoc.h man.h main.h +test-dirent-namlen.o: test-dirent-namlen.c +test-fgetln.o: test-fgetln.c +test-fts.o: test-fts.c +test-getsubopt.o: test-getsubopt.c +test-mmap.o: test-mmap.c +test-ohash.o: test-ohash.c +test-reallocarray.o: test-reallocarray.c +test-sqlite3.o: test-sqlite3.c +test-sqlite3_errstr.o: test-sqlite3_errstr.c +test-strcasestr.o: test-strcasestr.c +test-strlcat.o: test-strlcat.c +test-strlcpy.o: test-strlcpy.c +test-strptime.o: test-strptime.c +test-strsep.o: test-strsep.c +test-wchar.o: test-wchar.c Copied: vendor/mdocml/20141201/NEWS (from r275397, vendor/mdocml/dist/NEWS) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/mdocml/20141201/NEWS Tue Dec 2 07:36:02 2014 (r275398, copy of r275397, vendor/mdocml/dist/NEWS) @@ -0,0 +1,447 @@ +$Id: NEWS,v 1.6 2014/08/11 01:39:00 schwarze Exp $ + +This file lists the most important changes in the mdocml.bsd.lv distribution. + +Changes in version 1.13.1, released on August 10, 2014 + + --- MAJOR NEW FEATURES --- + * A complete apropos(1)/makewhatis(8)/man.cgi(8) suite + based on SQLite3 is now included. + * The roff(7) parser now provides an almost complete implementation + of numerical expressions. + * Warning and error messages have been improved in many ways. + Almost all fatal errors were downgraded to normal errors and some + even to warnings. Almost all messages now mention the macro where + the issue is detected and many indicate the workaround employed. + The mandoc(1) manual now includes a list explaining all messages. + --- MINOR NEW FEATURES --- + * The roff(7) parser now supports the .ami (append to macro with + indirectly specified name), .as (append to user-defined + string), .dei (define macro with indirectly specified name), + .ll (line length), and .rr (remove register) requests. + * The roff(7) parser now supports string comparison and numerical + conditionals in the .if and .ie requests. + * The roff parser now fully supports the \B (validate numerical + expression) and partially supports the \w (measure text width) + escape sequences. + * The terminal formatter now supports the \: (optional line break) + escape sequence. + * The roff parser now supports expansion of user-defined strings + involving indirect references. + * The roff(7) parser now handles some pre-defined read-only + number registers that occur in the pod2man(1) preamble. + * For backward compatibility, the mdoc(7) parser and formatters + now support the obsolete macros .En, .Es, .Fr, and .Ot. + * The mdoc(7) formatter non partially supports .Bd -centered. + * tbl(7) now handles leading and trailing vertical lines. + * The build system now provides fallback versions of strcasestr(3) + and strsep(3) for systems lacking them. + * The mdoc(7) manual now explains how various standards + supported by the .St macro are related to each other. + --- BUGFIXES --- + * In the roff(7) parser, several bugs were fixed with respect + to closing conditional blocks on macro lines. + * Parsing of roff(7) identifiers and escape sequences was improved + in multiple respects. + * In the mdoc(7) parser, the handling of defective document + prologues was improved in multiple ways. + * The mdoc(7) parser no longer skips content before the first section + header, and it no longer deletes non-.% content from .Rs blocks. + * In the mdoc(7) parser, a crash was fixed related to weird .Sh headers. + * In the mdoc(7) parser, handling of .Sm with missing or invalid + arguments was corrected. + * In the mdoc(7) parser, trailing punctuation at the end of partial + implicit macros no longer triggers end-of-sentence spacing. + * In the terminal formatter, two crashes were fixed: one triggered by + excessive indentation and another by excessively long .Nm arguments. + * In the terminal formatter, a floating point rounding bug was + fixed that sometimes caused an off-by-one error in indentation. + * In the UTF-8 formatter, rendering of accents, breakable hyphens, + and non-breakable spaces was corrected. + * In the HTML formatter, encoding of special characters was + corrected in multiple respects. + * In the mdoc(7) formatter, rendering of .Ex and .Rv was + improved for various edge cases. + * In the mdoc(7) formatter, handling of empty .Bl -inset item + heads was improved. + * In the man(7) formatter, some bugs were fixed with respect + to same-line detection in the context of .TP and .nf macros, + and the indentation of .IP and .TP blocks was improved. + * The mandoc(3) library no longer prints to stderr. + --- THANKS TO --- + Abhinav Upadhyay (NetBSD), Andreas Voegele, Anthony Bentley (OpenBSD), + Christian Weisgerber (OpenBSD), Havard Eidnes (NetBSD), Jan Stary, + Jason McIntyre (OpenBSD), Jeremie Courreges-Anglas (OpenBSD), + Joerg Sonnenberger (NetBSD), Juan Francisco Cantero Hurtado (OpenBSD), + Marc Espie (OpenBSD), Matthias Scheler (NetBSD), Pascal Stumpf (OpenBSD), + Paul Onyschuk (Alpine Linux), Sebastien Marie, Steffen Nurpmeso, + Stuart Henderson (OpenBSD), Ted Unangst (OpenBSD), Theo de Raadt (OpenBSD), + Thomas Klausner (NetBSD), and Ulrich Spoerlein (FreeBSD) + for reporting bugs and missing features. + +Changes in version 1.12.3, released on December 31, 2013 + + * In the mdoc(7) SYNOPSIS, line breaks and hanging indentation + now work correctly for .Fo/.Fa/.Fc and .Fn blocks. + Thanks to Franco Fichtner for doing part of the work. + * The mdoc(7) .Bk macro got some addititonal bugfixes. + * In mdoc(7) macro arguments, double quotes can now be quoted + by doubling them, just like in man(7). + Thanks to Tsugutomo ENAMI for the patch. + * At the end of man(7) macro lines, end-of-sentence spacing + now works. Thanks to Franco Fichtner for the patch. + * For backward compatibility, the man(7) parser now supports the + man-ext .UR/.UE (uniform resource identifier) block macros. + * The man(7) parser now handles closing blocks that are not open + more gracefully. + * The man(7) parser now ignores blank lines right after .SH and .SS. + * In the man(7) formatter, reset indentation when leaving a block, + not just when entering the next one. + * The roff(7) .nr request now supports incrementing and decrementing + number registers and stops parsing the number right before the + first non-digit character. + * The roff(7) parser now supports the alternative escape sequence + syntax \C'uXXXX' for Unicode characters. + * The roff(7) parser now parses and ignores the .fam (font family) + and .hw (hyphenation points) requests and the \d and \u escape + sequences. + * The roff(7) manual got a new ESCAPE SEQUENCE REFERENCE. + +Changes in version 1.12.2, released on Oktober 5, 2013 + + * The mdoc(7) to man(7) converter, to be called as mandoc -Tman, + is now fully functional. + * The mandoc(1) utility now supports the -Ios (default operating system) + input option, and the -Tutf8 output mode now actually works. + * The mandocdb(8) utility no longer truncates existing databases when + starting to build new ones, but only replaces them when the build + actually succeeds. + * The man(7) parser now supports the PD macro (paragraph distance), + and (for GNU man-ext compatibility only) EX (example block) and EE + (example end). Plus several bugfixes regarding indentation, line + breaks, and vertical spacing, and regarding RS following TP. + * The roff(7) parser now supports the \f(BI (bold+italic) font escape, + the \z (zero cursor advance) escape and the cc (change control + character) and it (input line trap) requests. Plus bugfixes regarding + the \t (tab) escape, nested escape sequences, and conditional requests. + * In mdoc(7), several bugs were fixed related to UTF-8 output of quoting + enclosures, delimiter handling, list indentation and horizontal and + vertical spacing, formatting of the Lk, %U, and %C macros, plus some + bugfixes related to the handling of syntax errors like badly nested + font blocks, stray Ta macros outside column lists, unterminated It Xo + blocks, and non-text children of Nm blocks. + * In tbl(7), the width of horizontal spans and the vertical spacing + around tables was corrected, and in man(7) files, a crash was fixed + that was triggered by some particular unclosed T{ macros. + * For mandoc developers, we now provide a tbl(3) library manual and + gmdiff, a very small, very simplistic groff-versus-mandoc output + comparison tool. + * Provide this NEWS file. + +Changes in version 1.12.1, released on March 23, 2012 + + * Significant work on apropos(1) and mandocdb(8). These tools are now + much more robust. A whatis(1) implementation is now handled as an + apropos(1) mode. These tools are also able to minimally handle + pre-formatted pages, that is, those already formatted by another + utility such as GNU troff. + * The man.cgi(7) script is also now available for wider testing. + It interfaces with mandocdb(8) manuals cached by catman(8). + HTML output is generated on-the-fly by libmandoc or internal + methods to convert pre-formatted pages. + * The mailing list archive for the discuss and tech lists are being + hosted by Gmane at gmane.comp.tools.mdocml.user and + gmane.comp.tools.mdocml.devel, respectively. + +Changes in version 1.12.0, released on October 8, 2011 + + * This version features a new, work-in-progress mandoc(1) output mode: + -Tman. This mode allows a system maintainer to distribute man(7) + media for older systems that may not natively support mdoc(7), such + as old Solaris systems. + * The -Ofragment option was added to mandoc(1)'s -Thtml and -Txhtml modes. + * While adding features, an apropos(1) utility has been merged from the + mandoc-tools sandbox. This interfaces with mandocdb(8) for semantic + search of manual content. apropos(1) is different from the traditional + apropos primarily in allowing keyword search (such as for functions, + utilities, etc.) and regular expressions. Note that the calling + syntax for apropos is likely to change as it settles down. + * In documentation news, the mdoc(7) and man(7) manuals have been + made considerably more readable by adding MACRO OVERVIEW sections, by + moving the gory details of the LANGUAGE SYNTAX to the roff(7) manual, + and by moving the very technical MACRO SYNTAX sections down to the + bottom of the page. + * Furthermore, for tbl(7), the -Tascii mode horizontal spacing of tables + was rewritten completely. It is now compatible with groff(1), both + with and without frames and rulers. + * Nesting of indented blocks is now supported in man(7), and several + bugs were fixed regarding indentation and alignment. + * The page headers in mdoc(7) are now nicer for very long titles. + +Changes in version 1.11.7, released on September 2, 2011 + + * Added demandoc(1) utility for stripping away macros and escapes. + This replaces the historical deroff(1) utility. + * Also improved the mdoc(7) and man(7) manuals. + +Changes in version 1.11.6, released on August 16, 2011 + + * Handling of tr macro in roff(7) implemented. This makes Perl + documentation much more readable. Hyphenation is also now enabled in + man(7) format documents. Many other general improvements have been + implemented. + +Changes in version 1.11.5, released on July 24, 2011 + + * Significant eqn(7) improvements. mdocml can now parse arbitrary eqn + input (although few GNU extensions are accepted, nor is mixing + low-level roff with eqn). See the eqn(7) manual for details. + For the time being, equations are rendered as simple in-line text. + The equation parser satisfies the language specified in the + Second Edition User's Guide: + http://www.kohala.com/start/troff/v7man/eqn/eqn2e.ps + +Changes in version 1.11.4, released on July 12, 2011 + + * Bug-fixes and clean-ups across all systems, especially in mandocdb(8) + and the man(7) parser. This release was significantly assisted by + participants in OpenBSD's c2k11. Thanks! + +Changes in version 1.11.3, released on May 26, 2011 + + * Introduce locale-encoding of output with the -Tlocale output option and + Unicode escaped-character input. See mandoc(1) and mandoc_char(7), + respectively, for details. This allows for non-ASCII characters (e.g., + \[u5000]) to be rendered in the locale's encoding, if said environment + supports wide-character encoding (if it does not, -Tascii is used + instead). Locale support can be turned off at compile time by removing + -DUSE_WCHAR in the Makefile, in which case -Tlocale is always a synonym + for -Tascii. + * Furthermore, multibyte-encoded documents, such as those in UTF-8, may + be on-the-fly recoded into mandoc(1) input by using the newly-added + preconv(1) utility. Note: in the future, this feature may be + integrated into mandoc(1). + +Changes in version 1.11.2, released on May 12, 2011 + + * Corrected some installation issues in version 1.11.1. + * Further migration to libmandoc. + * Initial public release (this utility is very much under development) + of mandocdb(8). This utility produces keyword databases of manual + content, which features semantic querying of manual content. + +Changes in version 1.11.1, released on April 4, 2011 + + * The earlier libroff, libmdoc, and libman soup have been merged into + a single library, libmandoc, which manages all aspects of parsing + real manuals, from line-handling to tbl(7) parsing. + * As usual, many general fixes and improvements have also occurred. + In particular, a great deal of redundancy and superfluous code has + been removed with the merging of the backend libraries. + * see also the changes in 1.10.10 + +Changes in version 1.10.10, March 20, 2011, NOT released + + * Initial eqn(7) functionality is in place. For the time being, + this is limited to the recognition of equation blocks; + future version of mdocml will expand upon this framework. + +Changes in version 1.10.9, released on January 7, 2011 + + * Many back-end fixes have been implemented: argument handling (quoting), + man(7) improvements, error/warning classes, and many more. + * Initial tbl(7) functionality (see the "TS", "TE", and "T&" macros in + the roff(7) manual) has been merged from tbl.bsd.lv. Output is still + minimal, especially for -Thtml and -Txhtml, but manages to at least + display data. This means that mandoc(1) now has built-in support + for two troff preprocessors via libroff: soelim(1) and tbl(1). + +Changes in version 1.10.8, released on December 24, 2010 + + * Overhauled the -Thtml and -Txhtml output modes. They now display + readable output in arbitrary browsers, including text-based ones like + lynx(1). See HTML and XHTML manuals in the DOCUMENTATION section + for examples. Attention: available style-sheet classes have been + considerably changed! See the example.style.css file for details. + Lastly, libmdoc and libman have been cleaned up and reduced in size + and complexity. + * see also the changes in 1.10.7 + +Changes in version 1.10.7, December 6, 2010, NOT released + + Significant improvements merged from OpenBSD downstream, including: *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@FreeBSD.ORG Fri Dec 5 22:34:18 2014 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 79C718C7; Fri, 5 Dec 2014 22:34:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 64AB9A3; Fri, 5 Dec 2014 22:34:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sB5MYIf6081308; Fri, 5 Dec 2014 22:34:18 GMT (envelope-from gavin@FreeBSD.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sB5MYGZM081293; Fri, 5 Dec 2014 22:34:16 GMT (envelope-from gavin@FreeBSD.org) Message-Id: <201412052234.sB5MYGZM081293@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gavin set sender to gavin@FreeBSD.org using -f From: Gavin Atkinson Date: Fri, 5 Dec 2014 22:34:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r275526 - in vendor/tnftp/dist: . libnetbsd src X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Dec 2014 22:34:18 -0000 Author: gavin Date: Fri Dec 5 22:34:15 2014 New Revision: 275526 URL: https://svnweb.freebsd.org/changeset/base/275526 Log: Import tnftp-20141031. Modified: vendor/tnftp/dist/ChangeLog vendor/tnftp/dist/NEWS vendor/tnftp/dist/THANKS vendor/tnftp/dist/configure vendor/tnftp/dist/configure.ac vendor/tnftp/dist/libnetbsd/glob.c vendor/tnftp/dist/src/fetch.c vendor/tnftp/dist/src/ssl.h vendor/tnftp/dist/src/version.h Modified: vendor/tnftp/dist/ChangeLog ============================================================================== --- vendor/tnftp/dist/ChangeLog Fri Dec 5 21:37:27 2014 (r275525) +++ vendor/tnftp/dist/ChangeLog Fri Dec 5 22:34:15 2014 (r275526) @@ -1,4 +1,15 @@ -$NetBSD: ChangeLog,v 1.62 2013/05/05 13:53:38 lukem Exp $ +$NetBSD: ChangeLog,v 1.63 2014/10/31 04:13:56 lukem Exp $ + + +Fri Oct 31 04:07:38 UTC 2014 lukem + + * Release as "tnftp 20141031". + + * Merge NetBSD usr.bin/ftp from 20130220 to 20141026: + - Don't pay attention to special characters if they don't + come from the command line (from jmcneill). + Fixes CVE-2014-8517. + - PR/34796: Hauke Fath: ftp does not timeout on http fetches. Sun May 5 13:51:47 UTC 2013 lukem Modified: vendor/tnftp/dist/NEWS ============================================================================== --- vendor/tnftp/dist/NEWS Fri Dec 5 21:37:27 2014 (r275525) +++ vendor/tnftp/dist/NEWS Fri Dec 5 22:34:15 2014 (r275526) @@ -1,6 +1,14 @@ -$NetBSD: NEWS,v 1.9 2013/05/05 13:53:38 lukem Exp $ +$NetBSD: NEWS,v 1.10 2014/10/31 04:06:54 lukem Exp $ -This is tnftp version 20130505. +This is tnftp version 20141031. + +Changes in tnftp from 20130505 to 20141031: + + Ignore special character behaviour in filenames not provided + by the user. + Fixes CVE-2014-8517. + + Fix timeout on HTTP fetches. Changes in tnftp from 20100108 to 20130505: Modified: vendor/tnftp/dist/THANKS ============================================================================== --- vendor/tnftp/dist/THANKS Fri Dec 5 21:37:27 2014 (r275525) +++ vendor/tnftp/dist/THANKS Fri Dec 5 22:34:15 2014 (r275526) @@ -19,9 +19,11 @@ Douwe Kiela Eugene Kotlyarov Geoff Wing Giles Lean +Hauke Fath Havard Eidnes Hubert Feyrer ITOH Yasufumi +Jared McNeill Jason R. Thorpe John Hawkinson Joseph S. Myers Modified: vendor/tnftp/dist/configure ============================================================================== --- vendor/tnftp/dist/configure Fri Dec 5 21:37:27 2014 (r275525) +++ vendor/tnftp/dist/configure Fri Dec 5 22:34:15 2014 (r275526) @@ -1,7 +1,7 @@ #! /bin/sh -# From configure.ac Revision: 1.25 . +# From configure.ac Revision: 1.26 . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for tnftp 20130505. +# Generated by GNU Autoconf 2.69 for tnftp 20141031. # # Report bugs to . # @@ -13,7 +13,7 @@ # gives unlimited permission to copy, distribute and modify it. # # -# Copyright (c) 1999-2013 The NetBSD Foundation, Inc. +# Copyright (c) 1999-2014 The NetBSD Foundation, Inc. # All rights reserved. # ## -------------------- ## @@ -596,8 +596,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='tnftp' PACKAGE_TARNAME='tnftp' -PACKAGE_VERSION='20130505' -PACKAGE_STRING='tnftp 20130505' +PACKAGE_VERSION='20141031' +PACKAGE_STRING='tnftp 20141031' PACKAGE_BUGREPORT='lukem@NetBSD.org' PACKAGE_URL='' @@ -1333,7 +1333,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures tnftp 20130505 to adapt to many kinds of systems. +\`configure' configures tnftp 20141031 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1403,7 +1403,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of tnftp 20130505:";; + short | recursive ) echo "Configuration of tnftp 20141031:";; esac cat <<\_ACEOF @@ -1518,7 +1518,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -tnftp configure 20130505 +tnftp configure 20141031 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1526,7 +1526,7 @@ This configure script is free software; gives unlimited permission to copy, distribute and modify it. -Copyright (c) 1999-2013 The NetBSD Foundation, Inc. +Copyright (c) 1999-2014 The NetBSD Foundation, Inc. All rights reserved. _ACEOF @@ -2103,7 +2103,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by tnftp $as_me 20130505, which was +It was created by tnftp $as_me 20141031, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3067,7 +3067,7 @@ fi # Define the identity of the package. PACKAGE='tnftp' - VERSION='20130505' + VERSION='20141031' cat >>confdefs.h <<_ACEOF @@ -15274,7 +15274,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by tnftp $as_me 20130505, which was +This file was extended by tnftp $as_me 20141031, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15340,7 +15340,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -tnftp config.status 20130505 +tnftp config.status 20141031 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Modified: vendor/tnftp/dist/configure.ac ============================================================================== --- vendor/tnftp/dist/configure.ac Fri Dec 5 21:37:27 2014 (r275525) +++ vendor/tnftp/dist/configure.ac Fri Dec 5 22:34:15 2014 (r275526) @@ -1,15 +1,15 @@ -# $NetBSD: configure.ac,v 1.25 2013/05/05 13:50:50 lukem Exp $ +# $NetBSD: configure.ac,v 1.26 2014/10/31 04:03:54 lukem Exp $ # # Process this file with autoconf to produce a configure script. -AC_INIT([tnftp], [20130505], [lukem@NetBSD.org]) +AC_INIT([tnftp], [20141031], [lukem@NetBSD.org]) AC_PREREQ([2.69]) AC_COPYRIGHT([ -Copyright (c) 1999-2013 The NetBSD Foundation, Inc. +Copyright (c) 1999-2014 The NetBSD Foundation, Inc. All rights reserved. ]) -AC_REVISION([$Revision: 1.25 $]) +AC_REVISION([$Revision: 1.26 $]) AS_SHELL_SANITIZE() Modified: vendor/tnftp/dist/libnetbsd/glob.c ============================================================================== --- vendor/tnftp/dist/libnetbsd/glob.c Fri Dec 5 21:37:27 2014 (r275525) +++ vendor/tnftp/dist/libnetbsd/glob.c Fri Dec 5 22:34:15 2014 (r275526) @@ -1,4 +1,4 @@ -/* $NetBSD: glob.c,v 1.11 2013/05/05 13:20:16 lukem Exp $ */ +/* $NetBSD: glob.c,v 1.12 2014/05/05 00:20:45 lukem Exp $ */ /* from: NetBSD: glob.c,v 1.34 2013/02/21 18:17:43 christos Exp */ /* @@ -176,8 +176,8 @@ static void qprintf(const char *, Char #endif int -glob(const char * __restrict pattern, int flags, int (*errfunc)(const char *, - int), glob_t * __restrict pglob) +glob(const char * pattern, int flags, int (*errfunc)(const char *, + int), glob_t * pglob) { const unsigned char *patnext; int c; Modified: vendor/tnftp/dist/src/fetch.c ============================================================================== --- vendor/tnftp/dist/src/fetch.c Fri Dec 5 21:37:27 2014 (r275525) +++ vendor/tnftp/dist/src/fetch.c Fri Dec 5 22:34:15 2014 (r275526) @@ -1,5 +1,5 @@ -/* $NetBSD: fetch.c,v 1.19 2013/05/05 11:17:30 lukem Exp $ */ -/* from NetBSD: fetch.c,v 1.202 2013/02/23 13:47:36 christos Exp */ +/* $NetBSD: fetch.c,v 1.20 2014/10/31 03:37:59 lukem Exp $ */ +/* from NetBSD: fetch.c,v 1.206 2014/10/26 16:21:59 christos Exp */ /*- * Copyright (c) 1997-2009 The NetBSD Foundation, Inc. @@ -39,7 +39,7 @@ #include #ifndef lint -__RCSID(" NetBSD: fetch.c,v 1.202 2013/02/23 13:47:36 christos Exp "); +__RCSID(" NetBSD: fetch.c,v 1.206 2014/10/26 16:21:59 christos Exp "); #endif /* not lint */ /* @@ -87,6 +87,7 @@ typedef enum { } url_t; __dead static void aborthttp(int); +__dead static void timeouthttp(int); #ifndef NO_AUTH static int auth_url(const char *, char **, const char *, const char *); static void base64_encode(const unsigned char *, size_t, unsigned char *); @@ -499,8 +500,10 @@ fetch_url(const char *url, const char *p { struct addrinfo hints, *res, *res0 = NULL; int error; - sigfunc volatile oldintr; - sigfunc volatile oldintp; + sigfunc volatile oldint; + sigfunc volatile oldpipe; + sigfunc volatile oldalrm; + sigfunc volatile oldquit; int volatile s; struct stat sb; int volatile ischunked; @@ -526,6 +529,7 @@ fetch_url(const char *url, const char *p int (*volatile closefunc)(FILE *); FETCH *volatile fin; FILE *volatile fout; + const char *volatile penv = proxyenv; time_t mtime; url_t urltype; in_port_t portnum; @@ -533,9 +537,9 @@ fetch_url(const char *url, const char *p void *ssl; #endif - DPRINTF("fetch_url: `%s' proxyenv `%s'\n", url, STRorNULL(proxyenv)); + DPRINTF("%s: `%s' proxyenv `%s'\n", __func__, url, STRorNULL(penv)); - oldintr = oldintp = NULL; + oldquit = oldalrm = oldint = oldpipe = NULL; closefunc = NULL; fin = NULL; fout = NULL; @@ -546,6 +550,9 @@ fetch_url(const char *url, const char *p rval = 1; uuser = pass = host = path = decodedpath = puser = ppass = NULL; + if (sigsetjmp(httpabort, 1)) + goto cleanup_fetch_url; + if (parse_url(url, "URL", &urltype, &uuser, &pass, &host, &port, &portnum, &path) == -1) goto cleanup_fetch_url; @@ -571,7 +578,7 @@ fetch_url(const char *url, const char *p url_decode(decodedpath); if (outfile) - savefile = ftp_strdup(outfile); + savefile = outfile; else { cp = strrchr(decodedpath, '/'); /* find savefile */ if (cp != NULL) @@ -579,7 +586,7 @@ fetch_url(const char *url, const char *p else savefile = ftp_strdup(decodedpath); } - DPRINTF("fetch_url: savefile `%s'\n", savefile); + DPRINTF("%s: savefile `%s'\n", __func__, savefile); if (EMPTYSTRING(savefile)) { if (urltype == FTP_URL_T) { rval = fetch_ftp(url); @@ -595,8 +602,7 @@ fetch_url(const char *url, const char *p rangestart = rangeend = entitylen = -1; mtime = -1; if (restartautofetch) { - if (strcmp(savefile, "-") != 0 && *savefile != '|' && - stat(savefile, &sb) == 0) + if (stat(savefile, &sb) == 0) restart_point = sb.st_size; } if (urltype == FILE_URL_T) { /* file:// URLs */ @@ -631,18 +637,18 @@ fetch_url(const char *url, const char *p const char *leading; int hasleading; - if (proxyenv == NULL) { + if (penv == NULL) { #ifdef WITH_SSL if (urltype == HTTPS_URL_T) - proxyenv = getoptionvalue("https_proxy"); + penv = getoptionvalue("https_proxy"); #endif - if (proxyenv == NULL && IS_HTTP_TYPE(urltype)) - proxyenv = getoptionvalue("http_proxy"); + if (penv == NULL && IS_HTTP_TYPE(urltype)) + penv = getoptionvalue("http_proxy"); else if (urltype == FTP_URL_T) - proxyenv = getoptionvalue("ftp_proxy"); + penv = getoptionvalue("ftp_proxy"); } direction = "retrieved"; - if (! EMPTYSTRING(proxyenv)) { /* use proxy */ + if (! EMPTYSTRING(penv)) { /* use proxy */ url_t purltype; char *phost, *ppath; char *pport, *no_proxy; @@ -689,10 +695,10 @@ fetch_url(const char *url, const char *p if (isproxy) { if (restart_point) { warnx("Can't restart via proxy URL `%s'", - proxyenv); + penv); goto cleanup_fetch_url; } - if (parse_url(proxyenv, "proxy URL", &purltype, + if (parse_url(penv, "proxy URL", &purltype, &puser, &ppass, &phost, &pport, &pportnum, &ppath) == -1) goto cleanup_fetch_url; @@ -702,8 +708,7 @@ fetch_url(const char *url, const char *p EMPTYSTRING(phost) || (! EMPTYSTRING(ppath) && strcmp(ppath, "/") != 0)) { - warnx("Malformed proxy URL `%s'", - proxyenv); + warnx("Malformed proxy URL `%s'", penv); FREEPTR(phost); FREEPTR(pport); FREEPTR(ppath); @@ -729,7 +734,7 @@ fetch_url(const char *url, const char *p FREEPTR(ppath); urltype = purltype; } - } /* ! EMPTYSTRING(proxyenv) */ + } /* ! EMPTYSTRING(penv) */ memset(&hints, 0, sizeof(hints)); hints.ai_flags = 0; @@ -801,9 +806,13 @@ fetch_url(const char *url, const char *p goto cleanup_fetch_url; } + oldalrm = xsignal(SIGALRM, timeouthttp); + alarmtimer(quit_time ? quit_time : 60); fin = fetch_fdopen(s, "r+"); fetch_set_ssl(fin, ssl); + alarmtimer(0); + alarmtimer(quit_time ? quit_time : 60); /* * Construct and send the request. */ @@ -890,11 +899,15 @@ fetch_url(const char *url, const char *p fetch_printf(fin, "\r\n"); if (fetch_flush(fin) == EOF) { warn("Writing HTTP request"); + alarmtimer(0); goto cleanup_fetch_url; } + alarmtimer(0); /* Read the response */ + alarmtimer(quit_time ? quit_time : 60); len = fetch_getline(fin, buf, sizeof(buf), &errormsg); + alarmtimer(0); if (len < 0) { if (*errormsg == '\n') errormsg++; @@ -903,7 +916,7 @@ fetch_url(const char *url, const char *p } while (len > 0 && (ISLWS(buf[len-1]))) buf[--len] = '\0'; - DPRINTF("fetch_url: received `%s'\n", buf); + DPRINTF("%s: received `%s'\n", __func__, buf); /* Determine HTTP response code */ cp = strchr(buf, ' '); @@ -918,7 +931,9 @@ fetch_url(const char *url, const char *p /* Read the rest of the header. */ while (1) { + alarmtimer(quit_time ? quit_time : 60); len = fetch_getline(fin, buf, sizeof(buf), &errormsg); + alarmtimer(0); if (len < 0) { if (*errormsg == '\n') errormsg++; @@ -929,7 +944,7 @@ fetch_url(const char *url, const char *p buf[--len] = '\0'; if (len == 0) break; - DPRINTF("fetch_url: received `%s'\n", buf); + DPRINTF("%s: received `%s'\n", __func__, buf); /* * Look for some headers @@ -941,8 +956,8 @@ fetch_url(const char *url, const char *p filesize = STRTOLL(cp, &ep, 10); if (filesize < 0 || *ep != '\0') goto improper; - DPRINTF("fetch_url: parsed len as: " LLF "\n", - (LLT)filesize); + DPRINTF("%s: parsed len as: " LLF "\n", + __func__, (LLT)filesize); } else if (match_token(&cp, "Content-Range:")) { if (! match_token(&cp, "bytes")) @@ -1013,8 +1028,8 @@ fetch_url(const char *url, const char *p } else if (match_token(&cp, "Location:")) { location = ftp_strdup(cp); - DPRINTF("fetch_url: parsed location as `%s'\n", - cp); + DPRINTF("%s: parsed location as `%s'\n", + __func__, cp); } else if (match_token(&cp, "Transfer-Encoding:")) { if (match_token(&cp, "binary")) { @@ -1029,19 +1044,20 @@ fetch_url(const char *url, const char *p goto cleanup_fetch_url; } ischunked++; - DPRINTF("fetch_url: using chunked encoding\n"); + DPRINTF("%s: using chunked encoding\n", + __func__); } else if (match_token(&cp, "Proxy-Authenticate:") || match_token(&cp, "WWW-Authenticate:")) { if (! (token = match_token(&cp, "Basic"))) { - DPRINTF( - "fetch_url: skipping unknown auth scheme `%s'\n", - token); + DPRINTF("%s: skipping unknown auth " + "scheme `%s'\n", __func__, token); continue; } FREEPTR(auth); auth = ftp_strdup(token); - DPRINTF("fetch_url: parsed auth as `%s'\n", cp); + DPRINTF("%s: parsed auth as `%s'\n", + __func__, cp); } } @@ -1123,7 +1139,7 @@ fetch_url(const char *url, const char *p apass = NULL; } if (auth_url(auth, authp, auser, apass) == 0) { - rval = fetch_url(url, proxyenv, + rval = fetch_url(url, penv, proxyauth, wwwauth); memset(*authp, 0, strlen(*authp)); FREEPTR(*authp); @@ -1140,18 +1156,26 @@ fetch_url(const char *url, const char *p } } /* end of ftp:// or http:// specific setup */ - /* Open the output file. */ - if (strcmp(savefile, "-") == 0) { - fout = stdout; - } else if (*savefile == '|') { - oldintp = xsignal(SIGPIPE, SIG_IGN); - fout = popen(savefile + 1, "w"); - if (fout == NULL) { - warn("Can't execute `%s'", savefile + 1); - goto cleanup_fetch_url; + /* Open the output file. */ + + /* + * Only trust filenames with special meaning if they came from + * the command line + */ + if (outfile == savefile) { + if (strcmp(savefile, "-") == 0) { + fout = stdout; + } else if (*savefile == '|') { + oldpipe = xsignal(SIGPIPE, SIG_IGN); + fout = popen(savefile + 1, "w"); + if (fout == NULL) { + warn("Can't execute `%s'", savefile + 1); + goto cleanup_fetch_url; + } + closefunc = pclose; } - closefunc = pclose; - } else { + } + if (fout == NULL) { if ((rangeend != -1 && rangeend <= restart_point) || (rangestart == -1 && filesize != -1 && filesize <= restart_point)) { /* already done */ @@ -1180,10 +1204,8 @@ fetch_url(const char *url, const char *p } /* Trap signals */ - if (sigsetjmp(httpabort, 1)) - goto cleanup_fetch_url; - (void)xsignal(SIGQUIT, psummary); - oldintr = xsignal(SIGINT, aborthttp); + oldquit = xsignal(SIGQUIT, psummary); + oldint = xsignal(SIGINT, aborthttp); assert(rcvbuf_size > 0); if ((size_t)rcvbuf_size > bufsize) { @@ -1195,6 +1217,10 @@ fetch_url(const char *url, const char *p bytes = 0; hashbytes = mark; + if (oldalrm) { + (void)xsignal(SIGALRM, oldalrm); + oldalrm = NULL; + } progressmeter(-1); /* Finally, suck down the file. */ @@ -1241,7 +1267,7 @@ fetch_url(const char *url, const char *p warnx("Unexpected data following chunk-size"); goto cleanup_fetch_url; } - DPRINTF("fetch_url: got chunk-size of " LLF "\n", + DPRINTF("%s: got chunk-size of " LLF "\n", __func__, (LLT)chunksize); if (chunksize == 0) { lastchunk = 1; @@ -1251,7 +1277,7 @@ fetch_url(const char *url, const char *p /* transfer file or chunk */ while (1) { struct timeval then, now, td; - off_t bufrem; + volatile off_t bufrem; if (rate_get) (void)gettimeofday(&then, NULL); @@ -1299,6 +1325,7 @@ fetch_url(const char *url, const char *p chunkdone: if (ischunked) { if (fetch_getln(xferbuf, bufsize, fin) == NULL) { + alarmtimer(0); warnx("Unexpected EOF reading chunk CRLF"); goto cleanup_fetch_url; } @@ -1350,10 +1377,14 @@ fetch_url(const char *url, const char *p warnx("Improper response from `%s:%s'", host, port); cleanup_fetch_url: - if (oldintr) - (void)xsignal(SIGINT, oldintr); - if (oldintp) - (void)xsignal(SIGPIPE, oldintp); + if (oldint) + (void)xsignal(SIGINT, oldint); + if (oldpipe) + (void)xsignal(SIGPIPE, oldpipe); + if (oldalrm) + (void)xsignal(SIGALRM, oldalrm); + if (oldquit) + (void)xsignal(SIGQUIT, oldpipe); if (fin != NULL) fetch_close(fin); else if (s != -1) @@ -1362,7 +1393,8 @@ fetch_url(const char *url, const char *p (*closefunc)(fout); if (res0) freeaddrinfo(res0); - FREEPTR(savefile); + if (savefile != outfile) + FREEPTR(savefile); FREEPTR(uuser); if (pass != NULL) memset(pass, 0, strlen(pass)); @@ -1388,12 +1420,32 @@ static void aborthttp(int notused) { char msgbuf[100]; - size_t len; + int len; sigint_raised = 1; alarmtimer(0); - len = strlcpy(msgbuf, "\nHTTP fetch aborted.\n", sizeof(msgbuf)); - write(fileno(ttyout), msgbuf, len); + if (fromatty) { + len = snprintf(msgbuf, sizeof(msgbuf), + "\n%s: HTTP fetch aborted.\n", getprogname()); + if (len > 0) + write(fileno(ttyout), msgbuf, len); + } + siglongjmp(httpabort, 1); +} + +static void +timeouthttp(int notused) +{ + char msgbuf[100]; + int len; + + alarmtimer(0); + if (fromatty) { + len = snprintf(msgbuf, sizeof(msgbuf), + "\n%s: HTTP fetch timeout.\n", getprogname()); + if (len > 0) + write(fileno(ttyout), msgbuf, len); + } siglongjmp(httpabort, 1); } Modified: vendor/tnftp/dist/src/ssl.h ============================================================================== --- vendor/tnftp/dist/src/ssl.h Fri Dec 5 21:37:27 2014 (r275525) +++ vendor/tnftp/dist/src/ssl.h Fri Dec 5 22:34:15 2014 (r275526) @@ -1,5 +1,5 @@ -/* $NetBSD: ssl.h,v 1.1.1.1 2013/05/05 10:40:57 lukem Exp $ */ -/* from NetBSD: ssl.h,v 1.1 2012/12/21 18:07:36 christos Exp */ +/* $NetBSD: ssl.h,v 1.2 2014/10/31 03:57:14 lukem Exp $ */ +/* from NetBSD: ssl.h,v 1.2 2014/01/07 02:07:08 joerg Exp */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -31,7 +31,8 @@ #define FETCH struct fetch_connect struct fetch_connect; -int fetch_printf(struct fetch_connect *, const char *fmt, ...); +int fetch_printf(struct fetch_connect *, const char *fmt, ...) + ; int fetch_fileno(struct fetch_connect *); int fetch_error(struct fetch_connect *); int fetch_flush(struct fetch_connect *); Modified: vendor/tnftp/dist/src/version.h ============================================================================== --- vendor/tnftp/dist/src/version.h Fri Dec 5 21:37:27 2014 (r275525) +++ vendor/tnftp/dist/src/version.h Fri Dec 5 22:34:15 2014 (r275526) @@ -1,5 +1,5 @@ -/* $NetBSD: version.h,v 1.5 2013/05/05 11:17:31 lukem Exp $ */ -/* from NetBSD: version.h,v 1.84 2013/05/05 10:40:19 lukem Exp */ +/* $NetBSD: version.h,v 1.6 2014/10/31 03:37:59 lukem Exp $ */ +/* from NetBSD: version.h,v 1.85 2014/10/31 03:27:18 lukem Exp */ /*- * Copyright (c) 1999-2009 The NetBSD Foundation, Inc. @@ -35,5 +35,5 @@ #endif #ifndef FTP_VERSION -#define FTP_VERSION "20130220" +#define FTP_VERSION "20141026" #endif From owner-svn-src-vendor@FreeBSD.ORG Fri Dec 5 22:35:29 2014 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ABBBBA05; Fri, 5 Dec 2014 22:35:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 7E5D2B5; Fri, 5 Dec 2014 22:35:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sB5MZTtd081514; Fri, 5 Dec 2014 22:35:29 GMT (envelope-from gavin@FreeBSD.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sB5MZT53081513; Fri, 5 Dec 2014 22:35:29 GMT (envelope-from gavin@FreeBSD.org) Message-Id: <201412052235.sB5MZT53081513@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gavin set sender to gavin@FreeBSD.org using -f From: Gavin Atkinson Date: Fri, 5 Dec 2014 22:35:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r275527 - vendor/tnftp/20141031 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Dec 2014 22:35:29 -0000 Author: gavin Date: Fri Dec 5 22:35:28 2014 New Revision: 275527 URL: https://svnweb.freebsd.org/changeset/base/275527 Log: Tag tnftp-20141031. Added: vendor/tnftp/20141031/ - copied from r275526, vendor/tnftp/dist/ From owner-svn-src-vendor@FreeBSD.ORG Fri Dec 5 22:37:58 2014 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 87CB4B65; Fri, 5 Dec 2014 22:37:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 68904D4; Fri, 5 Dec 2014 22:37:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sB5MbwNP081823; Fri, 5 Dec 2014 22:37:58 GMT (envelope-from gavin@FreeBSD.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sB5Mbuph081811; Fri, 5 Dec 2014 22:37:56 GMT (envelope-from gavin@FreeBSD.org) Message-Id: <201412052237.sB5Mbuph081811@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gavin set sender to gavin@FreeBSD.org using -f From: Gavin Atkinson Date: Fri, 5 Dec 2014 22:37:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r275528 - vendor/tnftp/dist X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Dec 2014 22:37:58 -0000 Author: gavin Date: Fri Dec 5 22:37:56 2014 New Revision: 275528 URL: https://svnweb.freebsd.org/changeset/base/275528 Log: Import tnftp-20141104. Modified: vendor/tnftp/dist/ChangeLog vendor/tnftp/dist/NEWS vendor/tnftp/dist/configure vendor/tnftp/dist/configure.ac vendor/tnftp/dist/tnftp.h vendor/tnftp/dist/tnftp_config.h.in Modified: vendor/tnftp/dist/ChangeLog ============================================================================== --- vendor/tnftp/dist/ChangeLog Fri Dec 5 22:35:28 2014 (r275527) +++ vendor/tnftp/dist/ChangeLog Fri Dec 5 22:37:56 2014 (r275528) @@ -1,6 +1,16 @@ -$NetBSD: ChangeLog,v 1.63 2014/10/31 04:13:56 lukem Exp $ +$NetBSD: ChangeLog,v 1.66 2014/11/03 21:48:49 lukem Exp $ +Mon Nov 3 21:43:20 UTC 2014 lukem + + * Release as "tnftp 20141104". + +Fri Oct 31 08:32:28 UTC 2014 lukem + + * Use '=' not '==' with test in configure. + + * Check for for writev() declaration. + Fri Oct 31 04:07:38 UTC 2014 lukem * Release as "tnftp 20141031". Modified: vendor/tnftp/dist/NEWS ============================================================================== --- vendor/tnftp/dist/NEWS Fri Dec 5 22:35:28 2014 (r275527) +++ vendor/tnftp/dist/NEWS Fri Dec 5 22:37:56 2014 (r275528) @@ -1,6 +1,10 @@ -$NetBSD: NEWS,v 1.10 2014/10/31 04:06:54 lukem Exp $ +$NetBSD: NEWS,v 1.11 2014/11/03 21:48:49 lukem Exp $ -This is tnftp version 20141031. +This is tnftp version 20141104. + +Changes in tnftp from 20141031 to 20141104: + + Portability fixes. Changes in tnftp from 20130505 to 20141031: Modified: vendor/tnftp/dist/configure ============================================================================== --- vendor/tnftp/dist/configure Fri Dec 5 22:35:28 2014 (r275527) +++ vendor/tnftp/dist/configure Fri Dec 5 22:37:56 2014 (r275528) @@ -1,7 +1,7 @@ #! /bin/sh -# From configure.ac Revision: 1.26 . +# From configure.ac Revision: 1.29 . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for tnftp 20141031. +# Generated by GNU Autoconf 2.69 for tnftp 20141104. # # Report bugs to . # @@ -596,8 +596,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='tnftp' PACKAGE_TARNAME='tnftp' -PACKAGE_VERSION='20141031' -PACKAGE_STRING='tnftp 20141031' +PACKAGE_VERSION='20141104' +PACKAGE_STRING='tnftp 20141104' PACKAGE_BUGREPORT='lukem@NetBSD.org' PACKAGE_URL='' @@ -1333,7 +1333,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures tnftp 20141031 to adapt to many kinds of systems. +\`configure' configures tnftp 20141104 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1403,7 +1403,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of tnftp 20141031:";; + short | recursive ) echo "Configuration of tnftp 20141104:";; esac cat <<\_ACEOF @@ -1518,7 +1518,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -tnftp configure 20141031 +tnftp configure 20141104 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2103,7 +2103,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by tnftp $as_me 20141031, which was +It was created by tnftp $as_me 20141104, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3067,7 +3067,7 @@ fi # Define the identity of the package. PACKAGE='tnftp' - VERSION='20141031' + VERSION='20141104' cat >>confdefs.h <<_ACEOF @@ -12277,7 +12277,7 @@ rm -f core conftest.err conftest.$ac_obj if test "$with_ssl" != no; then : { $as_echo "$as_me:${as_lineno-$LINENO}: --with-ssl=$with_ssl; checking for required OpenSSL features" >&5 $as_echo "$as_me: --with-ssl=$with_ssl; checking for required OpenSSL features" >&6;} - if test "$have_ssl" == yes; then : + if test "$have_ssl" = yes; then : $as_echo "#define WITH_SSL 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: enabling SSL support" >&5 @@ -12383,7 +12383,8 @@ accheck_includes=' ' # accheck_includes for ac_header in sys/types.h sys/ioctl.h sys/param.h sys/stat.h \ - sys/socket.h sys/syslimits.h sys/time.h sys/wait.h + sys/socket.h sys/syslimits.h sys/time.h sys/uio.h \ + sys/wait.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$accheck_includes @@ -15274,7 +15275,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by tnftp $as_me 20141031, which was +This file was extended by tnftp $as_me 20141104, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15340,7 +15341,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -tnftp config.status 20141031 +tnftp config.status 20141104 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Modified: vendor/tnftp/dist/configure.ac ============================================================================== --- vendor/tnftp/dist/configure.ac Fri Dec 5 22:35:28 2014 (r275527) +++ vendor/tnftp/dist/configure.ac Fri Dec 5 22:37:56 2014 (r275528) @@ -1,15 +1,15 @@ -# $NetBSD: configure.ac,v 1.26 2014/10/31 04:03:54 lukem Exp $ +# $NetBSD: configure.ac,v 1.29 2014/11/03 21:48:49 lukem Exp $ # # Process this file with autoconf to produce a configure script. -AC_INIT([tnftp], [20141031], [lukem@NetBSD.org]) +AC_INIT([tnftp], [20141104], [lukem@NetBSD.org]) AC_PREREQ([2.69]) AC_COPYRIGHT([ Copyright (c) 1999-2014 The NetBSD Foundation, Inc. All rights reserved. ]) -AC_REVISION([$Revision: 1.26 $]) +AC_REVISION([$Revision: 1.29 $]) AS_SHELL_SANITIZE() @@ -140,7 +140,7 @@ AX_CHECK_OPENSSL([have_ssl=yes]) AS_IF([test "$with_ssl" != no], [AC_MSG_NOTICE([--with-ssl=$with_ssl; checking for required OpenSSL features]) - AS_IF([test "$have_ssl" == yes], + AS_IF([test "$have_ssl" = yes], [AC_DEFINE([WITH_SSL], [1]) AC_MSG_NOTICE([enabling SSL support]) with_ssl=yes], @@ -229,7 +229,8 @@ accheck_includes=' ' # accheck_includes AC_CHECK_HEADERS([sys/types.h sys/ioctl.h sys/param.h sys/stat.h \ - sys/socket.h sys/syslimits.h sys/time.h sys/wait.h], + sys/socket.h sys/syslimits.h sys/time.h sys/uio.h \ + sys/wait.h], [], [], [$accheck_includes]) AC_HEADER_DIRENT() AC_HEADER_RESOLV() Modified: vendor/tnftp/dist/tnftp.h ============================================================================== --- vendor/tnftp/dist/tnftp.h Fri Dec 5 22:35:28 2014 (r275527) +++ vendor/tnftp/dist/tnftp.h Fri Dec 5 22:37:56 2014 (r275528) @@ -1,4 +1,4 @@ -/* $NetBSD: tnftp.h,v 1.35 2013/05/05 13:17:05 lukem Exp $ */ +/* $NetBSD: tnftp.h,v 1.36 2014/10/31 07:22:03 lukem Exp $ */ #define FTP_PRODUCT PACKAGE_NAME #define FTP_VERSION PACKAGE_VERSION @@ -70,6 +70,9 @@ # include # endif #endif +#if defined(HAVE_SYS_UIO_H) +# include +#endif #if defined(HAVE_SYS_IOCTL_H) # include Modified: vendor/tnftp/dist/tnftp_config.h.in ============================================================================== --- vendor/tnftp/dist/tnftp_config.h.in Fri Dec 5 22:35:28 2014 (r275527) +++ vendor/tnftp/dist/tnftp_config.h.in Fri Dec 5 22:37:56 2014 (r275528) @@ -388,6 +388,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_UIO_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_WAIT_H From owner-svn-src-vendor@FreeBSD.ORG Fri Dec 5 22:38:22 2014 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4D342C87; Fri, 5 Dec 2014 22:38:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 2001FD7; Fri, 5 Dec 2014 22:38:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sB5McL3e081923; Fri, 5 Dec 2014 22:38:21 GMT (envelope-from gavin@FreeBSD.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sB5McLST081922; Fri, 5 Dec 2014 22:38:21 GMT (envelope-from gavin@FreeBSD.org) Message-Id: <201412052238.sB5McLST081922@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gavin set sender to gavin@FreeBSD.org using -f From: Gavin Atkinson Date: Fri, 5 Dec 2014 22:38:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r275529 - vendor/tnftp/20141104 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Dec 2014 22:38:22 -0000 Author: gavin Date: Fri Dec 5 22:38:21 2014 New Revision: 275529 URL: https://svnweb.freebsd.org/changeset/base/275529 Log: Tag tnftp-20141104. Added: vendor/tnftp/20141104/ - copied from r275528, vendor/tnftp/dist/ From owner-svn-src-vendor@FreeBSD.ORG Fri Dec 5 23:43:16 2014 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 139BCA07; Fri, 5 Dec 2014 23:43:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 F3F7CA80; Fri, 5 Dec 2014 23:43:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sB5NhF11013542; Fri, 5 Dec 2014 23:43:15 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sB5NhFmH013541; Fri, 5 Dec 2014 23:43:15 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201412052343.sB5NhFmH013541@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 5 Dec 2014 23:43:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r275532 - vendor/illumos/dist/lib/libnvpair X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Dec 2014 23:43:16 -0000 Author: delphij Date: Fri Dec 5 23:43:15 2014 New Revision: 275532 URL: https://svnweb.freebsd.org/changeset/base/275532 Log: 5005 libnvpair JSON output broken by lint fixes 5006 libnvpair JSON cannot print int16 arrays Reviewed by: Robert Mustacchi Approved by: Gordon Ross Author: Joshua M. Clulow illumos/illumos-gate@37c79205ad46187f54b2edbf6a468160935f14d9 Modified: vendor/illumos/dist/lib/libnvpair/nvpair_json.c Modified: vendor/illumos/dist/lib/libnvpair/nvpair_json.c ============================================================================== --- vendor/illumos/dist/lib/libnvpair/nvpair_json.c Fri Dec 5 23:08:39 2014 (r275531) +++ vendor/illumos/dist/lib/libnvpair/nvpair_json.c Fri Dec 5 23:43:15 2014 (r275532) @@ -9,7 +9,7 @@ * http://www.illumos.org/license/CDDL. */ /* - * Copyright (c) 2013, Joyent, Inc. All rights reserved. + * Copyright (c) 2014, Joyent, Inc. */ #include @@ -20,9 +20,11 @@ #include "libnvpair.h" -#define FPRINTF(fp, ...) \ - if (fprintf(fp, __VA_ARGS__) < 0) \ - return (-1) \ +#define FPRINTF(fp, ...) \ + do { \ + if (fprintf(fp, __VA_ARGS__) < 0) \ + return (-1); \ + } while (0) /* * When formatting a string for JSON output we must escape certain characters, @@ -328,7 +330,7 @@ nvlist_print_json(FILE *fp, nvlist_t *nv for (i = 0; i < valsz; i++) { if (i > 0) FPRINTF(fp, ","); - FPRINTF(fp, "%hhd", val[i]); + FPRINTF(fp, "%hd", val[i]); } FPRINTF(fp, "]"); break; From owner-svn-src-vendor@FreeBSD.ORG Fri Dec 5 23:50:17 2014 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0FF4CBC4; Fri, 5 Dec 2014 23:50:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 F01E6ACF; Fri, 5 Dec 2014 23:50:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sB5NoGea014926; Fri, 5 Dec 2014 23:50:16 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sB5NoG3R014925; Fri, 5 Dec 2014 23:50:16 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201412052350.sB5NoG3R014925@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 5 Dec 2014 23:50:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r275533 - vendor-sys/illumos/dist/uts/common/sys X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Dec 2014 23:50:17 -0000 Author: delphij Date: Fri Dec 5 23:50:16 2014 New Revision: 275533 URL: https://svnweb.freebsd.org/changeset/base/275533 Log: 5100 sparc build failed after 5004 Reviewed by: Garrett D'Amore Reviewed by: Gary Mills Approved by: Robert Mustacchi Author: Igor Kozhukhov illumos/illuoms-gate@6481fd49a4385db15285ddf89f9c80b45eaaa407 Modified: vendor-sys/illumos/dist/uts/common/sys/cpuvar.h Modified: vendor-sys/illumos/dist/uts/common/sys/cpuvar.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/sys/cpuvar.h Fri Dec 5 23:43:15 2014 (r275532) +++ vendor-sys/illumos/dist/uts/common/sys/cpuvar.h Fri Dec 5 23:50:16 2014 (r275533) @@ -22,6 +22,7 @@ /* * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright 2014 Igor Kozhukhov . */ #ifndef _SYS_CPUVAR_H @@ -32,6 +33,7 @@ #include #include +#include #if (defined(_KERNEL) || defined(_KMEMUSER)) && defined(_MACHDEP) #include #endif @@ -53,15 +55,6 @@ extern "C" { struct squeue_set_s; #define CPU_CACHE_COHERENCE_SIZE 64 -#define S_LOADAVG_SZ 11 -#define S_MOVAVG_SZ 10 - -struct loadavg_s { - int lg_cur; /* current loadavg entry */ - unsigned int lg_len; /* number entries recorded */ - hrtime_t lg_total; /* used to temporarily hold load totals */ - hrtime_t lg_loads[S_LOADAVG_SZ]; /* table of recorded entries */ -}; /* * For fast event tracing. From owner-svn-src-vendor@FreeBSD.ORG Fri Dec 5 23:51:21 2014 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 52BE4D7A; Fri, 5 Dec 2014 23:51:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 3F318AE3; Fri, 5 Dec 2014 23:51:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sB5NpL6f017985; Fri, 5 Dec 2014 23:51:21 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sB5NpLsN017984; Fri, 5 Dec 2014 23:51:21 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201412052351.sB5NpLsN017984@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 5 Dec 2014 23:51:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r275534 - vendor-sys/illumos/dist/uts/common/sys X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Dec 2014 23:51:21 -0000 Author: delphij Date: Fri Dec 5 23:51:20 2014 New Revision: 275534 URL: https://svnweb.freebsd.org/changeset/base/275534 Log: 5285 pass in cpu_pause_func via pause_cpus Reviewed by: Robert Mustacchi Reviewed by: Dan McDonald Approved by: Gordon Ross Author: Josef 'Jeff' Sipek illumos/illumos-gate@0ed5c46e82c989cfa9726d9dae452e3d24ef83be Modified: vendor-sys/illumos/dist/uts/common/sys/cpuvar.h Modified: vendor-sys/illumos/dist/uts/common/sys/cpuvar.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/sys/cpuvar.h Fri Dec 5 23:50:16 2014 (r275533) +++ vendor-sys/illumos/dist/uts/common/sys/cpuvar.h Fri Dec 5 23:51:20 2014 (r275534) @@ -652,7 +652,7 @@ void poke_cpu(int cpun); /* interrupt a void mach_cpu_pause(volatile char *); -void pause_cpus(cpu_t *off_cp); +void pause_cpus(cpu_t *off_cp, void *(*func)(void *)); void start_cpus(void); int cpus_paused(void); From owner-svn-src-vendor@FreeBSD.ORG Fri Dec 5 23:55:46 2014 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 21D5FF0A; Fri, 5 Dec 2014 23:55:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 0D834BB4; Fri, 5 Dec 2014 23:55:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sB5NtjYx018534; Fri, 5 Dec 2014 23:55:45 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sB5NtjuD018528; Fri, 5 Dec 2014 23:55:45 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201412052355.sB5NtjuD018528@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 5 Dec 2014 23:55:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r275535 - in vendor-sys/illumos/dist/uts/common: dtrace fs/zfs X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Dec 2014 23:55:46 -0000 Author: delphij Date: Fri Dec 5 23:55:44 2014 New Revision: 275535 URL: https://svnweb.freebsd.org/changeset/base/275535 Log: 5255 uts shouldn't open-code ISP2 Reviewed by: Marcel Telka Reviewed by: Dan McDonald Approved by: Robert Mustacchi Author: Josef 'Jeff' Sipek illumos/illumos-gate@de710d24d2fae4468e64da999e1d952a247f142c Modified: vendor-sys/illumos/dist/uts/common/dtrace/dtrace.c vendor-sys/illumos/dist/uts/common/dtrace/fasttrap.c vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c Modified: vendor-sys/illumos/dist/uts/common/dtrace/dtrace.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/dtrace/dtrace.c Fri Dec 5 23:51:20 2014 (r275534) +++ vendor-sys/illumos/dist/uts/common/dtrace/dtrace.c Fri Dec 5 23:55:44 2014 (r275535) @@ -139,7 +139,7 @@ dtrace_optval_t dtrace_ustackframes_defa dtrace_optval_t dtrace_jstackframes_default = 50; dtrace_optval_t dtrace_jstackstrsize_default = 512; int dtrace_msgdsize_max = 128; -hrtime_t dtrace_chill_max = 500 * (NANOSEC / MILLISEC); /* 500 ms */ +hrtime_t dtrace_chill_max = MSEC2NSEC(500); /* 500 ms */ hrtime_t dtrace_chill_interval = NANOSEC; /* 1000 ms */ int dtrace_devdepth_max = 32; int dtrace_err_verbose; @@ -13039,7 +13039,7 @@ dtrace_dof_slurp(dof_hdr_t *dof, dtrace_ if (!(sec->dofs_flags & DOF_SECF_LOAD)) continue; /* just ignore non-loadable sections */ - if (sec->dofs_align & (sec->dofs_align - 1)) { + if (!ISP2(sec->dofs_align)) { dtrace_dof_error(dof, "bad section alignment"); return (-1); } Modified: vendor-sys/illumos/dist/uts/common/dtrace/fasttrap.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/dtrace/fasttrap.c Fri Dec 5 23:51:20 2014 (r275534) +++ vendor-sys/illumos/dist/uts/common/dtrace/fasttrap.c Fri Dec 5 23:55:44 2014 (r275535) @@ -2156,7 +2156,7 @@ fasttrap_attach(dev_info_t *devi, ddi_at if (nent == 0 || nent > 0x1000000) nent = FASTTRAP_TPOINTS_DEFAULT_SIZE; - if ((nent & (nent - 1)) == 0) + if (ISP2(nent)) fasttrap_tpoints.fth_nent = nent; else fasttrap_tpoints.fth_nent = 1 << fasttrap_highbit(nent); @@ -2169,7 +2169,7 @@ fasttrap_attach(dev_info_t *devi, ddi_at * ... and the providers hash table... */ nent = FASTTRAP_PROVIDERS_DEFAULT_SIZE; - if ((nent & (nent - 1)) == 0) + if (ISP2(nent)) fasttrap_provs.fth_nent = nent; else fasttrap_provs.fth_nent = 1 << fasttrap_highbit(nent); @@ -2182,7 +2182,7 @@ fasttrap_attach(dev_info_t *devi, ddi_at * ... and the procs hash table. */ nent = FASTTRAP_PROCS_DEFAULT_SIZE; - if ((nent & (nent - 1)) == 0) + if (ISP2(nent)) fasttrap_procs.fth_nent = nent; else fasttrap_procs.fth_nent = 1 << fasttrap_highbit(nent); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c Fri Dec 5 23:51:20 2014 (r275534) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c Fri Dec 5 23:55:44 2014 (r275535) @@ -24,6 +24,7 @@ * Copyright (c) 2011 Nexenta Systems, Inc. All rights reserved. */ +#include #include #include #include @@ -121,7 +122,7 @@ zio_init(void) size_t align = 0; size_t cflags = (size > zio_buf_debug_limit) ? KMC_NODEBUG : 0; - while (p2 & (p2 - 1)) + while (!ISP2(p2)) p2 &= p2 - 1; #ifndef _KERNEL From owner-svn-src-vendor@FreeBSD.ORG Sat Dec 6 00:01:20 2014 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C56E826A; Sat, 6 Dec 2014 00:01:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 B1C5DC84; Sat, 6 Dec 2014 00:01:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sB601Kir021401; Sat, 6 Dec 2014 00:01:20 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sB601Kt9021400; Sat, 6 Dec 2014 00:01:20 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201412060001.sB601Kt9021400@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 6 Dec 2014 00:01:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r275536 - vendor/illumos/dist/tools/ctf/cvt X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Dec 2014 00:01:20 -0000 Author: delphij Date: Sat Dec 6 00:01:19 2014 New Revision: 275536 URL: https://svnweb.freebsd.org/changeset/base/275536 Log: 3363 Mark non-returning functions in ctftools Reviewed by: Richard Lowe Reviewed by: Josef 'Jeff' Sipek Approved by: Albert Lee Author: Erik Cederstrand illumos/illumos-gate@a6bde1a23b60f140c7ed78df979c2e22b1ed9b2c Modified: vendor/illumos/dist/tools/ctf/cvt/ctftools.h Modified: vendor/illumos/dist/tools/ctf/cvt/ctftools.h ============================================================================== --- vendor/illumos/dist/tools/ctf/cvt/ctftools.h Fri Dec 5 23:55:44 2014 (r275535) +++ vendor/illumos/dist/tools/ctf/cvt/ctftools.h Sat Dec 6 00:01:19 2014 (r275536) @@ -26,8 +26,6 @@ #ifndef _CTFTOOLS_H #define _CTFTOOLS_H -#pragma ident "%Z%%M% %I% %E% SMI" - /* * Functions and data structures used in the manipulation of stabs and CTF data */ @@ -39,6 +37,8 @@ #include #include +#include + #ifdef __cplusplus extern "C" { #endif @@ -434,8 +434,8 @@ int streq(const char *, const char *); int findelfsecidx(Elf *, const char *, const char *); size_t elf_ptrsz(Elf *); char *mktmpname(const char *, const char *); -void terminate(char *, ...); -void aborterr(char *, ...); +void terminate(char *, ...) __NORETURN; +void aborterr(char *, ...) __NORETURN; void set_terminate_cleanup(void (*)()); void elfterminate(const char *, const char *, ...); void warning(char *, ...); From owner-svn-src-vendor@FreeBSD.ORG Sat Dec 6 00:10:48 2014 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6FE71539; Sat, 6 Dec 2014 00:10:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 5B8E3CF4; Sat, 6 Dec 2014 00:10:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sB60AmoR027501; Sat, 6 Dec 2014 00:10:48 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sB60Al3B027499; Sat, 6 Dec 2014 00:10:47 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201412060010.sB60Al3B027499@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 6 Dec 2014 00:10:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r275537 - in vendor/illumos/dist: cmd/zfs lib/libzfs/common X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Dec 2014 00:10:48 -0000 Author: delphij Date: Sat Dec 6 00:10:47 2014 New Revision: 275537 URL: https://svnweb.freebsd.org/changeset/base/275537 Log: 5316 allow smbadm join to use RPC Reviewed by: Bayard Bell Reviewed by: Dan McDonald Reviewed by: Thomas Keiser Reviewed by: Matthew Ahrens Approved by: Robert Mustacchi Author: Gordon Ross illumos/illumos-gate@1ed6b69a5ca1ca3ee5e9a4931f74e2237c7e1c9f Modified: vendor/illumos/dist/cmd/zfs/zfs_main.c vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c Modified: vendor/illumos/dist/cmd/zfs/zfs_main.c ============================================================================== --- vendor/illumos/dist/cmd/zfs/zfs_main.c Sat Dec 6 00:01:19 2014 (r275536) +++ vendor/illumos/dist/cmd/zfs/zfs_main.c Sat Dec 6 00:10:47 2014 (r275537) @@ -63,6 +63,7 @@ #include #include #include +#include #include "zfs_iter.h" #include "zfs_util.h" @@ -2372,9 +2373,8 @@ userspace_cb(void *arg, const char *doma /* SMB */ char sid[ZFS_MAXNAMELEN + 32]; uid_t id; - uint64_t classes; int err; - directory_error_t e; + int flag = IDMAP_REQ_FLG_USE_CACHE; smbentity = B_TRUE; @@ -2391,10 +2391,13 @@ userspace_cb(void *arg, const char *doma if (err == 0) { rid = id; if (!cb->cb_sid2posix) { - e = directory_name_from_sid(NULL, sid, &name, - &classes); - if (e != NULL) - directory_error_free(e); + if (type == USTYPE_SMB_USR) { + (void) idmap_getwinnamebyuid(rid, flag, + &name, NULL); + } else { + (void) idmap_getwinnamebygid(rid, flag, + &name, NULL); + } if (name == NULL) name = sid; } Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c Sat Dec 6 00:01:19 2014 (r275536) +++ vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c Sat Dec 6 00:10:47 2014 (r275537) @@ -2557,7 +2557,7 @@ userquota_propname_decode(const char *pr boolean_t isuser; domain[0] = '\0'; - + *ridp = 0; /* Figure out the property type ({user|group}{quota|space}) */ for (type = 0; type < ZFS_NUM_USERQUOTA_PROPS; type++) { if (strncmp(propname, zfs_userquota_prop_prefixes[type], @@ -2578,35 +2578,61 @@ userquota_propname_decode(const char *pr * It's a SID name (eg "user@domain") that needs to be * turned into S-1-domainID-RID. */ - directory_error_t e; + int flag = 0; + idmap_stat stat, map_stat; + uid_t pid; + idmap_rid_t rid; + idmap_get_handle_t *gh = NULL; + + stat = idmap_get_create(&gh); + if (stat != IDMAP_SUCCESS) { + idmap_get_destroy(gh); + return (ENOMEM); + } if (zoned && getzoneid() == GLOBAL_ZONEID) return (ENOENT); if (isuser) { - e = directory_sid_from_user_name(NULL, - cp, &numericsid); + stat = idmap_getuidbywinname(cp, NULL, flag, &pid); + if (stat < 0) + return (ENOENT); + stat = idmap_get_sidbyuid(gh, pid, flag, &numericsid, + &rid, &map_stat); } else { - e = directory_sid_from_group_name(NULL, - cp, &numericsid); + stat = idmap_getgidbywinname(cp, NULL, flag, &pid); + if (stat < 0) + return (ENOENT); + stat = idmap_get_sidbygid(gh, pid, flag, &numericsid, + &rid, &map_stat); + } + if (stat < 0) { + idmap_get_destroy(gh); + return (ENOENT); } - if (e != NULL) { - directory_error_free(e); + stat = idmap_get_mappings(gh); + idmap_get_destroy(gh); + + if (stat < 0) { return (ENOENT); } if (numericsid == NULL) return (ENOENT); cp = numericsid; + *ridp = rid; /* will be further decoded below */ } if (strncmp(cp, "S-1-", 4) == 0) { /* It's a numeric SID (eg "S-1-234-567-89") */ (void) strlcpy(domain, cp, domainlen); - cp = strrchr(domain, '-'); - *cp = '\0'; - cp++; - errno = 0; - *ridp = strtoull(cp, &end, 10); + if (*ridp == 0) { + cp = strrchr(domain, '-'); + *cp = '\0'; + cp++; + *ridp = strtoull(cp, &end, 10); + } else { + end = ""; + } if (numericsid) { free(numericsid); numericsid = NULL; From owner-svn-src-vendor@FreeBSD.ORG Sat Dec 6 00:12:59 2014 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8293C680; Sat, 6 Dec 2014 00:12:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 54AB1D9B; Sat, 6 Dec 2014 00:12:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sB60Cxh5028934; Sat, 6 Dec 2014 00:12:59 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sB60CwjI028928; Sat, 6 Dec 2014 00:12:58 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201412060012.sB60CwjI028928@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 6 Dec 2014 00:12:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r275538 - in vendor-sys/illumos/dist/uts/common/fs/zfs: . sys X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Dec 2014 00:12:59 -0000 Author: delphij Date: Sat Dec 6 00:12:58 2014 New Revision: 275538 URL: https://svnweb.freebsd.org/changeset/base/275538 Log: 5179 Remove unused ZFS ARC functions Reviewed by: Josef 'Jeff' Sipek Reviewed by: Steve Gonczi Reviewed by: Matthew Ahrens Reviewed by: Richard Elling Reviewed by: George Wilson Approved by: Richard Lowe Author: Serapheim Dimitropoulos illumos/illumos-gate@fbefb14f62976763eeaa74a0c1ac68accb38cf44 Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/arc.h Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c Sat Dec 6 00:10:47 2014 (r275537) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c Sat Dec 6 00:12:58 2014 (r275538) @@ -1310,23 +1310,6 @@ arc_space_return(uint64_t space, arc_spa atomic_add_64(&arc_size, -space); } -void * -arc_data_buf_alloc(uint64_t size) -{ - if (arc_evict_needed(ARC_BUFC_DATA)) - cv_signal(&arc_reclaim_thr_cv); - atomic_add_64(&arc_size, size); - return (zio_data_buf_alloc(size)); -} - -void -arc_data_buf_free(void *buf, uint64_t size) -{ - zio_data_buf_free(buf, size); - ASSERT(arc_size >= size); - atomic_add_64(&arc_size, -size); -} - arc_buf_t * arc_buf_alloc(spa_t *spa, int size, void *tag, arc_buf_contents_t type) { Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/arc.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/arc.h Sat Dec 6 00:10:47 2014 (r275537) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/arc.h Sat Dec 6 00:12:58 2014 (r275538) @@ -83,8 +83,6 @@ typedef enum arc_space_type { void arc_space_consume(uint64_t space, arc_space_type_t type); void arc_space_return(uint64_t space, arc_space_type_t type); -void *arc_data_buf_alloc(uint64_t space); -void arc_data_buf_free(void *buf, uint64_t space); arc_buf_t *arc_buf_alloc(spa_t *spa, int size, void *tag, arc_buf_contents_t type); arc_buf_t *arc_loan_buf(spa_t *spa, int size); From owner-svn-src-vendor@FreeBSD.ORG Sat Dec 6 00:14:39 2014 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DDAC990A; Sat, 6 Dec 2014 00:14:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 BFD37DAF; Sat, 6 Dec 2014 00:14:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sB60EdTg029265; Sat, 6 Dec 2014 00:14:39 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sB60Ed5P029262; Sat, 6 Dec 2014 00:14:39 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201412060014.sB60Ed5P029262@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 6 Dec 2014 00:14:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r275540 - in vendor-sys/illumos/dist/uts/common/fs/zfs: . sys X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Dec 2014 00:14:40 -0000 Author: delphij Date: Sat Dec 6 00:14:38 2014 New Revision: 275540 URL: https://svnweb.freebsd.org/changeset/base/275540 Log: 5213 panic in metaslab_init due to space_map_open returning ENXIO Reviewed by: Matthew Ahrens Reviewed by: George Wilson Reviewed by: Bayard Bell Reviewed by: Brian Behlendorf Reviewed by: Steven Hartland Approved by: Dan McDonald Author: Prakash Surya illumos/illumos-gate@1e9bd7ec42f2d3bf854c2da35310901194833267 Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/metaslab.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/metaslab.h vendor-sys/illumos/dist/uts/common/fs/zfs/vdev.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/metaslab.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/metaslab.c Sat Dec 6 00:13:56 2014 (r275539) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/metaslab.c Sat Dec 6 00:14:38 2014 (r275540) @@ -1208,28 +1208,36 @@ metaslab_unload(metaslab_t *msp) msp->ms_weight &= ~METASLAB_ACTIVE_MASK; } -metaslab_t * -metaslab_init(metaslab_group_t *mg, uint64_t id, uint64_t object, uint64_t txg) +int +metaslab_init(metaslab_group_t *mg, uint64_t id, uint64_t object, uint64_t txg, + metaslab_t **msp) { vdev_t *vd = mg->mg_vd; objset_t *mos = vd->vdev_spa->spa_meta_objset; - metaslab_t *msp; + metaslab_t *ms; + int error; - msp = kmem_zalloc(sizeof (metaslab_t), KM_SLEEP); - mutex_init(&msp->ms_lock, NULL, MUTEX_DEFAULT, NULL); - cv_init(&msp->ms_load_cv, NULL, CV_DEFAULT, NULL); - msp->ms_id = id; - msp->ms_start = id << vd->vdev_ms_shift; - msp->ms_size = 1ULL << vd->vdev_ms_shift; + ms = kmem_zalloc(sizeof (metaslab_t), KM_SLEEP); + mutex_init(&ms->ms_lock, NULL, MUTEX_DEFAULT, NULL); + cv_init(&ms->ms_load_cv, NULL, CV_DEFAULT, NULL); + ms->ms_id = id; + ms->ms_start = id << vd->vdev_ms_shift; + ms->ms_size = 1ULL << vd->vdev_ms_shift; /* * We only open space map objects that already exist. All others * will be opened when we finally allocate an object for it. */ if (object != 0) { - VERIFY0(space_map_open(&msp->ms_sm, mos, object, msp->ms_start, - msp->ms_size, vd->vdev_ashift, &msp->ms_lock)); - ASSERT(msp->ms_sm != NULL); + error = space_map_open(&ms->ms_sm, mos, object, ms->ms_start, + ms->ms_size, vd->vdev_ashift, &ms->ms_lock); + + if (error != 0) { + kmem_free(ms, sizeof (metaslab_t)); + return (error); + } + + ASSERT(ms->ms_sm != NULL); } /* @@ -1239,11 +1247,11 @@ metaslab_init(metaslab_group_t *mg, uint * addition of new space; and for debugging, it ensures that we'd * data fault on any attempt to use this metaslab before it's ready. */ - msp->ms_tree = range_tree_create(&metaslab_rt_ops, msp, &msp->ms_lock); - metaslab_group_add(mg, msp); + ms->ms_tree = range_tree_create(&metaslab_rt_ops, ms, &ms->ms_lock); + metaslab_group_add(mg, ms); - msp->ms_fragmentation = metaslab_fragmentation(msp); - msp->ms_ops = mg->mg_class->mc_ops; + ms->ms_fragmentation = metaslab_fragmentation(ms); + ms->ms_ops = mg->mg_class->mc_ops; /* * If we're opening an existing pool (txg == 0) or creating @@ -1252,25 +1260,27 @@ metaslab_init(metaslab_group_t *mg, uint * does not become available until after this txg has synced. */ if (txg <= TXG_INITIAL) - metaslab_sync_done(msp, 0); + metaslab_sync_done(ms, 0); /* * If metaslab_debug_load is set and we're initializing a metaslab * that has an allocated space_map object then load the its space * map so that can verify frees. */ - if (metaslab_debug_load && msp->ms_sm != NULL) { - mutex_enter(&msp->ms_lock); - VERIFY0(metaslab_load(msp)); - mutex_exit(&msp->ms_lock); + if (metaslab_debug_load && ms->ms_sm != NULL) { + mutex_enter(&ms->ms_lock); + VERIFY0(metaslab_load(ms)); + mutex_exit(&ms->ms_lock); } if (txg != 0) { vdev_dirty(vd, 0, NULL, txg); - vdev_dirty(vd, VDD_METASLAB, msp, txg); + vdev_dirty(vd, VDD_METASLAB, ms, txg); } - return (msp); + *msp = ms; + + return (0); } void Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/metaslab.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/metaslab.h Sat Dec 6 00:13:56 2014 (r275539) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/metaslab.h Sat Dec 6 00:14:38 2014 (r275540) @@ -42,8 +42,8 @@ typedef struct metaslab_ops { extern metaslab_ops_t *zfs_metaslab_ops; -metaslab_t *metaslab_init(metaslab_group_t *, uint64_t, - uint64_t, uint64_t); +int metaslab_init(metaslab_group_t *, uint64_t, uint64_t, uint64_t, + metaslab_t **); void metaslab_fini(metaslab_t *); void metaslab_load_wait(metaslab_t *); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/vdev.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/vdev.c Sat Dec 6 00:13:56 2014 (r275539) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/vdev.c Sat Dec 6 00:14:38 2014 (r275540) @@ -857,7 +857,11 @@ vdev_metaslab_init(vdev_t *vd, uint64_t if (error) return (error); } - vd->vdev_ms[m] = metaslab_init(vd->vdev_mg, m, object, txg); + + error = metaslab_init(vd->vdev_mg, m, object, txg, + &(vd->vdev_ms[m])); + if (error) + return (error); } if (txg == 0) From owner-svn-src-vendor@FreeBSD.ORG Sat Dec 6 00:17:26 2014 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4EBACA75; Sat, 6 Dec 2014 00:17:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 3B0A2DC8; Sat, 6 Dec 2014 00:17:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sB60HQa1029675; Sat, 6 Dec 2014 00:17:26 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sB60HQEb029674; Sat, 6 Dec 2014 00:17:26 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201412060017.sB60HQEb029674@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 6 Dec 2014 00:17:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r275541 - vendor/illumos/dist/lib/libzfs/common/sys X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Dec 2014 00:17:26 -0000 Author: delphij Date: Sat Dec 6 00:17:25 2014 New Revision: 275541 URL: https://svnweb.freebsd.org/changeset/base/275541 Log: 5312 libzfs should be decoupled from kernel's zfs_context.h Reviewed by: Matthew Ahrens Reviewed by: Will Andrews Reviewed by: Andriy Gapon Approved by: Dan McDonald Author: Justin T. Gibbs illumos/illumos-gate@587644a8567e6a9533f88401daa59cbd78c4632f Added: vendor/illumos/dist/lib/libzfs/common/sys/ vendor/illumos/dist/lib/libzfs/common/sys/zfs_context.h (contents, props changed) Added: vendor/illumos/dist/lib/libzfs/common/sys/zfs_context.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/illumos/dist/lib/libzfs/common/sys/zfs_context.h Sat Dec 6 00:17:25 2014 (r275541) @@ -0,0 +1,37 @@ +/* + * CDDL HEADER START + * + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + * + * CDDL HEADER END + */ +/* + * Copyright 2014 Spectra Logic Corporation. All rights reserved. + */ + +#ifndef _SYS_ZFS_CONTEXT_H +#define _SYS_ZFS_CONTEXT_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include +#include +#include +#include +#include + +#ifdef __cplusplus +} +#endif + +#endif /* _SYS_ZFS_CONTEXT_H */ From owner-svn-src-vendor@FreeBSD.ORG Sat Dec 6 00:18:54 2014 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A3B78D09; Sat, 6 Dec 2014 00:18:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 8F8B8DDE; Sat, 6 Dec 2014 00:18:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sB60IsSX030021; Sat, 6 Dec 2014 00:18:54 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sB60IsV6030020; Sat, 6 Dec 2014 00:18:54 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201412060018.sB60IsV6030020@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 6 Dec 2014 00:18:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r275542 - vendor-sys/illumos/dist/uts/common/fs/zfs X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Dec 2014 00:18:54 -0000 Author: delphij Date: Sat Dec 6 00:18:53 2014 New Revision: 275542 URL: https://svnweb.freebsd.org/changeset/base/275542 Log: 5311 traverse_dnode may report success when it should not Reviewed by: Matthew Ahrens Reviewed by: Andriy Gapon Reviewed by: Will Andrews Approved by: Dan McDonald Author: Justin T. Gibbs illumos/illumos-gate@2a89c2c59b7c2beb2373c14368cbe7e32af6ffc1 Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_traverse.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_traverse.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_traverse.c Sat Dec 6 00:17:25 2014 (r275541) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_traverse.c Sat Dec 6 00:18:53 2014 (r275542) @@ -429,7 +429,7 @@ traverse_dnode(traverse_data_t *td, cons break; } - if (dnp->dn_flags & DNODE_FLAG_SPILL_BLKPTR) { + if (err == 0 && dnp->dn_flags & DNODE_FLAG_SPILL_BLKPTR) { SET_BOOKMARK(&czb, objset, object, 0, DMU_SPILL_BLKID); err = traverse_visitbp(td, dnp, &dnp->dn_spill, &czb); } From owner-svn-src-vendor@FreeBSD.ORG Sat Dec 6 00:31:59 2014 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 50CD9FC1; Sat, 6 Dec 2014 00:31:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 334F2F6D; Sat, 6 Dec 2014 00:31:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sB60Vxeu038469; Sat, 6 Dec 2014 00:31:59 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sB60VwKi038467; Sat, 6 Dec 2014 00:31:58 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201412060031.sB60VwKi038467@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 6 Dec 2014 00:31:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r275543 - vendor-sys/illumos/dist/uts/common/fs/zfs X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Dec 2014 00:31:59 -0000 Author: delphij Date: Sat Dec 6 00:31:58 2014 New Revision: 275543 URL: https://svnweb.freebsd.org/changeset/base/275543 Log: 5310 Remove always true tests for non-NULL ds->ds_phys Reviewed by: Matthew Ahrens Reviewed by: Will Andrews Reviewed by: Andriy Gapon Approved by: Dan McDonald Author: Justin T. Gibbs illumos/illumos-gate@d808a4fc6ac40e878a28e96f1ad7dd2ec439bfbf Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_prop.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c Sat Dec 6 00:18:53 2014 (r275542) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c Sat Dec 6 00:31:58 2014 (r275543) @@ -634,16 +634,14 @@ dsl_dataset_rele(dsl_dataset_t *ds, void void dsl_dataset_disown(dsl_dataset_t *ds, void *tag) { - ASSERT(ds->ds_owner == tag && ds->ds_dbuf != NULL); + ASSERT3P(ds->ds_owner, ==, tag); + ASSERT(ds->ds_dbuf != NULL); mutex_enter(&ds->ds_lock); ds->ds_owner = NULL; mutex_exit(&ds->ds_lock); dsl_dataset_long_rele(ds, tag); - if (ds->ds_dbuf != NULL) - dsl_dataset_rele(ds, tag); - else - dsl_dataset_evict(NULL, ds); + dsl_dataset_rele(ds, tag); } boolean_t Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_prop.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_prop.c Sat Dec 6 00:18:53 2014 (r275542) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_prop.c Sat Dec 6 00:31:58 2014 (r275543) @@ -168,8 +168,8 @@ dsl_prop_get_ds(dsl_dataset_t *ds, const ASSERT(dsl_pool_config_held(ds->ds_dir->dd_pool)); inheritable = (prop == ZPROP_INVAL || zfs_prop_inheritable(prop)); - snapshot = (ds->ds_phys != NULL && dsl_dataset_is_snapshot(ds)); - zapobj = (ds->ds_phys == NULL ? 0 : ds->ds_phys->ds_props_obj); + snapshot = dsl_dataset_is_snapshot(ds); + zapobj = ds->ds_phys->ds_props_obj; if (zapobj != 0) { objset_t *mos = ds->ds_dir->dd_pool->dp_meta_objset; @@ -544,7 +544,7 @@ dsl_prop_set_sync_impl(dsl_dataset_t *ds isint = (dodefault(propname, 8, 1, &intval) == 0); - if (ds->ds_phys != NULL && dsl_dataset_is_snapshot(ds)) { + if (dsl_dataset_is_snapshot(ds)) { ASSERT(version >= SPA_VERSION_SNAP_PROPS); if (ds->ds_phys->ds_props_obj == 0) { dmu_buf_will_dirty(ds->ds_dbuf, tx); @@ -641,7 +641,7 @@ dsl_prop_set_sync_impl(dsl_dataset_t *ds if (isint) { VERIFY0(dsl_prop_get_int_ds(ds, propname, &intval)); - if (ds->ds_phys != NULL && dsl_dataset_is_snapshot(ds)) { + if (dsl_dataset_is_snapshot(ds)) { dsl_prop_cb_record_t *cbr; /* * It's a snapshot; nothing can inherit this From owner-svn-src-vendor@FreeBSD.ORG Sat Dec 6 00:33:10 2014 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 97CE7171; Sat, 6 Dec 2014 00:33:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 83C81F73; Sat, 6 Dec 2014 00:33:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sB60XAmZ038680; Sat, 6 Dec 2014 00:33:10 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sB60XAua038679; Sat, 6 Dec 2014 00:33:10 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201412060033.sB60XAua038679@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 6 Dec 2014 00:33:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r275544 - vendor-sys/illumos/dist/uts/common/fs/zfs X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Dec 2014 00:33:10 -0000 Author: delphij Date: Sat Dec 6 00:33:09 2014 New Revision: 275544 URL: https://svnweb.freebsd.org/changeset/base/275544 Log: 5350 clean up code in dnode_sync() Reviewed by: Alex Reece Reviewed by: Christopher Siden Reviewed by: George Wilson Reviewed by: Richard Elling Approved by: Dan McDonald Author: Matthew Ahrens illumos/illumos-gate@e6518318428d2be1962bf2d47fd83ebfe8cb2736 Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dnode_sync.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dnode_sync.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dnode_sync.c Sat Dec 6 00:31:58 2014 (r275543) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dnode_sync.c Sat Dec 6 00:33:09 2014 (r275544) @@ -633,12 +633,11 @@ dnode_sync(dnode_t *dn, dmu_tx_t *tx) dn->dn_free_txg <= tx->tx_txg; /* - * We will either remove a spill block when a file is being removed - * or we have been asked to remove it. + * Remove the spill block if we have been explicitly asked to + * remove it, or if the object is being removed. */ - if (dn->dn_rm_spillblk[txgoff] || - ((dnp->dn_flags & DNODE_FLAG_SPILL_BLKPTR) && freeing_dnode)) { - if ((dnp->dn_flags & DNODE_FLAG_SPILL_BLKPTR)) + if (dn->dn_rm_spillblk[txgoff] || freeing_dnode) { + if (dnp->dn_flags & DNODE_FLAG_SPILL_BLKPTR) kill_spill = B_TRUE; dn->dn_rm_spillblk[txgoff] = 0; } From owner-svn-src-vendor@FreeBSD.ORG Sat Dec 6 00:34:26 2014 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 959742AB; Sat, 6 Dec 2014 00:34:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 81B36F83; Sat, 6 Dec 2014 00:34:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sB60YQs5038874; Sat, 6 Dec 2014 00:34:26 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sB60YQDA038873; Sat, 6 Dec 2014 00:34:26 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201412060034.sB60YQDA038873@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 6 Dec 2014 00:34:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r275545 - vendor-sys/illumos/dist/uts/common/fs/zfs X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Dec 2014 00:34:26 -0000 Author: delphij Date: Sat Dec 6 00:34:25 2014 New Revision: 275545 URL: https://svnweb.freebsd.org/changeset/base/275545 Log: 5348 zio_checksum_error() only fills in info if ECKSUM Reviewed by: Alex Reece Reviewed by: Christopher Siden Reviewed by: George Wilson Reviewed by: Steven Hartland Approved by: Dan McDonald Author: Matthew Ahrens illumos/illumos-gate@373dc1cf9a4e0791397a9b268cdac1f664af58a8 Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c Sat Dec 6 00:33:09 2014 (r275544) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c Sat Dec 6 00:34:25 2014 (r275545) @@ -2817,7 +2817,8 @@ zio_checksum_verify(zio_t *zio) if ((error = zio_checksum_error(zio, &info)) != 0) { zio->io_error = error; - if (!(zio->io_flags & ZIO_FLAG_SPECULATIVE)) { + if (error == ECKSUM && + !(zio->io_flags & ZIO_FLAG_SPECULATIVE)) { zfs_ereport_start_checksum(zio->io_spa, zio->io_vd, zio, zio->io_offset, zio->io_size, NULL, &info); From owner-svn-src-vendor@FreeBSD.ORG Sat Dec 6 00:37:01 2014 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B6849419; Sat, 6 Dec 2014 00:37:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 9860FFA4; Sat, 6 Dec 2014 00:37:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sB60b1vi039252; Sat, 6 Dec 2014 00:37:01 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sB60b14j039251; Sat, 6 Dec 2014 00:37:01 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201412060037.sB60b14j039251@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 6 Dec 2014 00:37:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r275546 - vendor-sys/illumos/dist/uts/common/fs/zfs X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Dec 2014 00:37:01 -0000 Author: delphij Date: Sat Dec 6 00:37:00 2014 New Revision: 275546 URL: https://svnweb.freebsd.org/changeset/base/275546 Log: 5351 scrub goes for an extra second each txg 5352 scrub should pause when there is some dirty data Reviewed by: Alex Reece Reviewed by: Christopher Siden Reviewed by: George Wilson Reviewed by: Richard Elling Approved by: Dan McDonald Author: Matthew Ahrens illumos/illumos-gate@6f6a76adacda33b10633476dc6c5d66d7f17dd94 Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.c Sat Dec 6 00:34:25 2014 (r275545) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.c Sat Dec 6 00:37:00 2014 (r275546) @@ -389,12 +389,11 @@ dsl_scan_sync_state(dsl_scan_t *scn, dmu &scn->scn_phys, tx)); } +extern int zfs_vdev_async_write_active_min_dirty_percent; + static boolean_t dsl_scan_check_pause(dsl_scan_t *scn, const zbookmark_phys_t *zb) { - uint64_t elapsed_nanosecs; - int mintime; - /* we never skip user/group accounting objects */ if (zb && (int64_t)zb->zb_object < 0) return (B_FALSE); @@ -409,12 +408,28 @@ dsl_scan_check_pause(dsl_scan_t *scn, co if (zb && zb->zb_level != 0) return (B_FALSE); - mintime = (scn->scn_phys.scn_func == POOL_SCAN_RESILVER) ? + /* + * We pause if: + * - we have scanned for the maximum time: an entire txg + * timeout (default 5 sec) + * or + * - we have scanned for at least the minimum time (default 1 sec + * for scrub, 3 sec for resilver), and either we have sufficient + * dirty data that we are starting to write more quickly + * (default 30%), or someone is explicitly waiting for this txg + * to complete. + * or + * - the spa is shutting down because this pool is being exported + * or the machine is rebooting. + */ + int mintime = (scn->scn_phys.scn_func == POOL_SCAN_RESILVER) ? zfs_resilver_min_time_ms : zfs_scan_min_time_ms; - elapsed_nanosecs = gethrtime() - scn->scn_sync_start_time; - if (elapsed_nanosecs / NANOSEC > zfs_txg_timeout || + uint64_t elapsed_nanosecs = gethrtime() - scn->scn_sync_start_time; + int dirty_pct = scn->scn_dp->dp_dirty_total * 100 / zfs_dirty_data_max; + if (elapsed_nanosecs / NANOSEC >= zfs_txg_timeout || (NSEC2MSEC(elapsed_nanosecs) > mintime && - txg_sync_waiting(scn->scn_dp)) || + (txg_sync_waiting(scn->scn_dp) || + dirty_pct >= zfs_vdev_async_write_active_min_dirty_percent)) || spa_shutting_down(scn->scn_dp->dp_spa)) { if (zb) { dprintf("pausing at bookmark %llx/%llx/%llx/%llx\n", From owner-svn-src-vendor@FreeBSD.ORG Sat Dec 6 00:38:56 2014 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DD6BE580; Sat, 6 Dec 2014 00:38:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 BE5BCFBE; Sat, 6 Dec 2014 00:38:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sB60cuAZ039495; Sat, 6 Dec 2014 00:38:56 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sB60cuq8039494; Sat, 6 Dec 2014 00:38:56 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201412060038.sB60cuq8039494@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 6 Dec 2014 00:38:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r275547 - vendor/illumos/dist/man/man1m X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Dec 2014 00:38:57 -0000 Author: delphij Date: Sat Dec 6 00:38:55 2014 New Revision: 275547 URL: https://svnweb.freebsd.org/changeset/base/275547 Log: 4181 zfs(1m): 'zfs allow' examples in the man page are outdated Reviewed by: Richard Lowe Reviewed by: Gordon Ross Reviewed by: Yuri Pankov Approved by: Dan McDonald Author: Marcel Telka illumos/illumos-gate@5619b3f84733e187bc34bca49abbec8bdfcd7d99 Modified: vendor/illumos/dist/man/man1m/zfs.1m Modified: vendor/illumos/dist/man/man1m/zfs.1m ============================================================================== --- vendor/illumos/dist/man/man1m/zfs.1m Sat Dec 6 00:37:00 2014 (r275546) +++ vendor/illumos/dist/man/man1m/zfs.1m Sat Dec 6 00:38:55 2014 (r275547) @@ -24,11 +24,11 @@ .\" Copyright 2011 Joshua M. Clulow .\" Copyright (c) 2014 by Delphix. All rights reserved. .\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved. -.\" Copyright 2013 Nexenta Systems, Inc. All Rights Reserved. .\" Copyright (c) 2014, Joyent, Inc. All rights reserved. .\" Copyright (c) 2014 by Adam Stevko. All rights reserved. +.\" Copyright 2014 Nexenta Systems, Inc. All Rights Reserved. .\" -.TH ZFS 1M "March 6, 2014" +.TH ZFS 1M "November 11, 2014" .SH NAME zfs \- configures ZFS file systems .SH SYNOPSIS @@ -4038,10 +4038,9 @@ permissions on \fBtank/cindys\fR are als .nf # \fBzfs allow cindys create,destroy,mount,snapshot tank/cindys\fR # \fBzfs allow tank/cindys\fR -------------------------------------------------------------- -Local+Descendent permissions on (tank/cindys) - user cindys create,destroy,mount,snapshot -------------------------------------------------------------- +---- Permissions on tank/cindys -------------------------------------- +Local+Descendent permissions: + user cindys create,destroy,mount,snapshot .fi .in -2 .sp @@ -4074,12 +4073,11 @@ The permissions on \fBtank/users\fR are # \fBzfs allow staff create,mount tank/users\fR # \fBzfs allow -c destroy tank/users\fR # \fBzfs allow tank/users\fR -------------------------------------------------------------- -Create time permissions on (tank/users) - create,destroy -Local+Descendent permissions on (tank/users) - group staff create,mount -------------------------------------------------------------- +---- Permissions on tank/users --------------------------------------- +Permission sets: + destroy +Local+Descendent permissions: + group staff create,mount .fi .in -2 .sp @@ -4098,14 +4096,11 @@ displayed. # \fBzfs allow -s @pset create,destroy,snapshot,mount tank/users\fR # \fBzfs allow staff @pset tank/users\fR # \fBzfs allow tank/users\fR -------------------------------------------------------------- -Permission sets on (tank/users) +---- Permissions on tank/users --------------------------------------- +Permission sets: @pset create,destroy,mount,snapshot -Create time permissions on (tank/users) - create,destroy -Local+Descendent permissions on (tank/users) - group staff @pset,create,mount -------------------------------------------------------------- +Local+Descendent permissions: + group staff @pset .fi .in -2 .sp @@ -4123,14 +4118,13 @@ also displayed. .nf # \fBzfs allow cindys quota,reservation users/home\fR # \fBzfs allow users/home\fR -------------------------------------------------------------- -Local+Descendent permissions on (users/home) +---- Permissions on users/home --------------------------------------- +Local+Descendent permissions: user cindys quota,reservation -------------------------------------------------------------- cindys% \fBzfs set quota=10G users/home/marks\fR cindys% \fBzfs get quota users/home/marks\fR -NAME PROPERTY VALUE SOURCE -users/home/marks quota 10G local +NAME PROPERTY VALUE SOURCE +users/home/marks quota 10G local .fi .in -2 .sp @@ -4148,14 +4142,11 @@ The following example shows how to remov .nf # \fBzfs unallow staff snapshot tank/users\fR # \fBzfs allow tank/users\fR -------------------------------------------------------------- -Permission sets on (tank/users) +---- Permissions on tank/users --------------------------------------- +Permission sets: @pset create,destroy,mount,snapshot -Create time permissions on (tank/users) - create,destroy -Local+Descendent permissions on (tank/users) - group staff @pset,create,mount -------------------------------------------------------------- +Local+Descendent permissions: + group staff @pset .fi .in -2 .sp From owner-svn-src-vendor@FreeBSD.ORG Sat Dec 6 00:42:32 2014 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E8DD3818; Sat, 6 Dec 2014 00:42:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 D4D80DC; Sat, 6 Dec 2014 00:42:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sB60gVrY043366; Sat, 6 Dec 2014 00:42:31 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sB60gVhW043364; Sat, 6 Dec 2014 00:42:31 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201412060042.sB60gVhW043364@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 6 Dec 2014 00:42:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r275548 - in vendor-sys/illumos/dist/uts/common/fs/zfs: . sys X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Dec 2014 00:42:32 -0000 Author: delphij Date: Sat Dec 6 00:42:30 2014 New Revision: 275548 URL: https://svnweb.freebsd.org/changeset/base/275548 Log: 5349 verify that block pointer is plausible before reading Reviewed by: Alex Reece Reviewed by: Christopher Siden Reviewed by: Dan McDonald Reviewed by: George Wilson Reviewed by: Richard Lowe Reviewed by: Xin Li Reviewed by: Josef 'Jeff' Sipek Approved by: Gordon Ross Author: Matthew Ahrens illumos/illumos-gate@f63ab3d5a84a12b474655fc7e700db3efba6c4c9 Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/spa.h vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/spa.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/spa.h Sat Dec 6 00:38:55 2014 (r275547) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/spa.h Sat Dec 6 00:42:30 2014 (r275548) @@ -791,6 +791,7 @@ extern boolean_t spa_is_root(spa_t *spa) extern boolean_t spa_writeable(spa_t *spa); extern boolean_t spa_has_pending_synctask(spa_t *spa); extern int spa_maxblocksize(spa_t *spa); +extern void zfs_blkptr_verify(spa_t *spa, const blkptr_t *bp); extern int spa_mode(spa_t *spa); extern uint64_t strtonum(const char *str, char **nptr); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c Sat Dec 6 00:38:55 2014 (r275547) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c Sat Dec 6 00:42:30 2014 (r275548) @@ -216,7 +216,7 @@ zio_buf_alloc(size_t size) { size_t c = (size - 1) >> SPA_MINBLOCKSHIFT; - ASSERT3U(c, <, SPA_MAXBLOCKSIZE >> SPA_MINBLOCKSHIFT); + VERIFY3U(c, <, SPA_MAXBLOCKSIZE >> SPA_MINBLOCKSHIFT); return (kmem_cache_alloc(zio_buf_cache[c], KM_PUSHPAGE)); } @@ -232,7 +232,7 @@ zio_data_buf_alloc(size_t size) { size_t c = (size - 1) >> SPA_MINBLOCKSHIFT; - ASSERT(c < SPA_MAXBLOCKSIZE >> SPA_MINBLOCKSHIFT); + VERIFY3U(c, <, SPA_MAXBLOCKSIZE >> SPA_MINBLOCKSHIFT); return (kmem_cache_alloc(zio_data_buf_cache[c], KM_PUSHPAGE)); } @@ -242,7 +242,7 @@ zio_buf_free(void *buf, size_t size) { size_t c = (size - 1) >> SPA_MINBLOCKSHIFT; - ASSERT(c < SPA_MAXBLOCKSIZE >> SPA_MINBLOCKSHIFT); + VERIFY3U(c, <, SPA_MAXBLOCKSIZE >> SPA_MINBLOCKSHIFT); kmem_cache_free(zio_buf_cache[c], buf); } @@ -252,7 +252,7 @@ zio_data_buf_free(void *buf, size_t size { size_t c = (size - 1) >> SPA_MINBLOCKSHIFT; - ASSERT(c < SPA_MAXBLOCKSIZE >> SPA_MINBLOCKSHIFT); + VERIFY3U(c, <, SPA_MAXBLOCKSIZE >> SPA_MINBLOCKSHIFT); kmem_cache_free(zio_data_buf_cache[c], buf); } @@ -596,6 +596,86 @@ zio_root(spa_t *spa, zio_done_func_t *do return (zio_null(NULL, spa, NULL, done, private, flags)); } +void +zfs_blkptr_verify(spa_t *spa, const blkptr_t *bp) +{ + if (!DMU_OT_IS_VALID(BP_GET_TYPE(bp))) { + zfs_panic_recover("blkptr at %p has invalid TYPE %llu", + bp, (longlong_t)BP_GET_TYPE(bp)); + } + if (BP_GET_CHECKSUM(bp) >= ZIO_CHECKSUM_FUNCTIONS || + BP_GET_CHECKSUM(bp) <= ZIO_CHECKSUM_ON) { + zfs_panic_recover("blkptr at %p has invalid CHECKSUM %llu", + bp, (longlong_t)BP_GET_CHECKSUM(bp)); + } + if (BP_GET_COMPRESS(bp) >= ZIO_COMPRESS_FUNCTIONS || + BP_GET_COMPRESS(bp) <= ZIO_COMPRESS_ON) { + zfs_panic_recover("blkptr at %p has invalid COMPRESS %llu", + bp, (longlong_t)BP_GET_COMPRESS(bp)); + } + if (BP_GET_LSIZE(bp) > SPA_MAXBLOCKSIZE) { + zfs_panic_recover("blkptr at %p has invalid LSIZE %llu", + bp, (longlong_t)BP_GET_LSIZE(bp)); + } + if (BP_GET_PSIZE(bp) > SPA_MAXBLOCKSIZE) { + zfs_panic_recover("blkptr at %p has invalid PSIZE %llu", + bp, (longlong_t)BP_GET_PSIZE(bp)); + } + + if (BP_IS_EMBEDDED(bp)) { + if (BPE_GET_ETYPE(bp) > NUM_BP_EMBEDDED_TYPES) { + zfs_panic_recover("blkptr at %p has invalid ETYPE %llu", + bp, (longlong_t)BPE_GET_ETYPE(bp)); + } + } + + /* + * Pool-specific checks. + * + * Note: it would be nice to verify that the blk_birth and + * BP_PHYSICAL_BIRTH() are not too large. However, spa_freeze() + * allows the birth time of log blocks (and dmu_sync()-ed blocks + * that are in the log) to be arbitrarily large. + */ + for (int i = 0; i < BP_GET_NDVAS(bp); i++) { + uint64_t vdevid = DVA_GET_VDEV(&bp->blk_dva[i]); + if (vdevid >= spa->spa_root_vdev->vdev_children) { + zfs_panic_recover("blkptr at %p DVA %u has invalid " + "VDEV %llu", + bp, i, (longlong_t)vdevid); + } + vdev_t *vd = spa->spa_root_vdev->vdev_child[vdevid]; + if (vd == NULL) { + zfs_panic_recover("blkptr at %p DVA %u has invalid " + "VDEV %llu", + bp, i, (longlong_t)vdevid); + } + if (vd->vdev_ops == &vdev_hole_ops) { + zfs_panic_recover("blkptr at %p DVA %u has hole " + "VDEV %llu", + bp, i, (longlong_t)vdevid); + + } + if (vd->vdev_ops == &vdev_missing_ops) { + /* + * "missing" vdevs are valid during import, but we + * don't have their detailed info (e.g. asize), so + * we can't perform any more checks on them. + */ + continue; + } + uint64_t offset = DVA_GET_OFFSET(&bp->blk_dva[i]); + uint64_t asize = DVA_GET_ASIZE(&bp->blk_dva[i]); + if (BP_IS_GANG(bp)) + asize = vdev_psize_to_asize(vd, SPA_GANGBLOCKSIZE); + if (offset + asize > vd->vdev_asize) { + zfs_panic_recover("blkptr at %p DVA %u has invalid " + "OFFSET %llu", + bp, i, (longlong_t)offset); + } + } +} + zio_t * zio_read(zio_t *pio, spa_t *spa, const blkptr_t *bp, void *data, uint64_t size, zio_done_func_t *done, void *private, @@ -603,6 +683,8 @@ zio_read(zio_t *pio, spa_t *spa, const b { zio_t *zio; + zfs_blkptr_verify(spa, bp); + zio = zio_create(pio, spa, BP_PHYSICAL_BIRTH(bp), bp, data, size, done, private, ZIO_TYPE_READ, priority, flags, NULL, 0, zb, From owner-svn-src-vendor@FreeBSD.ORG Sat Dec 6 00:45:27 2014 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D9DAC970; Sat, 6 Dec 2014 00:45:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 C6124FD; Sat, 6 Dec 2014 00:45:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sB60jRsV043822; Sat, 6 Dec 2014 00:45:27 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sB60jRql043821; Sat, 6 Dec 2014 00:45:27 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201412060045.sB60jRql043821@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 6 Dec 2014 00:45:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r275549 - vendor-sys/illumos/dist/uts/common/fs/zfs X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Dec 2014 00:45:28 -0000 Author: delphij Date: Sat Dec 6 00:45:27 2014 New Revision: 275549 URL: https://svnweb.freebsd.org/changeset/base/275549 Log: 5368 ARC should cache more metadata Reviewed by: Alex Reece Reviewed by: Christopher Siden Reviewed by: George Wilson Reviewed by: Richard Elling Approved by: Dan McDonald Author: Matthew Ahrens illumos/illumos-gate@3a5286a1cffceafcd8cf79c4156fad605129bf50 Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c Sat Dec 6 00:42:30 2014 (r275548) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c Sat Dec 6 00:45:27 2014 (r275549) @@ -196,6 +196,7 @@ static boolean_t arc_warm; uint64_t zfs_arc_max; uint64_t zfs_arc_min; uint64_t zfs_arc_meta_limit = 0; +uint64_t zfs_arc_meta_min = 0; int zfs_arc_grow_retry = 0; int zfs_arc_shrink_shift = 0; int zfs_arc_p_min_shift = 0; @@ -324,6 +325,7 @@ typedef struct arc_stats { kstat_named_t arcstat_meta_used; kstat_named_t arcstat_meta_limit; kstat_named_t arcstat_meta_max; + kstat_named_t arcstat_meta_min; } arc_stats_t; static arc_stats_t arc_stats = { @@ -389,7 +391,8 @@ static arc_stats_t arc_stats = { { "duplicate_reads", KSTAT_DATA_UINT64 }, { "arc_meta_used", KSTAT_DATA_UINT64 }, { "arc_meta_limit", KSTAT_DATA_UINT64 }, - { "arc_meta_max", KSTAT_DATA_UINT64 } + { "arc_meta_max", KSTAT_DATA_UINT64 }, + { "arc_meta_min", KSTAT_DATA_UINT64 } }; #define ARCSTAT(stat) (arc_stats.stat.value.ui64) @@ -452,6 +455,7 @@ static arc_state_t *arc_l2c_only; #define arc_c_min ARCSTAT(arcstat_c_min) /* min target cache size */ #define arc_c_max ARCSTAT(arcstat_c_max) /* max target cache size */ #define arc_meta_limit ARCSTAT(arcstat_meta_limit) /* max size for metadata */ +#define arc_meta_min ARCSTAT(arcstat_meta_min) /* min size for metadata */ #define arc_meta_used ARCSTAT(arcstat_meta_used) /* size of metadata */ #define arc_meta_max ARCSTAT(arcstat_meta_max) /* max size of metadata */ @@ -1779,7 +1783,6 @@ arc_evict(arc_state_t *state, uint64_t s arc_state_t *evicted_state; uint64_t bytes_evicted = 0, skipped = 0, missed = 0; arc_buf_hdr_t *ab, *ab_prev = NULL; - list_t *list = &state->arcs_list[type]; kmutex_t *hash_lock; boolean_t have_lock; void *stolen = NULL; @@ -1793,6 +1796,50 @@ arc_evict(arc_state_t *state, uint64_t s mutex_enter(&state->arcs_mtx); mutex_enter(&evicted_state->arcs_mtx); + /* + * Decide which "type" (data vs metadata) to recycle from. + * + * If we are over the metadata limit, recycle from metadata. + * If we are under the metadata minimum, recycle from data. + * Otherwise, recycle from whichever type has the oldest (least + * recently accessed) header. + */ + if (recycle) { + arc_buf_hdr_t *data_hdr = + list_tail(&state->arcs_list[ARC_BUFC_DATA]); + arc_buf_hdr_t *metadata_hdr = + list_tail(&state->arcs_list[ARC_BUFC_METADATA]); + arc_buf_contents_t realtype; + if (data_hdr == NULL) { + realtype = ARC_BUFC_METADATA; + } else if (metadata_hdr == NULL) { + realtype = ARC_BUFC_DATA; + } else if (arc_meta_used >= arc_meta_limit) { + realtype = ARC_BUFC_METADATA; + } else if (arc_meta_used <= arc_meta_min) { + realtype = ARC_BUFC_DATA; + } else { + if (data_hdr->b_arc_access < + metadata_hdr->b_arc_access) { + realtype = ARC_BUFC_DATA; + } else { + realtype = ARC_BUFC_METADATA; + } + } + if (realtype != type) { + /* + * If we want to evict from a different list, + * we can not recycle, because DATA vs METADATA + * buffers are segregated into different kmem + * caches (and vmem arenas). + */ + type = realtype; + recycle = B_FALSE; + } + } + + list_t *list = &state->arcs_list[type]; + for (ab = list_tail(list); ab; ab = ab_prev) { ab_prev = list_prev(list, ab); /* prefetch buffers have a minimum lifespan */ @@ -3755,6 +3802,12 @@ arc_init(void) if (arc_c_min < arc_meta_limit / 2 && zfs_arc_min == 0) arc_c_min = arc_meta_limit / 2; + if (zfs_arc_meta_min > 0) { + arc_meta_min = zfs_arc_meta_min; + } else { + arc_meta_min = arc_c_min / 2; + } + if (zfs_arc_grow_retry > 0) arc_grow_retry = zfs_arc_grow_retry; From owner-svn-src-vendor@FreeBSD.ORG Sat Dec 6 00:47:33 2014 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 91EC7AA4; Sat, 6 Dec 2014 00:47:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 7DB6810C; Sat, 6 Dec 2014 00:47:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sB60lX5j044117; Sat, 6 Dec 2014 00:47:33 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sB60lWuH044113; Sat, 6 Dec 2014 00:47:32 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201412060047.sB60lWuH044113@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 6 Dec 2014 00:47:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r275550 - in vendor-sys/illumos/dist/uts/common/fs/zfs: . sys X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Dec 2014 00:47:33 -0000 Author: delphij Date: Sat Dec 6 00:47:31 2014 New Revision: 275550 URL: https://svnweb.freebsd.org/changeset/base/275550 Log: 5347 idle pool may run itself out of space Reviewed by: Alex Reece Reviewed by: George Wilson Reviewed by: Steven Hartland Reviewed by: Richard Elling Approved by: Dan McDonald Author: Matthew Ahrens illumos/illumos-gate@231aab857f14a3e7a0ed5f2879399c3cd6ae92ea Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.c vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/uberblock.h vendor-sys/illumos/dist/uts/common/fs/zfs/uberblock.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.c Sat Dec 6 00:45:27 2014 (r275549) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.c Sat Dec 6 00:47:31 2014 (r275550) @@ -1449,13 +1449,6 @@ dsl_scan_sync(dsl_pool_t *dp, dmu_tx_t * "traverse_dataset_destroyed()", err); } - /* - * If we didn't make progress, mark the async destroy as - * stalled, so that we will not initiate a spa_sync() on - * its behalf. - */ - scn->scn_async_stalled = (scn->scn_visited_this_txg == 0); - if (bptree_is_empty(dp->dp_meta_objset, dp->dp_bptree_obj)) { /* finished; deactivate async destroy feature */ spa_feature_decr(spa, SPA_FEATURE_ASYNC_DESTROY, tx); @@ -1468,6 +1461,18 @@ dsl_scan_sync(dsl_pool_t *dp, dmu_tx_t * dp->dp_bptree_obj, tx)); dp->dp_bptree_obj = 0; scn->scn_async_destroying = B_FALSE; + scn->scn_async_stalled = B_FALSE; + } else { + /* + * If we didn't make progress, mark the async + * destroy as stalled, so that we will not initiate + * a spa_sync() on its behalf. Note that we only + * check this if we are not finished, because if the + * bptree had no blocks for us to visit, we can + * finish without "making progress". + */ + scn->scn_async_stalled = + (scn->scn_visited_this_txg == 0); } } if (scn->scn_visited_this_txg) { Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c Sat Dec 6 00:45:27 2014 (r275549) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c Sat Dec 6 00:47:31 2014 (r275550) @@ -6262,21 +6262,6 @@ spa_sync(spa_t *spa, uint64_t txg) } /* - * If anything has changed in this txg, or if someone is waiting - * for this txg to sync (eg, spa_vdev_remove()), push the - * deferred frees from the previous txg. If not, leave them - * alone so that we don't generate work on an otherwise idle - * system. - */ - if (!txg_list_empty(&dp->dp_dirty_datasets, txg) || - !txg_list_empty(&dp->dp_dirty_dirs, txg) || - !txg_list_empty(&dp->dp_sync_tasks, txg) || - ((dsl_scan_active(dp->dp_scan) || - txg_sync_waiting(dp)) && !spa_shutting_down(spa))) { - spa_sync_deferred_frees(spa, tx); - } - - /* * Iterate to convergence. */ do { @@ -6293,6 +6278,11 @@ spa_sync(spa_t *spa, uint64_t txg) if (pass < zfs_sync_pass_deferred_free) { spa_sync_frees(spa, free_bpl, tx); } else { + /* + * We can not defer frees in pass 1, because + * we sync the deferred frees later in pass 1. + */ + ASSERT3U(pass, >, 1); bplist_iterate(free_bpl, bpobj_enqueue_cb, &spa->spa_deferred_bpobj, tx); } @@ -6303,8 +6293,37 @@ spa_sync(spa_t *spa, uint64_t txg) while (vd = txg_list_remove(&spa->spa_vdev_txg_list, txg)) vdev_sync(vd, txg); - if (pass == 1) + if (pass == 1) { spa_sync_upgrades(spa, tx); + ASSERT3U(txg, >=, + spa->spa_uberblock.ub_rootbp.blk_birth); + /* + * Note: We need to check if the MOS is dirty + * because we could have marked the MOS dirty + * without updating the uberblock (e.g. if we + * have sync tasks but no dirty user data). We + * need to check the uberblock's rootbp because + * it is updated if we have synced out dirty + * data (though in this case the MOS will most + * likely also be dirty due to second order + * effects, we don't want to rely on that here). + */ + if (spa->spa_uberblock.ub_rootbp.blk_birth < txg && + !dmu_objset_is_dirty(mos, txg)) { + /* + * Nothing changed on the first pass, + * therefore this TXG is a no-op. Avoid + * syncing deferred frees, so that we + * can keep this TXG as a no-op. + */ + ASSERT(txg_list_empty(&dp->dp_dirty_datasets, + txg)); + ASSERT(txg_list_empty(&dp->dp_dirty_dirs, txg)); + ASSERT(txg_list_empty(&dp->dp_sync_tasks, txg)); + break; + } + spa_sync_deferred_frees(spa, tx); + } } while (dmu_objset_is_dirty(mos, txg)); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/uberblock.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/uberblock.h Sat Dec 6 00:45:27 2014 (r275549) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/uberblock.h Sat Dec 6 00:47:31 2014 (r275550) @@ -22,6 +22,9 @@ * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ +/* + * Copyright (c) 2014 by Delphix. All rights reserved. + */ #ifndef _SYS_UBERBLOCK_H #define _SYS_UBERBLOCK_H @@ -36,8 +39,8 @@ extern "C" { typedef struct uberblock uberblock_t; -extern int uberblock_verify(uberblock_t *ub); -extern int uberblock_update(uberblock_t *ub, vdev_t *rvd, uint64_t txg); +extern int uberblock_verify(uberblock_t *); +extern boolean_t uberblock_update(uberblock_t *, vdev_t *, uint64_t); #ifdef __cplusplus } Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/uberblock.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/uberblock.c Sat Dec 6 00:45:27 2014 (r275549) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/uberblock.c Sat Dec 6 00:47:31 2014 (r275550) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2013, 2014 by Delphix. All rights reserved. */ #include @@ -40,10 +40,10 @@ uberblock_verify(uberblock_t *ub) } /* - * Update the uberblock and return a boolean value indicating whether - * anything changed in this transaction group. + * Update the uberblock and return TRUE if anything changed in this + * transaction group. */ -int +boolean_t uberblock_update(uberblock_t *ub, vdev_t *rvd, uint64_t txg) { ASSERT(ub->ub_txg < txg); From owner-svn-src-vendor@FreeBSD.ORG Sat Dec 6 00:50:58 2014 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B1896C09; Sat, 6 Dec 2014 00:50:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 925381C1; Sat, 6 Dec 2014 00:50:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sB60owMo045853; Sat, 6 Dec 2014 00:50:58 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sB60owYO045852; Sat, 6 Dec 2014 00:50:58 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201412060050.sB60owYO045852@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 6 Dec 2014 00:50:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r275551 - vendor-sys/illumos/dist/uts/common/fs/zfs vendor-sys/illumos/dist/uts/common/fs/zfs/sys vendor/illumos/dist/cmd/zdb X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Dec 2014 00:50:58 -0000 Author: delphij Date: Sat Dec 6 00:50:57 2014 New Revision: 275551 URL: https://svnweb.freebsd.org/changeset/base/275551 Log: 5314 Remove "dbuf phys" db->db_data pointer aliases in ZFS Reviewed by: Andriy Gapon Reviewed by: Matthew Ahrens Reviewed by: Will Andrews Approved by: Dan McDonald Author: Justin T. Gibbs illumos/illumos-gate@c1379625401dfbe1c39b79136dd384a571d47fde Modified: vendor/illumos/dist/cmd/zdb/zdb.c Changes in other areas also in this revision: Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_diff.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_objset.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_traverse.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_tx.c vendor-sys/illumos/dist/uts/common/fs/zfs/dnode.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_bookmark.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_deadlist.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_deleg.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_destroy.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dir.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_pool.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_prop.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_synctask.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_userhold.c vendor-sys/illumos/dist/uts/common/fs/zfs/sa.c vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c vendor-sys/illumos/dist/uts/common/fs/zfs/spa_history.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dbuf.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_dataset.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_dir.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zap_impl.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zap_leaf.h vendor-sys/illumos/dist/uts/common/fs/zfs/zap.c vendor-sys/illumos/dist/uts/common/fs/zfs/zap_leaf.c vendor-sys/illumos/dist/uts/common/fs/zfs/zap_micro.c vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c Modified: vendor/illumos/dist/cmd/zdb/zdb.c ============================================================================== --- vendor/illumos/dist/cmd/zdb/zdb.c Sat Dec 6 00:47:31 2014 (r275550) +++ vendor/illumos/dist/cmd/zdb/zdb.c Sat Dec 6 00:50:57 2014 (r275551) @@ -1857,8 +1857,8 @@ dump_dir(objset_t *os) if (dds.dds_type == DMU_OST_META) { dds.dds_creation_txg = TXG_INITIAL; usedobjs = BP_GET_FILL(os->os_rootbp); - refdbytes = os->os_spa->spa_dsl_pool-> - dp_mos_dir->dd_phys->dd_used_bytes; + refdbytes = dsl_dir_phys(os->os_spa->spa_dsl_pool->dp_mos_dir)-> + dd_used_bytes; } else { dmu_objset_space(os, &refdbytes, &scratch, &usedobjs, &scratch); } From owner-svn-src-vendor@FreeBSD.ORG Sat Dec 6 00:51:01 2014 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 68F37CDF; Sat, 6 Dec 2014 00:51:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 53E3F1C3; Sat, 6 Dec 2014 00:51:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sB60p1UN046163; Sat, 6 Dec 2014 00:51:01 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sB60oxYu045859; Sat, 6 Dec 2014 00:50:59 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201412060050.sB60oxYu045859@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 6 Dec 2014 00:50:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r275551 - vendor-sys/illumos/dist/uts/common/fs/zfs vendor-sys/illumos/dist/uts/common/fs/zfs/sys vendor/illumos/dist/cmd/zdb X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Dec 2014 00:51:01 -0000 Author: delphij Date: Sat Dec 6 00:50:57 2014 New Revision: 275551 URL: https://svnweb.freebsd.org/changeset/base/275551 Log: 5314 Remove "dbuf phys" db->db_data pointer aliases in ZFS Reviewed by: Andriy Gapon Reviewed by: Matthew Ahrens Reviewed by: Will Andrews Approved by: Dan McDonald Author: Justin T. Gibbs illumos/illumos-gate@c1379625401dfbe1c39b79136dd384a571d47fde Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_diff.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_objset.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_traverse.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_tx.c vendor-sys/illumos/dist/uts/common/fs/zfs/dnode.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_bookmark.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_deadlist.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_deleg.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_destroy.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dir.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_pool.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_prop.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_synctask.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_userhold.c vendor-sys/illumos/dist/uts/common/fs/zfs/sa.c vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c vendor-sys/illumos/dist/uts/common/fs/zfs/spa_history.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dbuf.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_dataset.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_dir.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zap_impl.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zap_leaf.h vendor-sys/illumos/dist/uts/common/fs/zfs/zap.c vendor-sys/illumos/dist/uts/common/fs/zfs/zap_leaf.c vendor-sys/illumos/dist/uts/common/fs/zfs/zap_micro.c vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c Changes in other areas also in this revision: Modified: vendor/illumos/dist/cmd/zdb/zdb.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c Sat Dec 6 00:47:31 2014 (r275550) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c Sat Dec 6 00:50:57 2014 (r275551) @@ -223,11 +223,8 @@ dbuf_evict_user(dmu_buf_impl_t *db) if (db->db_level != 0 || db->db_evict_func == NULL) return; - if (db->db_user_data_ptr_ptr) - *db->db_user_data_ptr_ptr = db->db.db_data; db->db_evict_func(&db->db, db->db_user_ptr); db->db_user_ptr = NULL; - db->db_user_data_ptr_ptr = NULL; db->db_evict_func = NULL; } @@ -418,16 +415,6 @@ dbuf_verify(dmu_buf_impl_t *db) #endif static void -dbuf_update_data(dmu_buf_impl_t *db) -{ - ASSERT(MUTEX_HELD(&db->db_mtx)); - if (db->db_level == 0 && db->db_user_data_ptr_ptr) { - ASSERT(!refcount_is_zero(&db->db_holds)); - *db->db_user_data_ptr_ptr = db->db.db_data; - } -} - -static void dbuf_set_data(dmu_buf_impl_t *db, arc_buf_t *buf) { ASSERT(MUTEX_HELD(&db->db_mtx)); @@ -437,7 +424,6 @@ dbuf_set_data(dmu_buf_impl_t *db, arc_bu db->db.db_data = buf->b_data; if (!arc_released(buf)) arc_set_callback(buf, dbuf_do_evict, db); - dbuf_update_data(db); } else { dbuf_evict_user(db); db->db.db_data = NULL; @@ -543,7 +529,6 @@ dbuf_read_impl(dmu_buf_impl_t *db, zio_t if (bonuslen) bcopy(DN_BONUS(dn->dn_phys), db->db.db_data, bonuslen); DB_DNODE_EXIT(db); - dbuf_update_data(db); db->db_state = DB_CACHED; mutex_exit(&db->db_mtx); return; @@ -1726,7 +1711,6 @@ dbuf_create(dnode_t *dn, uint8_t level, db->db_blkptr = blkptr; db->db_user_ptr = NULL; - db->db_user_data_ptr_ptr = NULL; db->db_evict_func = NULL; db->db_immediate_evict = 0; db->db_freed_in_flight = 0; @@ -1971,7 +1955,6 @@ top: } (void) refcount_add(&db->db_holds, tag); - dbuf_update_data(db); DBUF_VERIFY(db); mutex_exit(&db->db_mtx); @@ -2182,27 +2165,25 @@ dbuf_refcount(dmu_buf_impl_t *db) } void * -dmu_buf_set_user(dmu_buf_t *db_fake, void *user_ptr, void *user_data_ptr_ptr, +dmu_buf_set_user(dmu_buf_t *db_fake, void *user_ptr, dmu_buf_evict_func_t *evict_func) { - return (dmu_buf_update_user(db_fake, NULL, user_ptr, - user_data_ptr_ptr, evict_func)); + return (dmu_buf_update_user(db_fake, NULL, user_ptr, evict_func)); } void * -dmu_buf_set_user_ie(dmu_buf_t *db_fake, void *user_ptr, void *user_data_ptr_ptr, +dmu_buf_set_user_ie(dmu_buf_t *db_fake, void *user_ptr, dmu_buf_evict_func_t *evict_func) { dmu_buf_impl_t *db = (dmu_buf_impl_t *)db_fake; db->db_immediate_evict = TRUE; - return (dmu_buf_update_user(db_fake, NULL, user_ptr, - user_data_ptr_ptr, evict_func)); + return (dmu_buf_update_user(db_fake, NULL, user_ptr, evict_func)); } void * dmu_buf_update_user(dmu_buf_t *db_fake, void *old_user_ptr, void *user_ptr, - void *user_data_ptr_ptr, dmu_buf_evict_func_t *evict_func) + dmu_buf_evict_func_t *evict_func) { dmu_buf_impl_t *db = (dmu_buf_impl_t *)db_fake; ASSERT(db->db_level == 0); @@ -2213,10 +2194,7 @@ dmu_buf_update_user(dmu_buf_t *db_fake, if (db->db_user_ptr == old_user_ptr) { db->db_user_ptr = user_ptr; - db->db_user_data_ptr_ptr = user_data_ptr_ptr; db->db_evict_func = evict_func; - - dbuf_update_data(db); } else { old_user_ptr = db->db_user_ptr; } Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_diff.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_diff.c Sat Dec 6 00:47:31 2014 (r275550) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_diff.c Sat Dec 6 00:50:57 2014 (r275551) @@ -194,7 +194,7 @@ dmu_diff(const char *tosnap_name, const return (SET_ERROR(EXDEV)); } - fromtxg = fromsnap->ds_phys->ds_creation_txg; + fromtxg = dsl_dataset_phys(fromsnap)->ds_creation_txg; dsl_dataset_rele(fromsnap, FTAG); dsl_dataset_long_hold(tosnap, FTAG); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_objset.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_objset.c Sat Dec 6 00:47:31 2014 (r275550) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_objset.c Sat Dec 6 00:50:57 2014 (r275551) @@ -1479,12 +1479,12 @@ dmu_snapshot_realname(objset_t *os, char dsl_dataset_t *ds = os->os_dsl_dataset; uint64_t ignored; - if (ds->ds_phys->ds_snapnames_zapobj == 0) + if (dsl_dataset_phys(ds)->ds_snapnames_zapobj == 0) return (SET_ERROR(ENOENT)); return (zap_lookup_norm(ds->ds_dir->dd_pool->dp_meta_objset, - ds->ds_phys->ds_snapnames_zapobj, name, 8, 1, &ignored, MT_FIRST, - real, maxlen, conflict)); + dsl_dataset_phys(ds)->ds_snapnames_zapobj, name, 8, 1, &ignored, + MT_FIRST, real, maxlen, conflict)); } int @@ -1497,12 +1497,12 @@ dmu_snapshot_list_next(objset_t *os, int ASSERT(dsl_pool_config_held(dmu_objset_pool(os))); - if (ds->ds_phys->ds_snapnames_zapobj == 0) + if (dsl_dataset_phys(ds)->ds_snapnames_zapobj == 0) return (SET_ERROR(ENOENT)); zap_cursor_init_serialized(&cursor, ds->ds_dir->dd_pool->dp_meta_objset, - ds->ds_phys->ds_snapnames_zapobj, *offp); + dsl_dataset_phys(ds)->ds_snapnames_zapobj, *offp); if (zap_cursor_retrieve(&cursor, &attr) != 0) { zap_cursor_fini(&cursor); @@ -1536,12 +1536,12 @@ dmu_dir_list_next(objset_t *os, int name /* there is no next dir on a snapshot! */ if (os->os_dsl_dataset->ds_object != - dd->dd_phys->dd_head_dataset_obj) + dsl_dir_phys(dd)->dd_head_dataset_obj) return (SET_ERROR(ENOENT)); zap_cursor_init_serialized(&cursor, dd->dd_pool->dp_meta_objset, - dd->dd_phys->dd_child_dir_zapobj, *offp); + dsl_dir_phys(dd)->dd_child_dir_zapobj, *offp); if (zap_cursor_retrieve(&cursor, &attr) != 0) { zap_cursor_fini(&cursor); @@ -1589,7 +1589,7 @@ dmu_objset_find_dp(dsl_pool_t *dp, uint6 return (0); } - thisobj = dd->dd_phys->dd_head_dataset_obj; + thisobj = dsl_dir_phys(dd)->dd_head_dataset_obj; attr = kmem_alloc(sizeof (zap_attribute_t), KM_SLEEP); /* @@ -1597,7 +1597,7 @@ dmu_objset_find_dp(dsl_pool_t *dp, uint6 */ if (flags & DS_FIND_CHILDREN) { for (zap_cursor_init(&zc, dp->dp_meta_objset, - dd->dd_phys->dd_child_dir_zapobj); + dsl_dir_phys(dd)->dd_child_dir_zapobj); zap_cursor_retrieve(&zc, attr) == 0; (void) zap_cursor_advance(&zc)) { ASSERT3U(attr->za_integer_length, ==, @@ -1626,7 +1626,9 @@ dmu_objset_find_dp(dsl_pool_t *dp, uint6 err = dsl_dataset_hold_obj(dp, thisobj, FTAG, &ds); if (err == 0) { - uint64_t snapobj = ds->ds_phys->ds_snapnames_zapobj; + uint64_t snapobj; + + snapobj = dsl_dataset_phys(ds)->ds_snapnames_zapobj; dsl_dataset_rele(ds, FTAG); for (zap_cursor_init(&zc, dp->dp_meta_objset, snapobj); @@ -1701,7 +1703,7 @@ dmu_objset_find_impl(spa_t *spa, const c return (0); } - thisobj = dd->dd_phys->dd_head_dataset_obj; + thisobj = dsl_dir_phys(dd)->dd_head_dataset_obj; attr = kmem_alloc(sizeof (zap_attribute_t), KM_SLEEP); /* @@ -1709,7 +1711,7 @@ dmu_objset_find_impl(spa_t *spa, const c */ if (flags & DS_FIND_CHILDREN) { for (zap_cursor_init(&zc, dp->dp_meta_objset, - dd->dd_phys->dd_child_dir_zapobj); + dsl_dir_phys(dd)->dd_child_dir_zapobj); zap_cursor_retrieve(&zc, attr) == 0; (void) zap_cursor_advance(&zc)) { ASSERT3U(attr->za_integer_length, ==, @@ -1742,7 +1744,9 @@ dmu_objset_find_impl(spa_t *spa, const c err = dsl_dataset_hold_obj(dp, thisobj, FTAG, &ds); if (err == 0) { - uint64_t snapobj = ds->ds_phys->ds_snapnames_zapobj; + uint64_t snapobj; + + snapobj = dsl_dataset_phys(ds)->ds_snapnames_zapobj; dsl_dataset_rele(ds, FTAG); for (zap_cursor_init(&zc, dp->dp_meta_objset, snapobj); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c Sat Dec 6 00:47:31 2014 (r275550) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c Sat Dec 6 00:50:57 2014 (r275551) @@ -598,12 +598,12 @@ dmu_send_impl(void *tag, dsl_pool_t *dp, featureflags); drr->drr_u.drr_begin.drr_creation_time = - ds->ds_phys->ds_creation_time; + dsl_dataset_phys(ds)->ds_creation_time; drr->drr_u.drr_begin.drr_type = dmu_objset_type(os); if (is_clone) drr->drr_u.drr_begin.drr_flags |= DRR_FLAG_CLONE; - drr->drr_u.drr_begin.drr_toguid = ds->ds_phys->ds_guid; - if (ds->ds_phys->ds_flags & DS_FLAG_CI_DATASET) + drr->drr_u.drr_begin.drr_toguid = dsl_dataset_phys(ds)->ds_guid; + if (dsl_dataset_phys(ds)->ds_flags & DS_FLAG_CI_DATASET) drr->drr_u.drr_begin.drr_flags |= DRR_FLAG_CI_DATA; if (fromzb != NULL) { @@ -624,7 +624,7 @@ dmu_send_impl(void *tag, dsl_pool_t *dp, dsp->dsa_proc = curproc; dsp->dsa_os = os; dsp->dsa_off = off; - dsp->dsa_toguid = ds->ds_phys->ds_guid; + dsp->dsa_toguid = dsl_dataset_phys(ds)->ds_guid; ZIO_SET_CHECKSUM(&dsp->dsa_zc, 0, 0, 0, 0); dsp->dsa_pending_op = PENDING_NONE; dsp->dsa_incremental = (fromzb != NULL); @@ -710,9 +710,10 @@ dmu_send_obj(const char *pool, uint64_t } if (!dsl_dataset_is_before(ds, fromds, 0)) err = SET_ERROR(EXDEV); - zb.zbm_creation_time = fromds->ds_phys->ds_creation_time; - zb.zbm_creation_txg = fromds->ds_phys->ds_creation_txg; - zb.zbm_guid = fromds->ds_phys->ds_guid; + zb.zbm_creation_time = + dsl_dataset_phys(fromds)->ds_creation_time; + zb.zbm_creation_txg = dsl_dataset_phys(fromds)->ds_creation_txg; + zb.zbm_guid = dsl_dataset_phys(fromds)->ds_guid; is_clone = (fromds->ds_dir != ds->ds_dir); dsl_dataset_rele(fromds, FTAG); err = dmu_send_impl(FTAG, dp, ds, &zb, is_clone, @@ -779,10 +780,10 @@ dmu_send(const char *tosnap, const char if (!dsl_dataset_is_before(ds, fromds, 0)) err = SET_ERROR(EXDEV); zb.zbm_creation_time = - fromds->ds_phys->ds_creation_time; + dsl_dataset_phys(fromds)->ds_creation_time; zb.zbm_creation_txg = - fromds->ds_phys->ds_creation_txg; - zb.zbm_guid = fromds->ds_phys->ds_guid; + dsl_dataset_phys(fromds)->ds_creation_txg; + zb.zbm_guid = dsl_dataset_phys(fromds)->ds_guid; is_clone = (ds->ds_dir != fromds->ds_dir); dsl_dataset_rele(fromds, FTAG); } @@ -829,7 +830,7 @@ dmu_send_estimate(dsl_dataset_t *ds, dsl /* Get uncompressed size estimate of changed data. */ if (fromds == NULL) { - size = ds->ds_phys->ds_uncompressed_bytes; + size = dsl_dataset_phys(ds)->ds_uncompressed_bytes; } else { uint64_t used, comp; err = dsl_dataset_space_written(fromds, ds, @@ -884,15 +885,15 @@ recv_begin_check_existing_impl(dmu_recv_ /* temporary clone name must not exist */ error = zap_lookup(dp->dp_meta_objset, - ds->ds_dir->dd_phys->dd_child_dir_zapobj, recv_clone_name, + dsl_dir_phys(ds->ds_dir)->dd_child_dir_zapobj, recv_clone_name, 8, 1, &val); if (error != ENOENT) return (error == 0 ? EBUSY : error); /* new snapshot name must not exist */ error = zap_lookup(dp->dp_meta_objset, - ds->ds_phys->ds_snapnames_zapobj, drba->drba_cookie->drc_tosnap, - 8, 1, &val); + dsl_dataset_phys(ds)->ds_snapnames_zapobj, + drba->drba_cookie->drc_tosnap, 8, 1, &val); if (error != ENOENT) return (error == 0 ? EEXIST : error); @@ -912,7 +913,7 @@ recv_begin_check_existing_impl(dmu_recv_ if (fromguid != 0) { dsl_dataset_t *snap; - uint64_t obj = ds->ds_phys->ds_prev_snap_obj; + uint64_t obj = dsl_dataset_phys(ds)->ds_prev_snap_obj; /* Find snapshot in this dir that matches fromguid. */ while (obj != 0) { @@ -924,9 +925,9 @@ recv_begin_check_existing_impl(dmu_recv_ dsl_dataset_rele(snap, FTAG); return (SET_ERROR(ENODEV)); } - if (snap->ds_phys->ds_guid == fromguid) + if (dsl_dataset_phys(snap)->ds_guid == fromguid) break; - obj = snap->ds_phys->ds_prev_snap_obj; + obj = dsl_dataset_phys(snap)->ds_prev_snap_obj; dsl_dataset_rele(snap, FTAG); } if (obj == 0) @@ -949,9 +950,9 @@ recv_begin_check_existing_impl(dmu_recv_ dsl_dataset_rele(snap, FTAG); } else { /* if full, most recent snapshot must be $ORIGIN */ - if (ds->ds_phys->ds_prev_snap_txg >= TXG_INITIAL) + if (dsl_dataset_phys(ds)->ds_prev_snap_txg >= TXG_INITIAL) return (SET_ERROR(ENODEV)); - drba->drba_snapobj = ds->ds_phys->ds_prev_snap_obj; + drba->drba_snapobj = dsl_dataset_phys(ds)->ds_prev_snap_obj; } return (0); @@ -1069,7 +1070,7 @@ dmu_recv_begin_check(void *arg, dmu_tx_t dsl_dataset_rele(ds, FTAG); return (SET_ERROR(EINVAL)); } - if (origin->ds_phys->ds_guid != fromguid) { + if (dsl_dataset_phys(origin)->ds_guid != fromguid) { dsl_dataset_rele(origin, FTAG); dsl_dataset_rele(ds, FTAG); return (SET_ERROR(ENODEV)); @@ -1140,7 +1141,7 @@ dmu_recv_begin_sync(void *arg, dmu_tx_t } dmu_buf_will_dirty(newds->ds_dbuf, tx); - newds->ds_phys->ds_flags |= DS_FLAG_INCONSISTENT; + dsl_dataset_phys(newds)->ds_flags |= DS_FLAG_INCONSISTENT; /* * If we actually created a non-clone, we need to create the @@ -1777,7 +1778,7 @@ dmu_recv_stream(dmu_recv_cookie_t *drc, */ VERIFY0(dmu_objset_from_ds(drc->drc_ds, &os)); - ASSERT(drc->drc_ds->ds_phys->ds_flags & DS_FLAG_INCONSISTENT); + ASSERT(dsl_dataset_phys(drc->drc_ds)->ds_flags & DS_FLAG_INCONSISTENT); featureflags = DMU_GET_FEATUREFLAGS(drc->drc_drrb->drr_versioninfo); @@ -1940,8 +1941,11 @@ dmu_recv_end_check(void *arg, dmu_tx_t * * the snap before drc_ds, because drc_ds can not * have any snaps of its own). */ - uint64_t obj = origin_head->ds_phys->ds_prev_snap_obj; - while (obj != drc->drc_ds->ds_phys->ds_prev_snap_obj) { + uint64_t obj; + + obj = dsl_dataset_phys(origin_head)->ds_prev_snap_obj; + while (obj != + dsl_dataset_phys(drc->drc_ds)->ds_prev_snap_obj) { dsl_dataset_t *snap; error = dsl_dataset_hold_obj(dp, obj, FTAG, &snap); @@ -1953,7 +1957,7 @@ dmu_recv_end_check(void *arg, dmu_tx_t * error = dsl_destroy_snapshot_check_impl( snap, B_FALSE); } - obj = snap->ds_phys->ds_prev_snap_obj; + obj = dsl_dataset_phys(snap)->ds_prev_snap_obj; dsl_dataset_rele(snap, FTAG); if (error != 0) return (error); @@ -1999,13 +2003,16 @@ dmu_recv_end_sync(void *arg, dmu_tx_t *t * Destroy any snapshots of drc_tofs (origin_head) * after the origin (the snap before drc_ds). */ - uint64_t obj = origin_head->ds_phys->ds_prev_snap_obj; - while (obj != drc->drc_ds->ds_phys->ds_prev_snap_obj) { + uint64_t obj; + + obj = dsl_dataset_phys(origin_head)->ds_prev_snap_obj; + while (obj != + dsl_dataset_phys(drc->drc_ds)->ds_prev_snap_obj) { dsl_dataset_t *snap; VERIFY0(dsl_dataset_hold_obj(dp, obj, FTAG, &snap)); ASSERT3P(snap->ds_dir, ==, origin_head->ds_dir); - obj = snap->ds_phys->ds_prev_snap_obj; + obj = dsl_dataset_phys(snap)->ds_prev_snap_obj; dsl_destroy_snapshot_sync_impl(snap, B_FALSE, tx); dsl_dataset_rele(snap, FTAG); @@ -2021,15 +2028,16 @@ dmu_recv_end_sync(void *arg, dmu_tx_t *t /* set snapshot's creation time and guid */ dmu_buf_will_dirty(origin_head->ds_prev->ds_dbuf, tx); - origin_head->ds_prev->ds_phys->ds_creation_time = + dsl_dataset_phys(origin_head->ds_prev)->ds_creation_time = drc->drc_drrb->drr_creation_time; - origin_head->ds_prev->ds_phys->ds_guid = + dsl_dataset_phys(origin_head->ds_prev)->ds_guid = drc->drc_drrb->drr_toguid; - origin_head->ds_prev->ds_phys->ds_flags &= + dsl_dataset_phys(origin_head->ds_prev)->ds_flags &= ~DS_FLAG_INCONSISTENT; dmu_buf_will_dirty(origin_head->ds_dbuf, tx); - origin_head->ds_phys->ds_flags &= ~DS_FLAG_INCONSISTENT; + dsl_dataset_phys(origin_head)->ds_flags &= + ~DS_FLAG_INCONSISTENT; dsl_dataset_rele(origin_head, FTAG); dsl_destroy_head_sync_impl(drc->drc_ds, tx); @@ -2043,15 +2051,17 @@ dmu_recv_end_sync(void *arg, dmu_tx_t *t /* set snapshot's creation time and guid */ dmu_buf_will_dirty(ds->ds_prev->ds_dbuf, tx); - ds->ds_prev->ds_phys->ds_creation_time = + dsl_dataset_phys(ds->ds_prev)->ds_creation_time = drc->drc_drrb->drr_creation_time; - ds->ds_prev->ds_phys->ds_guid = drc->drc_drrb->drr_toguid; - ds->ds_prev->ds_phys->ds_flags &= ~DS_FLAG_INCONSISTENT; + dsl_dataset_phys(ds->ds_prev)->ds_guid = + drc->drc_drrb->drr_toguid; + dsl_dataset_phys(ds->ds_prev)->ds_flags &= + ~DS_FLAG_INCONSISTENT; dmu_buf_will_dirty(ds->ds_dbuf, tx); - ds->ds_phys->ds_flags &= ~DS_FLAG_INCONSISTENT; + dsl_dataset_phys(ds)->ds_flags &= ~DS_FLAG_INCONSISTENT; } - drc->drc_newsnapobj = drc->drc_ds->ds_phys->ds_prev_snap_obj; + drc->drc_newsnapobj = dsl_dataset_phys(drc->drc_ds)->ds_prev_snap_obj; /* * Release the hold from dmu_recv_begin. This must be done before * we return to open context, so that when we free the dataset's dnode, @@ -2077,7 +2087,7 @@ add_ds_to_guidmap(const char *name, avl_ gmep = kmem_alloc(sizeof (*gmep), KM_SLEEP); err = dsl_dataset_hold_obj(dp, snapobj, gmep, &snapds); if (err == 0) { - gmep->guid = snapds->ds_phys->ds_guid; + gmep->guid = dsl_dataset_phys(snapds)->ds_guid; gmep->gme_ds = snapds; avl_add(guid_map, gmep); dsl_dataset_long_hold(snapds, gmep); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_traverse.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_traverse.c Sat Dec 6 00:47:31 2014 (r275550) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_traverse.c Sat Dec 6 00:50:57 2014 (r275551) @@ -579,7 +579,7 @@ traverse_dataset(dsl_dataset_t *ds, uint blkptr_cb_t func, void *arg) { return (traverse_impl(ds->ds_dir->dd_pool->dp_spa, ds, ds->ds_object, - &ds->ds_phys->ds_bp, txg_start, NULL, flags, func, arg)); + &dsl_dataset_phys(ds)->ds_bp, txg_start, NULL, flags, func, arg)); } int @@ -634,8 +634,8 @@ traverse_pool(spa_t *spa, uint64_t txg_s continue; break; } - if (ds->ds_phys->ds_prev_snap_txg > txg) - txg = ds->ds_phys->ds_prev_snap_txg; + if (dsl_dataset_phys(ds)->ds_prev_snap_txg > txg) + txg = dsl_dataset_phys(ds)->ds_prev_snap_txg; err = traverse_dataset(ds, txg, flags, func, arg); dsl_dataset_rele(ds, FTAG); if (err != 0) Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_tx.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_tx.c Sat Dec 6 00:47:31 2014 (r275550) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_tx.c Sat Dec 6 00:50:57 2014 (r275551) @@ -713,6 +713,7 @@ dmu_tx_hold_zap(dmu_tx_t *tx, uint64_t o { dmu_tx_hold_t *txh; dnode_t *dn; + dsl_dataset_phys_t *ds_phys; uint64_t nblocks; int epbs, err; @@ -787,8 +788,9 @@ dmu_tx_hold_zap(dmu_tx_t *tx, uint64_t o * we'll have to modify an indirect twig for each. */ epbs = dn->dn_indblkshift - SPA_BLKPTRSHIFT; + ds_phys = dsl_dataset_phys(dn->dn_objset->os_dsl_dataset); for (nblocks = dn->dn_maxblkid >> epbs; nblocks != 0; nblocks >>= epbs) - if (dn->dn_objset->os_dsl_dataset->ds_phys->ds_prev_snap_obj) + if (ds_phys->ds_prev_snap_obj) txh->txh_space_towrite += 3 << dn->dn_indblkshift; else txh->txh_space_tooverwrite += 3 << dn->dn_indblkshift; Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dnode.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dnode.c Sat Dec 6 00:47:31 2014 (r275550) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dnode.c Sat Dec 6 00:50:57 2014 (r275551) @@ -1116,7 +1116,7 @@ dnode_hold_impl(objset_t *os, uint64_t o zrl_init(&dnh[i].dnh_zrlock); dnh[i].dnh_dnode = NULL; } - if (winner = dmu_buf_set_user(&db->db, children_dnodes, NULL, + if (winner = dmu_buf_set_user(&db->db, children_dnodes, dnode_buf_pageout)) { for (i = 0; i < epb; i++) { Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_bookmark.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_bookmark.c Sat Dec 6 00:47:31 2014 (r275550) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_bookmark.c Sat Dec 6 00:50:57 2014 (r275551) @@ -65,7 +65,7 @@ dsl_dataset_bmark_lookup(dsl_dataset_t * if (bmark_zapobj == 0) return (SET_ERROR(ESRCH)); - if (ds->ds_phys->ds_flags & DS_FLAG_CI_DATASET) + if (dsl_dataset_phys(ds)->ds_flags & DS_FLAG_CI_DATASET) mt = MT_FIRST; else mt = MT_EXACT; @@ -208,10 +208,11 @@ dsl_bookmark_create_sync(void *arg, dmu_ &bmark_fs->ds_bookmarks, tx)); } - bmark_phys.zbm_guid = snapds->ds_phys->ds_guid; - bmark_phys.zbm_creation_txg = snapds->ds_phys->ds_creation_txg; + bmark_phys.zbm_guid = dsl_dataset_phys(snapds)->ds_guid; + bmark_phys.zbm_creation_txg = + dsl_dataset_phys(snapds)->ds_creation_txg; bmark_phys.zbm_creation_time = - snapds->ds_phys->ds_creation_time; + dsl_dataset_phys(snapds)->ds_creation_time; VERIFY0(zap_add(mos, bmark_fs->ds_bookmarks, shortname, sizeof (uint64_t), @@ -340,7 +341,7 @@ dsl_dataset_bookmark_remove(dsl_dataset_ uint64_t bmark_zapobj = ds->ds_bookmarks; matchtype_t mt; - if (ds->ds_phys->ds_flags & DS_FLAG_CI_DATASET) + if (dsl_dataset_phys(ds)->ds_flags & DS_FLAG_CI_DATASET) mt = MT_FIRST; else mt = MT_EXACT; Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c Sat Dec 6 00:47:31 2014 (r275550) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c Sat Dec 6 00:50:57 2014 (r275551) @@ -70,6 +70,9 @@ int zfs_max_recordsize = 1 * 1024 * 1024 #define DS_REF_MAX (1ULL << 62) +extern inline dsl_dataset_phys_t *dsl_dataset_phys(dsl_dataset_t *ds); +extern inline boolean_t dsl_dataset_is_snapshot(dsl_dataset_t *ds); + /* * Figure out how much of this delta should be propogated to the dsl_dir * layer. If there's a refreservation, that space has already been @@ -78,13 +81,15 @@ int zfs_max_recordsize = 1 * 1024 * 1024 static int64_t parent_delta(dsl_dataset_t *ds, int64_t delta) { + dsl_dataset_phys_t *ds_phys; uint64_t old_bytes, new_bytes; if (ds->ds_reserved == 0) return (delta); - old_bytes = MAX(ds->ds_phys->ds_unique_bytes, ds->ds_reserved); - new_bytes = MAX(ds->ds_phys->ds_unique_bytes + delta, ds->ds_reserved); + ds_phys = dsl_dataset_phys(ds); + old_bytes = MAX(ds_phys->ds_unique_bytes, ds->ds_reserved); + new_bytes = MAX(ds_phys->ds_unique_bytes + delta, ds->ds_reserved); ASSERT3U(ABS((int64_t)(new_bytes - old_bytes)), <=, ABS(delta)); return (new_bytes - old_bytes); @@ -115,10 +120,10 @@ dsl_dataset_block_born(dsl_dataset_t *ds dmu_buf_will_dirty(ds->ds_dbuf, tx); mutex_enter(&ds->ds_lock); delta = parent_delta(ds, used); - ds->ds_phys->ds_referenced_bytes += used; - ds->ds_phys->ds_compressed_bytes += compressed; - ds->ds_phys->ds_uncompressed_bytes += uncompressed; - ds->ds_phys->ds_unique_bytes += used; + dsl_dataset_phys(ds)->ds_referenced_bytes += used; + dsl_dataset_phys(ds)->ds_compressed_bytes += compressed; + dsl_dataset_phys(ds)->ds_uncompressed_bytes += uncompressed; + dsl_dataset_phys(ds)->ds_unique_bytes += used; if (BP_GET_LSIZE(bp) > SPA_OLD_MAXBLOCKSIZE) ds->ds_need_large_blocks = B_TRUE; mutex_exit(&ds->ds_lock); @@ -153,17 +158,17 @@ dsl_dataset_block_kill(dsl_dataset_t *ds ASSERT(!dsl_dataset_is_snapshot(ds)); dmu_buf_will_dirty(ds->ds_dbuf, tx); - if (bp->blk_birth > ds->ds_phys->ds_prev_snap_txg) { + if (bp->blk_birth > dsl_dataset_phys(ds)->ds_prev_snap_txg) { int64_t delta; dprintf_bp(bp, "freeing ds=%llu", ds->ds_object); dsl_free(tx->tx_pool, tx->tx_txg, bp); mutex_enter(&ds->ds_lock); - ASSERT(ds->ds_phys->ds_unique_bytes >= used || + ASSERT(dsl_dataset_phys(ds)->ds_unique_bytes >= used || !DS_UNIQUE_IS_ACCURATE(ds)); delta = parent_delta(ds, -used); - ds->ds_phys->ds_unique_bytes -= used; + dsl_dataset_phys(ds)->ds_unique_bytes -= used; mutex_exit(&ds->ds_lock); dsl_dir_diduse_space(ds->ds_dir, DD_USED_HEAD, delta, -compressed, -uncompressed, tx); @@ -184,15 +189,15 @@ dsl_dataset_block_kill(dsl_dataset_t *ds dsl_deadlist_insert(&ds->ds_deadlist, bp, tx); } ASSERT3U(ds->ds_prev->ds_object, ==, - ds->ds_phys->ds_prev_snap_obj); - ASSERT(ds->ds_prev->ds_phys->ds_num_children > 0); + dsl_dataset_phys(ds)->ds_prev_snap_obj); + ASSERT(dsl_dataset_phys(ds->ds_prev)->ds_num_children > 0); /* if (bp->blk_birth > prev prev snap txg) prev unique += bs */ - if (ds->ds_prev->ds_phys->ds_next_snap_obj == + if (dsl_dataset_phys(ds->ds_prev)->ds_next_snap_obj == ds->ds_object && bp->blk_birth > - ds->ds_prev->ds_phys->ds_prev_snap_txg) { + dsl_dataset_phys(ds->ds_prev)->ds_prev_snap_txg) { dmu_buf_will_dirty(ds->ds_prev->ds_dbuf, tx); mutex_enter(&ds->ds_prev->ds_lock); - ds->ds_prev->ds_phys->ds_unique_bytes += used; + dsl_dataset_phys(ds->ds_prev)->ds_unique_bytes += used; mutex_exit(&ds->ds_prev->ds_lock); } if (bp->blk_birth > ds->ds_dir->dd_origin_txg) { @@ -201,12 +206,12 @@ dsl_dataset_block_kill(dsl_dataset_t *ds } } mutex_enter(&ds->ds_lock); - ASSERT3U(ds->ds_phys->ds_referenced_bytes, >=, used); - ds->ds_phys->ds_referenced_bytes -= used; - ASSERT3U(ds->ds_phys->ds_compressed_bytes, >=, compressed); - ds->ds_phys->ds_compressed_bytes -= compressed; - ASSERT3U(ds->ds_phys->ds_uncompressed_bytes, >=, uncompressed); - ds->ds_phys->ds_uncompressed_bytes -= uncompressed; + ASSERT3U(dsl_dataset_phys(ds)->ds_referenced_bytes, >=, used); + dsl_dataset_phys(ds)->ds_referenced_bytes -= used; + ASSERT3U(dsl_dataset_phys(ds)->ds_compressed_bytes, >=, compressed); + dsl_dataset_phys(ds)->ds_compressed_bytes -= compressed; + ASSERT3U(dsl_dataset_phys(ds)->ds_uncompressed_bytes, >=, uncompressed); + dsl_dataset_phys(ds)->ds_uncompressed_bytes -= uncompressed; mutex_exit(&ds->ds_lock); return (used); @@ -232,7 +237,7 @@ dsl_dataset_prev_snap_txg(dsl_dataset_t if (ds->ds_trysnap_txg > spa_last_synced_txg(ds->ds_dir->dd_pool->dp_spa)) trysnap = ds->ds_trysnap_txg; - return (MAX(ds->ds_phys->ds_prev_snap_txg, trysnap)); + return (MAX(dsl_dataset_phys(ds)->ds_prev_snap_txg, trysnap)); } boolean_t @@ -267,7 +272,7 @@ dsl_dataset_evict(dmu_buf_t *db, void *d } bplist_destroy(&ds->ds_pending_deadlist); - if (ds->ds_phys->ds_deadlist_obj != 0) + if (dsl_dataset_phys(ds)->ds_deadlist_obj != 0) dsl_deadlist_close(&ds->ds_deadlist); if (ds->ds_dir) dsl_dir_rele(ds->ds_dir, ds); @@ -293,10 +298,10 @@ dsl_dataset_get_snapname(dsl_dataset_t * if (ds->ds_snapname[0]) return (0); - if (ds->ds_phys->ds_next_snap_obj == 0) + if (dsl_dataset_phys(ds)->ds_next_snap_obj == 0) return (0); - err = dmu_bonus_hold(mos, ds->ds_dir->dd_phys->dd_head_dataset_obj, + err = dmu_bonus_hold(mos, dsl_dir_phys(ds->ds_dir)->dd_head_dataset_obj, FTAG, &headdbuf); if (err != 0) return (err); @@ -311,11 +316,11 @@ int dsl_dataset_snap_lookup(dsl_dataset_t *ds, const char *name, uint64_t *value) { objset_t *mos = ds->ds_dir->dd_pool->dp_meta_objset; - uint64_t snapobj = ds->ds_phys->ds_snapnames_zapobj; + uint64_t snapobj = dsl_dataset_phys(ds)->ds_snapnames_zapobj; matchtype_t mt; int err; - if (ds->ds_phys->ds_flags & DS_FLAG_CI_DATASET) + if (dsl_dataset_phys(ds)->ds_flags & DS_FLAG_CI_DATASET) mt = MT_FIRST; else mt = MT_EXACT; @@ -332,13 +337,13 @@ dsl_dataset_snap_remove(dsl_dataset_t *d boolean_t adj_cnt) { objset_t *mos = ds->ds_dir->dd_pool->dp_meta_objset; - uint64_t snapobj = ds->ds_phys->ds_snapnames_zapobj; + uint64_t snapobj = dsl_dataset_phys(ds)->ds_snapnames_zapobj; matchtype_t mt; int err; dsl_dir_snap_cmtime_update(ds->ds_dir); - if (ds->ds_phys->ds_flags & DS_FLAG_CI_DATASET) + if (dsl_dataset_phys(ds)->ds_flags & DS_FLAG_CI_DATASET) mt = MT_FIRST; else mt = MT_EXACT; @@ -384,7 +389,6 @@ dsl_dataset_hold_obj(dsl_pool_t *dp, uin ds = kmem_zalloc(sizeof (dsl_dataset_t), KM_SLEEP); ds->ds_dbuf = dbuf; ds->ds_object = dsobj; - ds->ds_phys = dbuf->db_data; mutex_init(&ds->ds_lock, NULL, MUTEX_DEFAULT, NULL); mutex_init(&ds->ds_opening_lock, NULL, MUTEX_DEFAULT, NULL); @@ -393,7 +397,7 @@ dsl_dataset_hold_obj(dsl_pool_t *dp, uin bplist_create(&ds->ds_pending_deadlist); dsl_deadlist_open(&ds->ds_deadlist, - mos, ds->ds_phys->ds_deadlist_obj); + mos, dsl_dataset_phys(ds)->ds_deadlist_obj); list_create(&ds->ds_sendstreams, sizeof (dmu_sendarg_t), offsetof(dmu_sendarg_t, dsa_link)); @@ -408,7 +412,8 @@ dsl_dataset_hold_obj(dsl_pool_t *dp, uin if (err == 0) { err = dsl_dir_hold_obj(dp, - ds->ds_phys->ds_dir_obj, NULL, ds, &ds->ds_dir); + dsl_dataset_phys(ds)->ds_dir_obj, NULL, ds, + &ds->ds_dir); } if (err != 0) { mutex_destroy(&ds->ds_lock); @@ -424,9 +429,9 @@ dsl_dataset_hold_obj(dsl_pool_t *dp, uin if (!dsl_dataset_is_snapshot(ds)) { ds->ds_snapname[0] = '\0'; - if (ds->ds_phys->ds_prev_snap_obj != 0) { + if (dsl_dataset_phys(ds)->ds_prev_snap_obj != 0) { err = dsl_dataset_hold_obj(dp, - ds->ds_phys->ds_prev_snap_obj, + dsl_dataset_phys(ds)->ds_prev_snap_obj, ds, &ds->ds_prev); } if (doi.doi_type == DMU_OTN_ZAP_METADATA) { @@ -440,10 +445,11 @@ dsl_dataset_hold_obj(dsl_pool_t *dp, uin } else { if (zfs_flags & ZFS_DEBUG_SNAPNAMES) err = dsl_dataset_get_snapname(ds); - if (err == 0 && ds->ds_phys->ds_userrefs_obj != 0) { + if (err == 0 && + dsl_dataset_phys(ds)->ds_userrefs_obj != 0) { err = zap_count( ds->ds_dir->dd_pool->dp_meta_objset, - ds->ds_phys->ds_userrefs_obj, + dsl_dataset_phys(ds)->ds_userrefs_obj, &ds->ds_userrefs); } } @@ -462,7 +468,7 @@ dsl_dataset_hold_obj(dsl_pool_t *dp, uin } if (err != 0 || (winner = dmu_buf_set_user_ie(dbuf, ds, - &ds->ds_phys, dsl_dataset_evict)) != NULL) { + dsl_dataset_evict)) != NULL) { bplist_destroy(&ds->ds_pending_deadlist); dsl_deadlist_close(&ds->ds_deadlist); if (ds->ds_prev) @@ -480,12 +486,12 @@ dsl_dataset_hold_obj(dsl_pool_t *dp, uin ds = winner; } else { ds->ds_fsid_guid = - unique_insert(ds->ds_phys->ds_fsid_guid); + unique_insert(dsl_dataset_phys(ds)->ds_fsid_guid); } } ASSERT3P(ds->ds_dbuf, ==, dbuf); - ASSERT3P(ds->ds_phys, ==, dbuf->db_data); - ASSERT(ds->ds_phys->ds_prev_snap_obj != 0 || + ASSERT3P(dsl_dataset_phys(ds), ==, dbuf->db_data); + ASSERT(dsl_dataset_phys(ds)->ds_prev_snap_obj != 0 || spa_version(dp->dp_spa) < SPA_VERSION_ORIGIN || dp->dp_origin_snap == NULL || ds == dp->dp_origin_snap); *dsp = ds; @@ -506,7 +512,7 @@ dsl_dataset_hold(dsl_pool_t *dp, const c return (err); ASSERT(dsl_pool_config_held(dp)); - obj = dd->dd_phys->dd_head_dataset_obj; + obj = dsl_dir_phys(dd)->dd_head_dataset_obj; if (obj != 0) err = dsl_dataset_hold_obj(dp, obj, tag, dsp); else @@ -673,9 +679,9 @@ dsl_dataset_create_sync_dd(dsl_dir_t *dd origin = dp->dp_origin_snap; ASSERT(origin == NULL || origin->ds_dir->dd_pool == dp); - ASSERT(origin == NULL || origin->ds_phys->ds_num_children > 0); + ASSERT(origin == NULL || dsl_dataset_phys(origin)->ds_num_children > 0); ASSERT(dmu_tx_is_syncing(tx)); - ASSERT(dd->dd_phys->dd_head_dataset_obj == 0); + ASSERT(dsl_dir_phys(dd)->dd_head_dataset_obj == 0); dsobj = dmu_object_alloc(mos, DMU_OT_DSL_DATASET, 0, DMU_OT_DSL_DATASET, sizeof (dsl_dataset_phys_t), tx); @@ -701,55 +707,58 @@ dsl_dataset_create_sync_dd(dsl_dir_t *dd dsphys->ds_prev_snap_obj = origin->ds_object; dsphys->ds_prev_snap_txg = - origin->ds_phys->ds_creation_txg; + dsl_dataset_phys(origin)->ds_creation_txg; dsphys->ds_referenced_bytes = - origin->ds_phys->ds_referenced_bytes; + dsl_dataset_phys(origin)->ds_referenced_bytes; dsphys->ds_compressed_bytes = - origin->ds_phys->ds_compressed_bytes; + dsl_dataset_phys(origin)->ds_compressed_bytes; dsphys->ds_uncompressed_bytes = - origin->ds_phys->ds_uncompressed_bytes; - dsphys->ds_bp = origin->ds_phys->ds_bp; + dsl_dataset_phys(origin)->ds_uncompressed_bytes; + dsphys->ds_bp = dsl_dataset_phys(origin)->ds_bp; /* * Inherit flags that describe the dataset's contents * (INCONSISTENT) or properties (Case Insensitive). */ - dsphys->ds_flags |= origin->ds_phys->ds_flags & + dsphys->ds_flags |= dsl_dataset_phys(origin)->ds_flags & (DS_FLAG_INCONSISTENT | DS_FLAG_CI_DATASET); if (origin->ds_large_blocks) dsl_dataset_activate_large_blocks_sync_impl(dsobj, tx); dmu_buf_will_dirty(origin->ds_dbuf, tx); - origin->ds_phys->ds_num_children++; + dsl_dataset_phys(origin)->ds_num_children++; VERIFY0(dsl_dataset_hold_obj(dp, - origin->ds_dir->dd_phys->dd_head_dataset_obj, FTAG, &ohds)); + dsl_dir_phys(origin->ds_dir)->dd_head_dataset_obj, + FTAG, &ohds)); dsphys->ds_deadlist_obj = dsl_deadlist_clone(&ohds->ds_deadlist, dsphys->ds_prev_snap_txg, dsphys->ds_prev_snap_obj, tx); dsl_dataset_rele(ohds, FTAG); if (spa_version(dp->dp_spa) >= SPA_VERSION_NEXT_CLONES) { - if (origin->ds_phys->ds_next_clones_obj == 0) { - origin->ds_phys->ds_next_clones_obj = + if (dsl_dataset_phys(origin)->ds_next_clones_obj == 0) { + dsl_dataset_phys(origin)->ds_next_clones_obj = zap_create(mos, DMU_OT_NEXT_CLONES, DMU_OT_NONE, 0, tx); } VERIFY0(zap_add_int(mos, - origin->ds_phys->ds_next_clones_obj, dsobj, tx)); + dsl_dataset_phys(origin)->ds_next_clones_obj, + dsobj, tx)); } dmu_buf_will_dirty(dd->dd_dbuf, tx); - dd->dd_phys->dd_origin_obj = origin->ds_object; + dsl_dir_phys(dd)->dd_origin_obj = origin->ds_object; if (spa_version(dp->dp_spa) >= SPA_VERSION_DIR_CLONES) { - if (origin->ds_dir->dd_phys->dd_clones == 0) { + if (dsl_dir_phys(origin->ds_dir)->dd_clones == 0) { dmu_buf_will_dirty(origin->ds_dir->dd_dbuf, tx); - origin->ds_dir->dd_phys->dd_clones = + dsl_dir_phys(origin->ds_dir)->dd_clones = zap_create(mos, DMU_OT_DSL_CLONES, DMU_OT_NONE, 0, tx); } VERIFY0(zap_add_int(mos, - origin->ds_dir->dd_phys->dd_clones, dsobj, tx)); + dsl_dir_phys(origin->ds_dir)->dd_clones, + dsobj, tx)); } } @@ -759,7 +768,7 @@ dsl_dataset_create_sync_dd(dsl_dir_t *dd dmu_buf_rele(dbuf, FTAG); dmu_buf_will_dirty(dd->dd_dbuf, tx); - dd->dd_phys->dd_head_dataset_obj = dsobj; + dsl_dir_phys(dd)->dd_head_dataset_obj = dsobj; return (dsobj); } @@ -841,20 +850,20 @@ dsl_dataset_recalc_head_uniq(dsl_dataset ASSERT(!dsl_dataset_is_snapshot(ds)); - if (ds->ds_phys->ds_prev_snap_obj != 0) - mrs_used = ds->ds_prev->ds_phys->ds_referenced_bytes; + if (dsl_dataset_phys(ds)->ds_prev_snap_obj != 0) + mrs_used = dsl_dataset_phys(ds->ds_prev)->ds_referenced_bytes; else mrs_used = 0; dsl_deadlist_space(&ds->ds_deadlist, &dlused, &dlcomp, &dluncomp); ASSERT3U(dlused, <=, mrs_used); - ds->ds_phys->ds_unique_bytes = - ds->ds_phys->ds_referenced_bytes - (mrs_used - dlused); + dsl_dataset_phys(ds)->ds_unique_bytes = + dsl_dataset_phys(ds)->ds_referenced_bytes - (mrs_used - dlused); if (spa_version(ds->ds_dir->dd_pool->dp_spa) >= SPA_VERSION_UNIQUE_ACCURATE) - ds->ds_phys->ds_flags |= DS_FLAG_UNIQUE_ACCURATE; + dsl_dataset_phys(ds)->ds_flags |= DS_FLAG_UNIQUE_ACCURATE; } void @@ -865,8 +874,9 @@ dsl_dataset_remove_from_next_clones(dsl_ uint64_t count; int err; - ASSERT(ds->ds_phys->ds_num_children >= 2); - err = zap_remove_int(mos, ds->ds_phys->ds_next_clones_obj, obj, tx); + ASSERT(dsl_dataset_phys(ds)->ds_num_children >= 2); + err = zap_remove_int(mos, dsl_dataset_phys(ds)->ds_next_clones_obj, + obj, tx); /* * The err should not be ENOENT, but a bug in a previous version * of the code could cause upgrade_clones_cb() to not set @@ -879,16 +889,16 @@ dsl_dataset_remove_from_next_clones(dsl_ */ if (err != ENOENT) VERIFY0(err); - ASSERT0(zap_count(mos, ds->ds_phys->ds_next_clones_obj, + ASSERT0(zap_count(mos, dsl_dataset_phys(ds)->ds_next_clones_obj, &count)); - ASSERT3U(count, <=, ds->ds_phys->ds_num_children - 2); + ASSERT3U(count, <=, dsl_dataset_phys(ds)->ds_num_children - 2); } blkptr_t * dsl_dataset_get_blkptr(dsl_dataset_t *ds) { - return (&ds->ds_phys->ds_bp); + return (&dsl_dataset_phys(ds)->ds_bp); } void @@ -900,7 +910,7 @@ dsl_dataset_set_blkptr(dsl_dataset_t *ds tx->tx_pool->dp_meta_rootbp = *bp; } else { dmu_buf_will_dirty(ds->ds_dbuf, tx); - ds->ds_phys->ds_bp = *bp; + dsl_dataset_phys(ds)->ds_bp = *bp; } } @@ -920,7 +930,7 @@ dsl_dataset_dirty(dsl_dataset_t *ds, dmu ASSERT(ds->ds_objset != NULL); - if (ds->ds_phys->ds_next_snap_obj != 0) + if (dsl_dataset_phys(ds)->ds_next_snap_obj != 0) panic("dirtying snapshot!"); dp = ds->ds_dir->dd_pool; @@ -956,7 +966,7 @@ dsl_dataset_snapshot_reserve_space(dsl_d * outside of the reservation. */ ASSERT(ds->ds_reserved == 0 || DS_UNIQUE_IS_ACCURATE(ds)); - asize = MIN(ds->ds_phys->ds_unique_bytes, ds->ds_reserved); + asize = MIN(dsl_dataset_phys(ds)->ds_unique_bytes, ds->ds_reserved); if (asize > dsl_dir_space_available(ds->ds_dir, NULL, 0, TRUE)) return (SET_ERROR(ENOSPC)); @@ -993,7 +1003,7 @@ dsl_dataset_snapshot_check_impl(dsl_data * We don't allow multiple snapshots of the same txg. If there * is already one, try again. */ - if (ds->ds_phys->ds_prev_snap_txg >= tx->tx_txg) + if (dsl_dataset_phys(ds)->ds_prev_snap_txg >= tx->tx_txg) return (SET_ERROR(EAGAIN)); /* @@ -1219,35 +1229,38 @@ dsl_dataset_snapshot_sync_impl(dsl_datas dsphys->ds_fsid_guid = unique_create(); (void) random_get_pseudo_bytes((void*)&dsphys->ds_guid, sizeof (dsphys->ds_guid)); - dsphys->ds_prev_snap_obj = ds->ds_phys->ds_prev_snap_obj; *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***