From owner-svn-src-stable-11@freebsd.org Sun Oct 13 06:59:37 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C00E0E6CD3; Sun, 13 Oct 2019 06:59:37 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46rXcT4bmbz4bnd; Sun, 13 Oct 2019 06:59:37 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 815BB19362; Sun, 13 Oct 2019 06:59:37 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x9D6xbvS044583; Sun, 13 Oct 2019 06:59:37 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x9D6xbPX044582; Sun, 13 Oct 2019 06:59:37 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201910130659.x9D6xbPX044582@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 13 Oct 2019 06:59:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r353465 - stable/11/sys/sys X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/sys X-SVN-Commit-Revision: 353465 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Oct 2019 06:59:37 -0000 Author: kib Date: Sun Oct 13 06:59:37 2019 New Revision: 353465 URL: https://svnweb.freebsd.org/changeset/base/353465 Log: MFC r353413: Typo out->in. Modified: stable/11/sys/sys/lockf.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/sys/lockf.h ============================================================================== --- stable/11/sys/sys/lockf.h Sun Oct 13 06:58:39 2019 (r353464) +++ stable/11/sys/sys/lockf.h Sun Oct 13 06:59:37 2019 (r353465) @@ -79,7 +79,7 @@ struct lockf_entry { struct task *lf_async_task;/* (c) Async lock callback */ LIST_ENTRY(lockf_entry) lf_link; /* (s) Linkage for lock lists */ struct lockf_edge_list lf_outedges; /* (s) list of out-edges */ - struct lockf_edge_list lf_inedges; /* (s) list of out-edges */ + struct lockf_edge_list lf_inedges; /* (s) list of in-edges */ int lf_refs; /* (s) ref count */ }; LIST_HEAD(lockf_entry_list, lockf_entry); From owner-svn-src-stable-11@freebsd.org Tue Oct 15 18:42:07 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0924515116D; Tue, 15 Oct 2019 18:42:07 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46t4666Srhz4fg8; Tue, 15 Oct 2019 18:42:06 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C161622E09; Tue, 15 Oct 2019 18:42:06 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x9FIg6f1066319; Tue, 15 Oct 2019 18:42:06 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x9FIg6q6066318; Tue, 15 Oct 2019 18:42:06 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201910151842.x9FIg6q6066318@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 15 Oct 2019 18:42:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r353581 - stable/11/sys/dev/ioat X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/dev/ioat X-SVN-Commit-Revision: 353581 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Oct 2019 18:42:07 -0000 Author: mav Date: Tue Oct 15 18:42:06 2019 New Revision: 353581 URL: https://svnweb.freebsd.org/changeset/base/353581 Log: MFC r352787: Replace argument checks with assertions. Those functions are used by kernel, and we can't check all possible argument errors in production kernel. Plus according to docs many of those errors are checked by hardware. Assertions should just help with code debugging. Modified: stable/11/sys/dev/ioat/ioat.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/ioat/ioat.c ============================================================================== --- stable/11/sys/dev/ioat/ioat.c Tue Oct 15 18:39:32 2019 (r353580) +++ stable/11/sys/dev/ioat/ioat.c Tue Oct 15 18:42:06 2019 (r353581) @@ -1002,17 +1002,14 @@ ioat_op_generic(struct ioat_softc *ioat, uint8_t op, KASSERT((flags & ~_DMA_GENERIC_FLAGS) == 0, ("Unrecognized flag(s): %#x", flags & ~_DMA_GENERIC_FLAGS)); + KASSERT(size <= ioat->max_xfer_size, ("%s: size too big (%u > %u)", + __func__, (unsigned)size, ioat->max_xfer_size)); + if ((flags & DMA_NO_WAIT) != 0) mflags = M_NOWAIT; else mflags = M_WAITOK; - if (size > ioat->max_xfer_size) { - ioat_log_message(0, "%s: max_xfer_size = %d, requested = %u\n", - __func__, ioat->max_xfer_size, (unsigned)size); - return (NULL); - } - if (ioat_reserve_space(ioat, 1, mflags) != 0) return (NULL); @@ -1070,11 +1067,8 @@ ioat_copy(bus_dmaengine_t dmaengine, bus_addr_t dst, ioat = to_ioat_softc(dmaengine); - if (((src | dst) & (0xffffull << 48)) != 0) { - ioat_log_message(0, "%s: High 16 bits of src/dst invalid\n", - __func__); - return (NULL); - } + KASSERT(((src | dst) & (0xffffull << 48)) == 0, + ("%s: high 16 bits of src/dst are not zero", __func__)); desc = ioat_op_generic(ioat, IOAT_OP_COPY, len, src, dst, callback_fn, callback_arg, flags); @@ -1103,16 +1097,10 @@ ioat_copy_8k_aligned(bus_dmaengine_t dmaengine, bus_ad ioat = to_ioat_softc(dmaengine); CTR2(KTR_IOAT, "%s channel=%u", __func__, ioat->chan_idx); - if (((src1 | src2 | dst1 | dst2) & (0xffffull << 48)) != 0) { - ioat_log_message(0, "%s: High 16 bits of src/dst invalid\n", - __func__); - return (NULL); - } - if (((src1 | src2 | dst1 | dst2) & PAGE_MASK) != 0) { - ioat_log_message(0, "%s: Addresses must be page-aligned\n", - __func__); - return (NULL); - } + KASSERT(((src1 | src2 | dst1 | dst2) & (0xffffull << 48)) == 0, + ("%s: high 16 bits of src/dst are not zero", __func__)); + KASSERT(((src1 | src2 | dst1 | dst2) & PAGE_MASK) == 0, + ("%s: addresses are not page-aligned", __func__)); desc = ioat_op_generic(ioat, IOAT_OP_COPY, 2 * PAGE_SIZE, src1, dst1, callback_fn, callback_arg, flags); @@ -1150,26 +1138,15 @@ ioat_copy_crc(bus_dmaengine_t dmaengine, bus_addr_t ds ioat = to_ioat_softc(dmaengine); CTR2(KTR_IOAT, "%s channel=%u", __func__, ioat->chan_idx); - if ((ioat->capabilities & IOAT_DMACAP_MOVECRC) == 0) { - ioat_log_message(0, "%s: Device lacks MOVECRC capability\n", - __func__); - return (NULL); - } - if (((src | dst) & (0xffffffull << 40)) != 0) { - ioat_log_message(0, "%s: High 24 bits of src/dst invalid\n", - __func__); - return (NULL); - } + KASSERT((ioat->capabilities & IOAT_DMACAP_MOVECRC) != 0, + ("%s: device lacks MOVECRC capability", __func__)); + KASSERT(((src | dst) & (0xffffffull << 40)) == 0, + ("%s: high 24 bits of src/dst are not zero", __func__)); teststore = (flags & _DMA_CRC_TESTSTORE); - if (teststore == _DMA_CRC_TESTSTORE) { - ioat_log_message(0, "%s: TEST and STORE invalid\n", __func__); - return (NULL); - } - if (teststore == 0 && (flags & DMA_CRC_INLINE) != 0) { - ioat_log_message(0, "%s: INLINE invalid without TEST or STORE\n", - __func__); - return (NULL); - } + KASSERT(teststore != _DMA_CRC_TESTSTORE, + ("%s: TEST and STORE invalid", __func__)); + KASSERT(teststore != 0 || (flags & DMA_CRC_INLINE) == 0, + ("%s: INLINE invalid without TEST or STORE", __func__)); switch (teststore) { case DMA_CRC_STORE: @@ -1184,12 +1161,9 @@ ioat_copy_crc(bus_dmaengine_t dmaengine, bus_addr_t ds break; } - if ((flags & DMA_CRC_INLINE) == 0 && - (crcptr & (0xffffffull << 40)) != 0) { - ioat_log_message(0, - "%s: High 24 bits of crcptr invalid\n", __func__); - return (NULL); - } + KASSERT((flags & DMA_CRC_INLINE) != 0 || + (crcptr & (0xffffffull << 40)) == 0, + ("%s: high 24 bits of crcptr are not zero", __func__)); desc = ioat_op_generic(ioat, op, len, src, dst, callback_fn, callback_arg, flags & ~_DMA_CRC_FLAGS); @@ -1229,26 +1203,15 @@ ioat_crc(bus_dmaengine_t dmaengine, bus_addr_t src, bu ioat = to_ioat_softc(dmaengine); CTR2(KTR_IOAT, "%s channel=%u", __func__, ioat->chan_idx); - if ((ioat->capabilities & IOAT_DMACAP_CRC) == 0) { - ioat_log_message(0, "%s: Device lacks CRC capability\n", - __func__); - return (NULL); - } - if ((src & (0xffffffull << 40)) != 0) { - ioat_log_message(0, "%s: High 24 bits of src invalid\n", - __func__); - return (NULL); - } + KASSERT((ioat->capabilities & IOAT_DMACAP_CRC) != 0, + ("%s: device lacks CRC capability", __func__)); + KASSERT((src & (0xffffffull << 40)) == 0, + ("%s: high 24 bits of src are not zero", __func__)); teststore = (flags & _DMA_CRC_TESTSTORE); - if (teststore == _DMA_CRC_TESTSTORE) { - ioat_log_message(0, "%s: TEST and STORE invalid\n", __func__); - return (NULL); - } - if (teststore == 0 && (flags & DMA_CRC_INLINE) != 0) { - ioat_log_message(0, "%s: INLINE invalid without TEST or STORE\n", - __func__); - return (NULL); - } + KASSERT(teststore != _DMA_CRC_TESTSTORE, + ("%s: TEST and STORE invalid", __func__)); + KASSERT(teststore != 0 || (flags & DMA_CRC_INLINE) == 0, + ("%s: INLINE invalid without TEST or STORE", __func__)); switch (teststore) { case DMA_CRC_STORE: @@ -1263,12 +1226,9 @@ ioat_crc(bus_dmaengine_t dmaengine, bus_addr_t src, bu break; } - if ((flags & DMA_CRC_INLINE) == 0 && - (crcptr & (0xffffffull << 40)) != 0) { - ioat_log_message(0, - "%s: High 24 bits of crcptr invalid\n", __func__); - return (NULL); - } + KASSERT((flags & DMA_CRC_INLINE) != 0 || + (crcptr & (0xffffffull << 40)) == 0, + ("%s: high 24 bits of crcptr are not zero", __func__)); desc = ioat_op_generic(ioat, op, len, src, 0, callback_fn, callback_arg, flags & ~_DMA_CRC_FLAGS); @@ -1306,18 +1266,11 @@ ioat_blockfill(bus_dmaengine_t dmaengine, bus_addr_t d ioat = to_ioat_softc(dmaengine); CTR2(KTR_IOAT, "%s channel=%u", __func__, ioat->chan_idx); - if ((ioat->capabilities & IOAT_DMACAP_BFILL) == 0) { - ioat_log_message(0, "%s: Device lacks BFILL capability\n", - __func__); - return (NULL); - } + KASSERT((ioat->capabilities & IOAT_DMACAP_BFILL) != 0, + ("%s: device lacks BFILL capability", __func__)); + KASSERT((dst & (0xffffull << 48)) == 0, + ("%s: high 16 bits of crcptr are not zero", __func__)); - if ((dst & (0xffffull << 48)) != 0) { - ioat_log_message(0, "%s: High 16 bits of dst invalid\n", - __func__); - return (NULL); - } - desc = ioat_op_generic(ioat, IOAT_OP_FILL, len, fillpattern, dst, callback_fn, callback_arg, flags); if (desc == NULL) @@ -1473,7 +1426,7 @@ ioat_poll_timer_callback(void *arg) struct ioat_softc *ioat; ioat = arg; - ioat_log_message(3, "%s\n", __func__); + CTR1(KTR_IOAT, "%s", __func__); ioat_process_events(ioat, FALSE); From owner-svn-src-stable-11@freebsd.org Tue Oct 15 18:44:51 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3394A151377; Tue, 15 Oct 2019 18:44:51 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46t49H0bKBz4g76; Tue, 15 Oct 2019 18:44:51 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D182A22E35; Tue, 15 Oct 2019 18:44:50 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x9FIio7e067390; Tue, 15 Oct 2019 18:44:50 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x9FIioe9067389; Tue, 15 Oct 2019 18:44:50 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201910151844.x9FIioe9067389@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 15 Oct 2019 18:44:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r353583 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 353583 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Oct 2019 18:44:51 -0000 Author: mav Date: Tue Oct 15 18:44:50 2019 New Revision: 353583 URL: https://svnweb.freebsd.org/changeset/base/353583 Log: MFC r352939: Improve latency of synchronous 128KB writes. Before my ZIL space optimization few years ago 128KB writes were logged as two 64KB+ records in two 128KB log blocks. After that change it became ~124KB+/4KB+ in two 128KB log blocks to free space in the second block for another record. Unfortunately in case of 128KB only writes, when space in the second block remained unused, that change increased write latency by imbalancing checksum computation time between parallel threads. This change introduces new 68KB log block size, used for both writes below 67KB and 128KB-sharp writes. Writes of 68-127KB are still using one 128KB block to not increase processing overhead. Writes above 131KB are still using full 128KB blocks, since possible saving there is small. Mixed loads will likely also fall back to previous 128KB, since code uses maximum of the last 10 requested block sizes. On a simple 128KB write test with queue depth of 1 this change demonstrates ~15-20% performance improvement. Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c Tue Oct 15 18:44:28 2019 (r353582) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c Tue Oct 15 18:44:50 2019 (r353583) @@ -1238,11 +1238,17 @@ zil_lwb_write_open(zilog_t *zilog, lwb_t *lwb) * aligned to 4KB) actually gets written. However, we can't always just * allocate SPA_OLD_MAXBLOCKSIZE as the slog space could be exhausted. */ -uint64_t zil_block_buckets[] = { - 4096, /* non TX_WRITE */ - 8192+4096, /* data base */ - 32*1024 + 4096, /* NFS writes */ - UINT64_MAX +struct { + uint64_t limit; + uint64_t blksz; +} zil_block_buckets[] = { + { 4096, 4096 }, /* non TX_WRITE */ + { 8192 + 4096, 8192 + 4096 }, /* database */ + { 32768 + 4096, 32768 + 4096 }, /* NFS writes */ + { 65536 + 4096, 65536 + 4096 }, /* 64KB writes */ + { 131072, 131072 }, /* < 128KB writes */ + { 131072 + 4096, 65536 + 4096 }, /* 128KB writes */ + { UINT64_MAX, SPA_OLD_MAXBLOCKSIZE}, /* > 128KB writes */ }; /* @@ -1319,11 +1325,9 @@ zil_lwb_write_issue(zilog_t *zilog, lwb_t *lwb) * pool log space. */ zil_blksz = zilog->zl_cur_used + sizeof (zil_chain_t); - for (i = 0; zil_blksz > zil_block_buckets[i]; i++) + for (i = 0; zil_blksz > zil_block_buckets[i].limit; i++) continue; - zil_blksz = zil_block_buckets[i]; - if (zil_blksz == UINT64_MAX) - zil_blksz = SPA_OLD_MAXBLOCKSIZE; + zil_blksz = zil_block_buckets[i].blksz; zilog->zl_prev_blks[zilog->zl_prev_rotor] = zil_blksz; for (i = 0; i < ZIL_PREV_BLKS; i++) zil_blksz = MAX(zil_blksz, zilog->zl_prev_blks[i]); From owner-svn-src-stable-11@freebsd.org Tue Oct 15 20:04:17 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4040915318B; Tue, 15 Oct 2019 20:04:17 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46t5wx0xc4z3HZj; Tue, 15 Oct 2019 20:04:17 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 02FCA23CEB; Tue, 15 Oct 2019 20:04:17 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x9FK4GL6014300; Tue, 15 Oct 2019 20:04:16 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x9FK4Fqg014293; Tue, 15 Oct 2019 20:04:15 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201910152004.x9FK4Fqg014293@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Tue, 15 Oct 2019 20:04:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r353589 - in stable/11: contrib/sendmail/mail.local lib/libc/tests/nss usr.bin/tip/tip usr.sbin/fwcontrol X-SVN-Group: stable-11 X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: in stable/11: contrib/sendmail/mail.local lib/libc/tests/nss usr.bin/tip/tip usr.sbin/fwcontrol X-SVN-Commit-Revision: 353589 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Oct 2019 20:04:17 -0000 Author: brooks Date: Tue Oct 15 20:04:15 2019 New Revision: 353589 URL: https://svnweb.freebsd.org/changeset/base/353589 Log: MFC r353326: Fix various -Wpointer-compare warnings This warning (comparing a pointer against a zero character literal rather than NULL) has existed since GCC 7.1.0, and was recently added to Clang trunk. Almost all of these are harmless, except for fwcontrol's str2node, which needs to both guard against dereferencing a NULL pointer (though in practice it appears none of the callers will ever pass one in), as well as ensure it doesn't parse the empty string as node 0 due to strtol's awkward interface. Submitted by: James Clarke Obtained from: CheriBSD Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D21914 Modified: stable/11/contrib/sendmail/mail.local/mail.local.c stable/11/lib/libc/tests/nss/getgr_test.c stable/11/lib/libc/tests/nss/getproto_test.c stable/11/lib/libc/tests/nss/getrpc_test.c stable/11/lib/libc/tests/nss/getserv_test.c stable/11/usr.bin/tip/tip/acu.c stable/11/usr.sbin/fwcontrol/fwcontrol.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/sendmail/mail.local/mail.local.c ============================================================================== --- stable/11/contrib/sendmail/mail.local/mail.local.c Tue Oct 15 19:44:43 2019 (r353588) +++ stable/11/contrib/sendmail/mail.local/mail.local.c Tue Oct 15 20:04:15 2019 (r353589) @@ -393,7 +393,7 @@ main(argc, argv) } /* Non-LMTP from here on out */ - if (*argv == '\0') + if (*argv == NULL) usage(); /* Modified: stable/11/lib/libc/tests/nss/getgr_test.c ============================================================================== --- stable/11/lib/libc/tests/nss/getgr_test.c Tue Oct 15 19:44:43 2019 (r353588) +++ stable/11/lib/libc/tests/nss/getgr_test.c Tue Oct 15 20:04:15 2019 (r353589) @@ -153,7 +153,7 @@ compare_group(struct group *grp1, struct group *grp2, if (strcmp(*c1, *c2) != 0) goto errfin; - if (*c1 != '\0' || *c2 != '\0') + if (*c1 != NULL || *c2 != NULL) goto errfin; return 0; @@ -182,7 +182,7 @@ sdump_group(struct group *grp, char *buffer, size_t bu buflen -= written; if (grp->gr_mem != NULL) { - if (*(grp->gr_mem) != '\0') { + if (*(grp->gr_mem) != NULL) { for (cp = grp->gr_mem; *cp; ++cp) { written = snprintf(buffer, buflen, "%s%s", cp == grp->gr_mem ? "" : ",", *cp); Modified: stable/11/lib/libc/tests/nss/getproto_test.c ============================================================================== --- stable/11/lib/libc/tests/nss/getproto_test.c Tue Oct 15 19:44:43 2019 (r353588) +++ stable/11/lib/libc/tests/nss/getproto_test.c Tue Oct 15 20:04:15 2019 (r353589) @@ -148,7 +148,7 @@ compare_protoent(struct protoent *pe1, struct protoent if (strcmp(*c1, *c2) != 0) goto errfin; - if ((*c1 != '\0') || (*c2 != '\0')) + if ((*c1 != NULL) || (*c2 != NULL)) goto errfin; return 0; @@ -177,7 +177,7 @@ sdump_protoent(struct protoent *pe, char *buffer, size buflen -= written; if (pe->p_aliases != NULL) { - if (*(pe->p_aliases) != '\0') { + if (*(pe->p_aliases) != NULL) { for (cp = pe->p_aliases; *cp; ++cp) { written = snprintf(buffer, buflen, " %s", *cp); buffer += written; Modified: stable/11/lib/libc/tests/nss/getrpc_test.c ============================================================================== --- stable/11/lib/libc/tests/nss/getrpc_test.c Tue Oct 15 19:44:43 2019 (r353588) +++ stable/11/lib/libc/tests/nss/getrpc_test.c Tue Oct 15 20:04:15 2019 (r353589) @@ -147,7 +147,7 @@ compare_rpcent(struct rpcent *rpc1, struct rpcent *rpc if (strcmp(*c1, *c2) != 0) goto errfin; - if ((*c1 != '\0') || (*c2 != '\0')) + if ((*c1 != NULL) || (*c2 != NULL)) goto errfin; return 0; @@ -176,7 +176,7 @@ sdump_rpcent(struct rpcent *rpc, char *buffer, size_t buflen -= written; if (rpc->r_aliases != NULL) { - if (*(rpc->r_aliases) != '\0') { + if (*(rpc->r_aliases) != NULL) { for (cp = rpc->r_aliases; *cp; ++cp) { written = snprintf(buffer, buflen, " %s", *cp); buffer += written; Modified: stable/11/lib/libc/tests/nss/getserv_test.c ============================================================================== --- stable/11/lib/libc/tests/nss/getserv_test.c Tue Oct 15 19:44:43 2019 (r353588) +++ stable/11/lib/libc/tests/nss/getserv_test.c Tue Oct 15 20:04:15 2019 (r353589) @@ -153,7 +153,7 @@ compare_servent(struct servent *serv1, struct servent if (strcmp(*c1, *c2) != 0) goto errfin; - if ((*c1 != '\0') || (*c2 != '\0')) + if ((*c1 != NULL) || (*c2 != NULL)) goto errfin; return 0; @@ -182,7 +182,7 @@ sdump_servent(struct servent *serv, char *buffer, size buflen -= written; if (serv->s_aliases != NULL) { - if (*(serv->s_aliases) != '\0') { + if (*(serv->s_aliases) != NULL) { for (cp = serv->s_aliases; *cp; ++cp) { written = snprintf(buffer, buflen, " %s", *cp); buffer += written; Modified: stable/11/usr.bin/tip/tip/acu.c ============================================================================== --- stable/11/usr.bin/tip/tip/acu.c Tue Oct 15 19:44:43 2019 (r353588) +++ stable/11/usr.bin/tip/tip/acu.c Tue Oct 15 20:04:15 2019 (r353589) @@ -188,7 +188,7 @@ acutype(char *s) acu_t *p; extern acu_t acutable[]; - for (p = acutable; p->acu_name != '\0'; p++) + for (p = acutable; p->acu_name != NULL; p++) if (!strcmp(s, p->acu_name)) return (p); return (NOACU); Modified: stable/11/usr.sbin/fwcontrol/fwcontrol.c ============================================================================== --- stable/11/usr.sbin/fwcontrol/fwcontrol.c Tue Oct 15 19:44:43 2019 (r353588) +++ stable/11/usr.sbin/fwcontrol/fwcontrol.c Tue Oct 15 20:04:15 2019 (r353589) @@ -127,7 +127,7 @@ str2node(int fd, const char *nodestr) char *endptr; int i, node; - if (nodestr == '\0') + if (nodestr == NULL || *nodestr == '\0') return (-1); /* From owner-svn-src-stable-11@freebsd.org Tue Oct 15 20:10:48 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 04C411532DC; Tue, 15 Oct 2019 20:10:48 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46t64R6Pbsz3HxQ; Tue, 15 Oct 2019 20:10:47 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C068C23D07; Tue, 15 Oct 2019 20:10:47 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x9FKAlt7015424; Tue, 15 Oct 2019 20:10:47 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x9FKAlN1015423; Tue, 15 Oct 2019 20:10:47 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201910152010.x9FKAlN1015423@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Tue, 15 Oct 2019 20:10:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r353591 - stable/11/lib/msun/src X-SVN-Group: stable-11 X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: stable/11/lib/msun/src X-SVN-Commit-Revision: 353591 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Oct 2019 20:10:48 -0000 Author: brooks Date: Tue Oct 15 20:10:47 2019 New Revision: 353591 URL: https://svnweb.freebsd.org/changeset/base/353591 Log: MFC r353329: msun: Silence new harmless -Wimplicit-int-float-conversion warnings Clang from trunk recently added a warning for when implicit int-to-float conversions cause a loss of precision. The code in question is designed to be able to handle that, so add explicit casts to silence this. Submitted by: James Clarke Reviewed by: dim Obtained from: CheriBSD Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D21913 Modified: stable/11/lib/msun/src/s_lround.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/msun/src/s_lround.c ============================================================================== --- stable/11/lib/msun/src/s_lround.c Tue Oct 15 20:08:19 2019 (r353590) +++ stable/11/lib/msun/src/s_lround.c Tue Oct 15 20:10:47 2019 (r353591) @@ -47,9 +47,9 @@ __FBSDID("$FreeBSD$"); * that everything is in range. At compile time, INRANGE(x) should reduce to * two floating-point comparisons in the former case, or TRUE otherwise. */ -static const type dtype_min = DTYPE_MIN - 0.5; -static const type dtype_max = DTYPE_MAX + 0.5; -#define INRANGE(x) (dtype_max - DTYPE_MAX != 0.5 || \ +static const type dtype_min = (type)DTYPE_MIN - 0.5; +static const type dtype_max = (type)DTYPE_MAX + 0.5; +#define INRANGE(x) (dtype_max - (type)DTYPE_MAX != 0.5 || \ ((x) > dtype_min && (x) < dtype_max)) dtype From owner-svn-src-stable-11@freebsd.org Wed Oct 16 21:54:49 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6601E15112C; Wed, 16 Oct 2019 21:54:49 +0000 (UTC) (envelope-from erj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46tmL1237Xz4KPG; Wed, 16 Oct 2019 21:54:49 +0000 (UTC) (envelope-from erj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2AE92D8A1; Wed, 16 Oct 2019 21:54:49 +0000 (UTC) (envelope-from erj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x9GLsn9L033066; Wed, 16 Oct 2019 21:54:49 GMT (envelope-from erj@FreeBSD.org) Received: (from erj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x9GLsnix033065; Wed, 16 Oct 2019 21:54:49 GMT (envelope-from erj@FreeBSD.org) Message-Id: <201910162154.x9GLsnix033065@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: erj set sender to erj@FreeBSD.org using -f From: Eric Joyner Date: Wed, 16 Oct 2019 21:54:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r353669 - stable/11/sys/dev/ixgbe X-SVN-Group: stable-11 X-SVN-Commit-Author: erj X-SVN-Commit-Paths: stable/11/sys/dev/ixgbe X-SVN-Commit-Revision: 353669 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Oct 2019 21:54:49 -0000 Author: erj Date: Wed Oct 16 21:54:48 2019 New Revision: 353669 URL: https://svnweb.freebsd.org/changeset/base/353669 Log: MFC r353599 MFCs ixgbe: Disable EEE for backplane X550EM_X This prevents a possible kernel panic on X552 backplane devices. PR: 240320 Sponsored by: Intel Corporation Modified: stable/11/sys/dev/ixgbe/if_ix.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/ixgbe/if_ix.c ============================================================================== --- stable/11/sys/dev/ixgbe/if_ix.c Wed Oct 16 21:49:44 2019 (r353668) +++ stable/11/sys/dev/ixgbe/if_ix.c Wed Oct 16 21:54:48 2019 (r353669) @@ -4591,7 +4591,7 @@ ixgbe_sysctl_eee_state(SYSCTL_HANDLER_ARGS) if ((new_eee < 0) || (new_eee > 1)) return (EINVAL); - retval = adapter->hw.mac.ops.setup_eee(&adapter->hw, new_eee); + retval = ixgbe_setup_eee(&adapter->hw, new_eee); if (retval) { device_printf(dev, "Error in EEE setup: 0x%08X\n", retval); return (EINVAL); @@ -4645,8 +4645,6 @@ ixgbe_init_device_features(struct adapter *adapter) case ixgbe_mac_X550EM_x: adapter->feat_cap |= IXGBE_FEATURE_SRIOV; adapter->feat_cap |= IXGBE_FEATURE_FDIR; - if (adapter->hw.device_id == IXGBE_DEV_ID_X550EM_X_KR) - adapter->feat_cap |= IXGBE_FEATURE_EEE; break; case ixgbe_mac_X550EM_a: adapter->feat_cap |= IXGBE_FEATURE_SRIOV; From owner-svn-src-stable-11@freebsd.org Fri Oct 18 03:38:03 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5FA0416555B; Fri, 18 Oct 2019 03:38:03 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46vWvb1vGBz45G0; Fri, 18 Oct 2019 03:38:03 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2454E2CBE; Fri, 18 Oct 2019 03:38:03 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x9I3c2qP083699; Fri, 18 Oct 2019 03:38:02 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x9I3c2rc083698; Fri, 18 Oct 2019 03:38:02 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201910180338.x9I3c2rc083698@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Fri, 18 Oct 2019 03:38:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r353717 - stable/11/sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: kp X-SVN-Commit-Paths: stable/11/sys/kern X-SVN-Commit-Revision: 353717 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Oct 2019 03:38:03 -0000 Author: kp Date: Fri Oct 18 03:38:02 2019 New Revision: 353717 URL: https://svnweb.freebsd.org/changeset/base/353717 Log: MFC r353443 mountroot: run statfs after mounting devfs The usual flow for mounting a file system is to VFS_MOUNT() and then immediately VFS_STATFS(). That's not done in vfs_mountroot_devfs(), which means the mp->mnt_stat.f_iosize field is not correctly populated, which in turn causes us to mark valid aio operations as unsafe (because the io size is set to 0), ultimately causing the aio_test:md_waitcomplete test to fail. Sponsored by: Axiado Modified: stable/11/sys/kern/vfs_mountroot.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/vfs_mountroot.c ============================================================================== --- stable/11/sys/kern/vfs_mountroot.c Fri Oct 18 03:38:01 2019 (r353716) +++ stable/11/sys/kern/vfs_mountroot.c Fri Oct 18 03:38:02 2019 (r353717) @@ -258,6 +258,11 @@ vfs_mountroot_devfs(struct thread *td, struct mount ** if (error) return (error); + error = VFS_STATFS(mp, &mp->mnt_stat); + KASSERT(error == 0, ("VFS_STATFS(devfs) failed %d", error)); + if (error) + return (error); + opts = malloc(sizeof(struct vfsoptlist), M_MOUNT, M_WAITOK); TAILQ_INIT(opts); mp->mnt_opt = opts; From owner-svn-src-stable-11@freebsd.org Fri Oct 18 08:38:08 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 659B814A262; Fri, 18 Oct 2019 08:38:08 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46vfYr24KTz4JTX; Fri, 18 Oct 2019 08:38:08 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 25F6E64D3; Fri, 18 Oct 2019 08:38:08 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x9I8c7PT060046; Fri, 18 Oct 2019 08:38:07 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x9I8c7iF060045; Fri, 18 Oct 2019 08:38:07 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201910180838.x9I8c7iF060045@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 18 Oct 2019 08:38:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r353721 - stable/11/sys/fs/msdosfs X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/fs/msdosfs X-SVN-Commit-Revision: 353721 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Oct 2019 08:38:08 -0000 Author: kib Date: Fri Oct 18 08:38:07 2019 New Revision: 353721 URL: https://svnweb.freebsd.org/changeset/base/353721 Log: MFC r353446: Plug the rest of undef behavior places that were missed in r337456. Modified: stable/11/sys/fs/msdosfs/msdosfs_fat.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/msdosfs/msdosfs_fat.c ============================================================================== --- stable/11/sys/fs/msdosfs/msdosfs_fat.c Fri Oct 18 08:36:08 2019 (r353720) +++ stable/11/sys/fs/msdosfs/msdosfs_fat.c Fri Oct 18 08:38:07 2019 (r353721) @@ -387,9 +387,10 @@ usemap_alloc(struct msdosfsmount *pmp, u_long cn) pmp->pm_maxcluster)); KASSERT((pmp->pm_flags & MSDOSFSMNT_RONLY) == 0, ("usemap_alloc on ro msdosfs mount")); - KASSERT((pmp->pm_inusemap[cn / N_INUSEBITS] & (1 << (cn % N_INUSEBITS))) - == 0, ("Allocating used sector %ld %ld %x", cn, cn % N_INUSEBITS, - (unsigned)pmp->pm_inusemap[cn / N_INUSEBITS])); + KASSERT((pmp->pm_inusemap[cn / N_INUSEBITS] & + (1U << (cn % N_INUSEBITS))) == 0, + ("Allocating used sector %ld %ld %x", cn, cn % N_INUSEBITS, + (unsigned)pmp->pm_inusemap[cn / N_INUSEBITS])); pmp->pm_inusemap[cn / N_INUSEBITS] |= 1U << (cn % N_INUSEBITS); KASSERT(pmp->pm_freeclustercount > 0, ("usemap_alloc: too little")); pmp->pm_freeclustercount--; @@ -408,9 +409,10 @@ usemap_free(struct msdosfsmount *pmp, u_long cn) ("usemap_free on ro msdosfs mount")); pmp->pm_freeclustercount++; pmp->pm_flags |= MSDOSFS_FSIMOD; - KASSERT((pmp->pm_inusemap[cn / N_INUSEBITS] & (1 << (cn % N_INUSEBITS))) - != 0, ("Freeing unused sector %ld %ld %x", cn, cn % N_INUSEBITS, - (unsigned)pmp->pm_inusemap[cn / N_INUSEBITS])); + KASSERT((pmp->pm_inusemap[cn / N_INUSEBITS] & + (1U << (cn % N_INUSEBITS))) != 0, + ("Freeing unused sector %ld %ld %x", cn, cn % N_INUSEBITS, + (unsigned)pmp->pm_inusemap[cn / N_INUSEBITS])); pmp->pm_inusemap[cn / N_INUSEBITS] &= ~(1U << (cn % N_INUSEBITS)); } @@ -649,7 +651,7 @@ chainlength(struct msdosfsmount *pmp, u_long start, u_ idx = start / N_INUSEBITS; start %= N_INUSEBITS; map = pmp->pm_inusemap[idx]; - map &= ~((1 << start) - 1); + map &= ~((1U << start) - 1); if (map) { len = ffs(map) - 1 - start; len = MIN(len, count); From owner-svn-src-stable-11@freebsd.org Fri Oct 18 08:39:11 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9515914A2F2; Fri, 18 Oct 2019 08:39:11 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46vfb32SF4z4JcW; Fri, 18 Oct 2019 08:39:11 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3804064D5; Fri, 18 Oct 2019 08:39:11 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x9I8dBPG060147; Fri, 18 Oct 2019 08:39:11 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x9I8dBuY060146; Fri, 18 Oct 2019 08:39:11 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201910180839.x9I8dBuY060146@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 18 Oct 2019 08:39:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r353722 - stable/11/sys/fs/devfs X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/fs/devfs X-SVN-Commit-Revision: 353722 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Oct 2019 08:39:11 -0000 Author: kib Date: Fri Oct 18 08:39:10 2019 New Revision: 353722 URL: https://svnweb.freebsd.org/changeset/base/353722 Log: MFC r353447: devfs_vptocnp(): correct the component name when node is not at top. Modified: stable/11/sys/fs/devfs/devfs_vnops.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/devfs/devfs_vnops.c ============================================================================== --- stable/11/sys/fs/devfs/devfs_vnops.c Fri Oct 18 08:38:07 2019 (r353721) +++ stable/11/sys/fs/devfs/devfs_vnops.c Fri Oct 18 08:39:10 2019 (r353722) @@ -280,38 +280,27 @@ devfs_vptocnp(struct vop_vptocnp_args *ap) if (error != 0) return (error); - i = *buflen; + if (vp->v_type != VCHR && vp->v_type != VDIR) { + error = ENOENT; + goto finished; + } + dd = vp->v_data; + if (vp->v_type == VDIR && dd == dmp->dm_rootdir) { + *dvp = vp; + vref(*dvp); + goto finished; + } - if (vp->v_type == VCHR) { - i -= strlen(dd->de_cdp->cdp_c.si_name); - if (i < 0) { - error = ENOMEM; - goto finished; - } - bcopy(dd->de_cdp->cdp_c.si_name, buf + i, - strlen(dd->de_cdp->cdp_c.si_name)); - de = dd->de_dir; - } else if (vp->v_type == VDIR) { - if (dd == dmp->dm_rootdir) { - *dvp = vp; - vref(*dvp); - goto finished; - } - i -= dd->de_dirent->d_namlen; - if (i < 0) { - error = ENOMEM; - goto finished; - } - bcopy(dd->de_dirent->d_name, buf + i, - dd->de_dirent->d_namlen); - de = dd; - } else { - error = ENOENT; + i = *buflen; + i -= dd->de_dirent->d_namlen; + if (i < 0) { + error = ENOMEM; goto finished; } + bcopy(dd->de_dirent->d_name, buf + i, dd->de_dirent->d_namlen); *buflen = i; - de = devfs_parent_dirent(de); + de = devfs_parent_dirent(dd); if (de == NULL) { error = ENOENT; goto finished; From owner-svn-src-stable-11@freebsd.org Sat Oct 19 07:38:02 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B7FBA15C2ED; Sat, 19 Oct 2019 07:38:02 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46wFB24SkCz3QCp; Sat, 19 Oct 2019 07:38:02 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7D75B1F289; Sat, 19 Oct 2019 07:38:02 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x9J7c2PM070751; Sat, 19 Oct 2019 07:38:02 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x9J7c2kc070750; Sat, 19 Oct 2019 07:38:02 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201910190738.x9J7c2kc070750@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Sat, 19 Oct 2019 07:38:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r353751 - stable/11/cddl/contrib/opensolaris/cmd/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/cddl/contrib/opensolaris/cmd/zfs X-SVN-Commit-Revision: 353751 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Oct 2019 07:38:02 -0000 Author: avg Date: Sat Oct 19 07:38:02 2019 New Revision: 353751 URL: https://svnweb.freebsd.org/changeset/base/353751 Log: MFC r353649: fix section number in zfs-program.8 Modified: stable/11/cddl/contrib/opensolaris/cmd/zfs/zfs-program.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/cddl/contrib/opensolaris/cmd/zfs/zfs-program.8 ============================================================================== --- stable/11/cddl/contrib/opensolaris/cmd/zfs/zfs-program.8 Sat Oct 19 07:37:18 2019 (r353750) +++ stable/11/cddl/contrib/opensolaris/cmd/zfs/zfs-program.8 Sat Oct 19 07:38:02 2019 (r353751) @@ -11,7 +11,7 @@ .\" Copyright (c) 2016, 2017 by Delphix. All rights reserved. .\" .Dd October 02, 2017 -.Dt ZFS-PROGRAM 1M +.Dt ZFS-PROGRAM 8 .Os .Sh NAME .Nm zfs program From owner-svn-src-stable-11@freebsd.org Sat Oct 19 07:45:11 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D005C15C5FB; Sat, 19 Oct 2019 07:45:11 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46wFLH59Mbz3Qml; Sat, 19 Oct 2019 07:45:11 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 961AB1F448; Sat, 19 Oct 2019 07:45:11 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x9J7jBo7076861; Sat, 19 Oct 2019 07:45:11 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x9J7jBY2076860; Sat, 19 Oct 2019 07:45:11 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201910190745.x9J7jBY2076860@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Sat, 19 Oct 2019 07:45:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r353753 - stable/11/share/man/man4 X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/share/man/man4 X-SVN-Commit-Revision: 353753 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Oct 2019 07:45:11 -0000 Author: avg Date: Sat Oct 19 07:45:11 2019 New Revision: 353753 URL: https://svnweb.freebsd.org/changeset/base/353753 Log: MFC r353434: man4/Makefile: fix sorting for some entries starting with 'v' Modified: stable/11/share/man/man4/Makefile Modified: stable/11/share/man/man4/Makefile ============================================================================== --- stable/11/share/man/man4/Makefile Sat Oct 19 07:41:22 2019 (r353752) +++ stable/11/share/man/man4/Makefile Sat Oct 19 07:45:11 2019 (r353753) @@ -845,6 +845,13 @@ _nvd.4= nvd.4 _nvme.4= nvme.4 _nvram.4= nvram.4 _nxge.4= nxge.4 +_padlock.4= padlock.4 +_rr232x.4= rr232x.4 +_speaker.4= speaker.4 +_spkr.4= spkr.4 +_tpm.4= tpm.4 +_urtw.4= urtw.4 +_viawd.4= viawd.4 _virtio.4= virtio.4 _virtio_balloon.4=virtio_balloon.4 _virtio_blk.4= virtio_blk.4 @@ -854,13 +861,6 @@ _virtio_scsi.4= virtio_scsi.4 _vmx.4= vmx.4 _vtnet.4= vtnet.4 _vxge.4= vxge.4 -_padlock.4= padlock.4 -_rr232x.4= rr232x.4 -_speaker.4= speaker.4 -_spkr.4= spkr.4 -_tpm.4= tpm.4 -_urtw.4= urtw.4 -_viawd.4= viawd.4 _wbwd.4= wbwd.4 _wpi.4= wpi.4 _xen.4= xen.4 From owner-svn-src-stable-11@freebsd.org Sat Oct 19 07:53:21 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 73AED15CA0D; Sat, 19 Oct 2019 07:53:21 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46wFWj2VJFz3wlM; Sat, 19 Oct 2019 07:53:21 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3A39C1F61E; Sat, 19 Oct 2019 07:53:21 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x9J7rLDN083030; Sat, 19 Oct 2019 07:53:21 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x9J7rLJQ083029; Sat, 19 Oct 2019 07:53:21 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201910190753.x9J7rLJQ083029@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Sat, 19 Oct 2019 07:53:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r353756 - stable/11/cddl/contrib/opensolaris/lib/libzfs/common X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/cddl/contrib/opensolaris/lib/libzfs/common X-SVN-Commit-Revision: 353756 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Oct 2019 07:53:21 -0000 Author: avg Date: Sat Oct 19 07:53:20 2019 New Revision: 353756 URL: https://svnweb.freebsd.org/changeset/base/353756 Log: MFC r353343: zfs: remove gratuitous divergence from other openzfs flavours Modified: stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Directory Properties: stable/11/ (props changed) Modified: stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c ============================================================================== --- stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Sat Oct 19 07:51:49 2019 (r353755) +++ stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Sat Oct 19 07:53:20 2019 (r353756) @@ -1206,7 +1206,6 @@ dump_snapshot(zfs_handle_t *zhp, void *arg) boolean_t isfromsnap, istosnap, fromorigin; boolean_t exclude = B_FALSE; FILE *fout = sdd->std_out ? stdout : stderr; - uint64_t size = 0; err = 0; thissnap = strchr(zhp->zfs_name, '@') + 1; @@ -1282,6 +1281,7 @@ dump_snapshot(zfs_handle_t *zhp, void *arg) (sdd->fromorigin || sdd->replicate); if (sdd->verbose || sdd->progress) { + uint64_t size = 0; char fromds[ZFS_MAX_DATASET_NAME_LEN]; if (sdd->prevsnap[0] != '\0') { From owner-svn-src-stable-11@freebsd.org Sat Oct 19 08:19:50 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C7FC715D42B; Sat, 19 Oct 2019 08:19:50 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46wG6G5hMwz3y0l; Sat, 19 Oct 2019 08:19:50 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A7B041F9BC; Sat, 19 Oct 2019 08:19:50 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x9J8Jos6095698; Sat, 19 Oct 2019 08:19:50 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x9J8JnWB095690; Sat, 19 Oct 2019 08:19:49 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201910190819.x9J8JnWB095690@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Sat, 19 Oct 2019 08:19:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r353759 - in stable/11: cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/opensolaris/uts/commo... X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: in stable/11: cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys X-SVN-Commit-Revision: 353759 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Oct 2019 08:19:50 -0000 Author: avg Date: Sat Oct 19 08:19:49 2019 New Revision: 353759 URL: https://svnweb.freebsd.org/changeset/base/353759 Log: MFC r353037: ZFS: add bookmark renaming Modified: stable/11/cddl/contrib/opensolaris/cmd/zfs/zfs.8 stable/11/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_bookmark.c stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_bookmark.h stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Directory Properties: stable/11/ (props changed) Modified: stable/11/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- stable/11/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Sat Oct 19 08:19:31 2019 (r353758) +++ stable/11/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Sat Oct 19 08:19:49 2019 (r353759) @@ -104,6 +104,9 @@ .Ar snapshot snapshot .Nm .Cm rename +.Ar bookmark bookmark +.Nm +.Cm rename .Fl u .Op Fl p .Ar filesystem filesystem @@ -2086,6 +2089,16 @@ flag. .Pp Recursively rename the snapshots of all descendent datasets. Snapshots are the only dataset that can be renamed recursively. +.It Xo +.Nm +.Cm rename +.Ar bookmark bookmark +.Xc +.Pp +Renames the given bookmark. +Bookmarks can only be renamed within the parent file system or volume. +When renaming a bookmark, the parent file system or volume of the bookmark +does not need to be specified as part of the second argument. .It Xo .Nm .Cm list Modified: stable/11/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c ============================================================================== --- stable/11/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Sat Oct 19 08:19:31 2019 (r353758) +++ stable/11/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Sat Oct 19 08:19:49 2019 (r353759) @@ -283,6 +283,7 @@ get_usage(zfs_help_t idx) "\n" "\trename [-f] -p \n" "\trename -r \n" + "\trename \n" "\trename -u [-p] ")); case HELP_ROLLBACK: return (gettext("\trollback [-rRf] \n")); @@ -3253,6 +3254,7 @@ zfs_do_list(int argc, char **argv) * zfs rename [-f] * zfs rename [-f] -p * zfs rename -r + * zfs rename * zfs rename -u [-p] * * Renames the given dataset to another of the same type. @@ -3269,6 +3271,7 @@ zfs_do_rename(int argc, char **argv) int ret = 0; int types; boolean_t parents = B_FALSE; + boolean_t bookmarks = B_FALSE; char *snapshot = NULL; /* check options */ @@ -3319,7 +3322,7 @@ zfs_do_rename(int argc, char **argv) usage(B_FALSE); } - if (flags.recurse && strchr(argv[0], '@') == 0) { + if (flags.recurse && strchr(argv[0], '@') == NULL) { (void) fprintf(stderr, gettext("source dataset for recursive " "rename must be a snapshot\n")); usage(B_FALSE); @@ -3331,10 +3334,22 @@ zfs_do_rename(int argc, char **argv) usage(B_FALSE); } + if (strchr(argv[0], '#') != NULL) + bookmarks = B_TRUE; + + if (bookmarks && (flags.nounmount || flags.recurse || + flags.forceunmount || parents)) { + (void) fprintf(stderr, gettext("options are not supported " + "for renaming bookmarks\n")); + usage(B_FALSE); + } + if (flags.nounmount) types = ZFS_TYPE_FILESYSTEM; else if (parents) types = ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME; + else if (bookmarks) + types = ZFS_TYPE_BOOKMARK; else types = ZFS_TYPE_DATASET; Modified: stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Sat Oct 19 08:19:31 2019 (r353758) +++ stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Sat Oct 19 08:19:49 2019 (r353759) @@ -4286,17 +4286,18 @@ zfs_rename(zfs_handle_t *zhp, const char *source, cons /* * Make sure the target name is valid */ - if (zhp->zfs_type == ZFS_TYPE_SNAPSHOT) { - if ((strchr(target, '@') == NULL) || - *target == '@') { + if (zhp->zfs_type == ZFS_TYPE_SNAPSHOT || + zhp->zfs_type == ZFS_TYPE_BOOKMARK) { + const char sep = zhp->zfs_type == ZFS_TYPE_SNAPSHOT ? '@' : '#'; + + if ((strchr(target, sep) == NULL) || *target == sep) { /* * Snapshot target name is abbreviated, * reconstruct full dataset name */ - (void) strlcpy(parent, zhp->zfs_name, - sizeof (parent)); - delim = strchr(parent, '@'); - if (strchr(target, '@') == NULL) + (void) strlcpy(parent, zhp->zfs_name, sizeof (parent)); + delim = strchr(parent, sep); + if (strchr(target, sep) == NULL) *(++delim) = '\0'; else *delim = '\0'; @@ -4306,12 +4307,13 @@ zfs_rename(zfs_handle_t *zhp, const char *source, cons /* * Make sure we're renaming within the same dataset. */ - delim = strchr(target, '@'); + delim = strchr(target, sep); if (strncmp(zhp->zfs_name, target, delim - target) - != 0 || zhp->zfs_name[delim - target] != '@') { + != 0 || zhp->zfs_name[delim - target] != sep) { zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, - "snapshots must be part of same " - "dataset")); + "%s must be part of same dataset"), + zhp->zfs_type == ZFS_TYPE_SNAPSHOT ? + "snapshots" : "bookmarks"); return (zfs_error(hdl, EZFS_CROSSTARGET, errbuf)); } @@ -4374,7 +4376,6 @@ zfs_rename(zfs_handle_t *zhp, const char *source, cons flags.nounmount = B_TRUE; } if (flags.recurse) { - parentname = zfs_strdup(zhp->zfs_hdl, zhp->zfs_name); if (parentname == NULL) { ret = -1; @@ -4387,7 +4388,8 @@ zfs_rename(zfs_handle_t *zhp, const char *source, cons ret = -1; goto error; } - } else if (zhp->zfs_type != ZFS_TYPE_SNAPSHOT) { + } else if (zhp->zfs_type != ZFS_TYPE_SNAPSHOT && + zhp->zfs_type != ZFS_TYPE_BOOKMARK) { if ((cl = changelist_gather(zhp, ZFS_PROP_NAME, flags.nounmount ? CL_GATHER_DONT_UNMOUNT : 0, flags.forceunmount ? MS_FORCE : 0)) == NULL) { @@ -4432,6 +4434,8 @@ zfs_rename(zfs_handle_t *zhp, const char *source, cons "a child dataset already has a snapshot " "with the new name")); (void) zfs_error(hdl, EZFS_EXISTS, errbuf); + } else if (errno == EINVAL) { + (void) zfs_error(hdl, EZFS_INVALIDNAME, errbuf); } else { (void) zfs_standard_error(zhp->zfs_hdl, errno, errbuf); } Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_bookmark.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_bookmark.c Sat Oct 19 08:19:31 2019 (r353758) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_bookmark.c Sat Oct 19 08:19:49 2019 (r353759) @@ -459,3 +459,108 @@ dsl_bookmark_destroy(nvlist_t *bmarks, nvlist_t *error fnvlist_free(dbda.dbda_success); return (rv); } + +typedef struct dsl_bookmark_rename_arg { + const char *dbra_fsname; + const char *dbra_oldname; + const char *dbra_newname; +} dsl_bookmark_rename_arg_t; + +static int +dsl_bookmark_rename_check(void *arg, dmu_tx_t *tx) +{ + dsl_bookmark_rename_arg_t *dbra = arg; + dsl_pool_t *dp = dmu_tx_pool(tx); + dsl_dataset_t *ds; + zfs_bookmark_phys_t bmark_phys; + int error; + + if (!spa_feature_is_enabled(dp->dp_spa, SPA_FEATURE_BOOKMARKS)) + return (SET_ERROR(ENOTSUP)); + + /* Check validity and the full length of the new bookmark name. */ + if (zfs_component_namecheck(dbra->dbra_newname, NULL, NULL)) + return (SET_ERROR(EINVAL)); + if (strlen(dbra->dbra_fsname) + strlen(dbra->dbra_newname) + 1 >= + ZFS_MAX_DATASET_NAME_LEN) + return (SET_ERROR(ENAMETOOLONG)); + + error = dsl_dataset_hold(dp, dbra->dbra_fsname, FTAG, &ds); + if (error != 0) + return (error); + if (ds->ds_is_snapshot) { + dsl_dataset_rele(ds, FTAG); + return (SET_ERROR(EINVAL)); + } + error = dsl_dataset_bmark_lookup(ds, dbra->dbra_oldname, &bmark_phys); + if (error != 0) { + dsl_dataset_rele(ds, FTAG); + return (error); + } + + error = dsl_dataset_bmark_lookup(ds, dbra->dbra_newname, &bmark_phys); + dsl_dataset_rele(ds, FTAG); + if (error == 0) + return (SET_ERROR(EEXIST)); + if (error != ESRCH) + return (error); + return (0); +} + +static void +dsl_bookmark_rename_sync(void *arg, dmu_tx_t *tx) +{ + zfs_bookmark_phys_t bmark_phys; + dsl_bookmark_rename_arg_t *dbra = arg; + dsl_pool_t *dp = dmu_tx_pool(tx); + objset_t *mos; + dsl_dataset_t *ds; + uint64_t bmark_zapobj; + uint64_t int_size, num_ints; + matchtype_t mt = 0; + int error; + + ASSERT(spa_feature_is_enabled(dp->dp_spa, SPA_FEATURE_BOOKMARKS)); + VERIFY0(dsl_dataset_hold(dp, dbra->dbra_fsname, FTAG, &ds)); + + mos = ds->ds_dir->dd_pool->dp_meta_objset; + bmark_zapobj = ds->ds_bookmarks; + + if (dsl_dataset_phys(ds)->ds_flags & DS_FLAG_CI_DATASET) + mt = MT_NORMALIZE; + + VERIFY0(zap_length(mos, bmark_zapobj, dbra->dbra_oldname, + &int_size, &num_ints)); + ASSERT3U(int_size, ==, sizeof (uint64_t)); + VERIFY0(zap_lookup_norm(mos, bmark_zapobj, dbra->dbra_oldname, int_size, + num_ints, &bmark_phys, mt, NULL, 0, NULL)); + VERIFY0(zap_remove_norm(mos, bmark_zapobj, dbra->dbra_oldname, mt, tx)); + + VERIFY0(zap_add(mos, bmark_zapobj, dbra->dbra_newname, int_size, + num_ints, &bmark_phys, tx)); + + spa_history_log_internal_ds(ds, "rename bookmark", tx, + "#%s -> #%s creation_txg=%llu", + dbra->dbra_oldname, dbra->dbra_newname, + (longlong_t)bmark_phys.zbm_creation_txg); + + dsl_dataset_rele(ds, FTAG); +} + +/* + * The bookmarks must all be in the same pool. + */ +int +dsl_bookmark_rename(const char *fsname, const char *oldbmark, + const char *newbmark) +{ + dsl_bookmark_rename_arg_t dbra; + + dbra.dbra_fsname = fsname; + dbra.dbra_oldname = oldbmark; + dbra.dbra_newname = newbmark; + + return (dsl_sync_task(fsname, dsl_bookmark_rename_check, + dsl_bookmark_rename_sync, &dbra, 1, ZFS_SPACE_CHECK_NORMAL)); +} + Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_bookmark.h ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_bookmark.h Sat Oct 19 08:19:31 2019 (r353758) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_bookmark.h Sat Oct 19 08:19:49 2019 (r353759) @@ -41,6 +41,7 @@ int dsl_bookmark_create(nvlist_t *, nvlist_t *); int dsl_get_bookmarks(const char *, nvlist_t *, nvlist_t *); int dsl_get_bookmarks_impl(dsl_dataset_t *, nvlist_t *, nvlist_t *); int dsl_bookmark_destroy(nvlist_t *, nvlist_t *); +int dsl_bookmark_rename(const char *fs, const char *from, const char *to); int dsl_bookmark_lookup(struct dsl_pool *, const char *, struct dsl_dataset *, zfs_bookmark_phys_t *); Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Sat Oct 19 08:19:31 2019 (r353758) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Sat Oct 19 08:19:49 2019 (r353759) @@ -225,7 +225,8 @@ typedef int zfs_secpolicy_func_t(zfs_cmd_t *, nvlist_t typedef enum { NO_NAME, POOL_NAME, - DATASET_NAME + DATASET_NAME, + ENTITY_NAME } zfs_ioc_namecheck_t; typedef enum { @@ -923,8 +924,21 @@ static int zfs_secpolicy_rename(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr) { char *at = NULL; + char *pound; int error; + if ((pound = strchr(zc->zc_name, '#')) != NULL) { + *pound = '\0'; + error = zfs_secpolicy_write_perms(zc->zc_name, + ZFS_DELEG_PERM_RENAME, cr); + if (error == 0) { + error = zfs_secpolicy_write_perms(zc->zc_name, + ZFS_DELEG_PERM_BOOKMARK, cr); + } + *pound = '#'; + return (error); + } + if ((zc->zc_cookie & 1) != 0) { /* * This is recursive rename, so the starting snapshot might @@ -4021,8 +4035,8 @@ recursive_unmount(const char *fsname, void *arg) /* * inputs: - * zc_name old name of dataset - * zc_value new name of dataset + * zc_name old name of dataset or bookmark + * zc_value new name of dataset or bookmark * zc_cookie recursive flag (only valid for snapshots) * * outputs: none @@ -4033,7 +4047,7 @@ zfs_ioc_rename(zfs_cmd_t *zc) objset_t *os; dmu_objset_type_t ost; boolean_t recursive = zc->zc_cookie & 1; - char *at; + char *pos, *pos2; boolean_t allow_mounted = B_TRUE; int err; @@ -4041,9 +4055,34 @@ zfs_ioc_rename(zfs_cmd_t *zc) allow_mounted = (zc->zc_cookie & 2) != 0; #endif - /* "zfs rename" from and to ...%recv datasets should both fail */ zc->zc_name[sizeof (zc->zc_name) - 1] = '\0'; zc->zc_value[sizeof (zc->zc_value) - 1] = '\0'; + + pos = strchr(zc->zc_name, '#'); + if (pos != NULL) { + /* Bookmarks must be in same fs. */ + pos2 = strchr(zc->zc_value, '#'); + if (pos2 == NULL) + return (SET_ERROR(EINVAL)); + + /* Recursive flag is not supported yet. */ + if (recursive) + return (SET_ERROR(ENOTSUP)); + + *pos = '\0'; + *pos2 = '\0'; + if (strcmp(zc->zc_name, zc->zc_value) == 0) { + err = dsl_bookmark_rename(zc->zc_name, + pos + 1, pos2 + 1); + } else { + err = SET_ERROR(EXDEV); + } + *pos = '#'; + *pos2 = '#'; + return (err); + } + + /* "zfs rename" from and to ...%recv datasets should both fail */ if (dataset_namecheck(zc->zc_name, NULL, NULL) != 0 || dataset_namecheck(zc->zc_value, NULL, NULL) != 0 || strchr(zc->zc_name, '%') || strchr(zc->zc_value, '%')) @@ -4055,28 +4094,30 @@ zfs_ioc_rename(zfs_cmd_t *zc) ost = dmu_objset_type(os); dmu_objset_rele(os, FTAG); - at = strchr(zc->zc_name, '@'); - if (at != NULL) { - /* snaps must be in same fs */ - int error; - - if (strncmp(zc->zc_name, zc->zc_value, at - zc->zc_name + 1)) - return (SET_ERROR(EXDEV)); - *at = '\0'; - if (ost == DMU_OST_ZFS && !allow_mounted) { - error = dmu_objset_find(zc->zc_name, - recursive_unmount, at + 1, - recursive ? DS_FIND_CHILDREN : 0); - if (error != 0) { - *at = '@'; - return (error); + pos = strchr(zc->zc_name, '@'); + if (pos != NULL) { + /* Snapshots must be in same fs. */ + pos2 = strchr(zc->zc_value, '@'); + if (pos2 == NULL) + return (SET_ERROR(EINVAL)); + *pos = '\0'; + *pos2 = '\0'; + if (strcmp(zc->zc_name, zc->zc_value) != 0) { + err = SET_ERROR(EXDEV); + } else { + if (ost == DMU_OST_ZFS && !allow_mounted) { + err = dmu_objset_find(zc->zc_name, + recursive_unmount, pos + 1, + recursive ? DS_FIND_CHILDREN : 0); } + if (err == 0) { + err = dsl_dataset_rename_snapshot(zc->zc_name, + pos + 1, pos2 + 1, recursive); + } } - error = dsl_dataset_rename_snapshot(zc->zc_name, - at + 1, strchr(zc->zc_value, '@') + 1, recursive); - *at = '@'; - - return (error); + *pos = '@'; + *pos2 = '@'; + return (err); } else { #ifdef illumos if (ost == DMU_OST_ZVOL) @@ -6341,8 +6382,6 @@ zfs_ioctl_init(void) zfs_secpolicy_none); zfs_ioctl_register_dataset_modify(ZFS_IOC_DESTROY, zfs_ioc_destroy, zfs_secpolicy_destroy); - zfs_ioctl_register_dataset_modify(ZFS_IOC_RENAME, zfs_ioc_rename, - zfs_secpolicy_rename); zfs_ioctl_register_dataset_modify(ZFS_IOC_RECV, zfs_ioc_recv, zfs_secpolicy_recv); zfs_ioctl_register_dataset_modify(ZFS_IOC_PROMOTE, zfs_ioc_promote, @@ -6352,6 +6391,14 @@ zfs_ioctl_init(void) zfs_ioctl_register_dataset_modify(ZFS_IOC_SET_FSACL, zfs_ioc_set_fsacl, zfs_secpolicy_set_fsacl); + /* + * Not using zfs_ioctl_register_dataset_modify as DATASET_NAME check + * won't allow a bookmark name. + */ + zfs_ioctl_register_legacy(ZFS_IOC_RENAME, zfs_ioc_rename, + zfs_secpolicy_rename, ENTITY_NAME, B_TRUE, + POOL_CHECK_SUSPENDED | POOL_CHECK_READONLY); + zfs_ioctl_register_dataset_nolog(ZFS_IOC_SHARE, zfs_ioc_share, zfs_secpolicy_share, POOL_CHECK_NONE); zfs_ioctl_register_dataset_nolog(ZFS_IOC_SMB_ACL, zfs_ioc_smb_acl, @@ -6381,7 +6428,8 @@ pool_status_check(const char *name, zfs_ioc_namecheck_ spa_t *spa; int error; - ASSERT(type == POOL_NAME || type == DATASET_NAME); + ASSERT(type == POOL_NAME || type == DATASET_NAME || + type == ENTITY_NAME); if (check & POOL_CHECK_NONE) return (0); @@ -6712,6 +6760,15 @@ zfsdev_ioctl(struct cdev *dev, u_long zcmd, caddr_t ar else error = pool_status_check(zc->zc_name, vec->zvec_namecheck, vec->zvec_pool_check); + break; + + case ENTITY_NAME: + if (entity_namecheck(zc->zc_name, NULL, NULL) != 0) { + error = SET_ERROR(EINVAL); + } else { + error = pool_status_check(zc->zc_name, + vec->zvec_namecheck, vec->zvec_pool_check); + } break; case NO_NAME: From owner-svn-src-stable-11@freebsd.org Sat Oct 19 15:58:21 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C5604167DFF; Sat, 19 Oct 2019 15:58:21 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46wSHK4sb4z4Mw6; Sat, 19 Oct 2019 15:58:21 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8B42A24BAA; Sat, 19 Oct 2019 15:58:21 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x9JFwLZk070991; Sat, 19 Oct 2019 15:58:21 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x9JFwLfI070990; Sat, 19 Oct 2019 15:58:21 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201910191558.x9JFwLfI070990@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 19 Oct 2019 15:58:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r353765 - in stable: 11/usr.bin/clang/lld 12/usr.bin/clang/lld X-SVN-Group: stable-11 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 11/usr.bin/clang/lld 12/usr.bin/clang/lld X-SVN-Commit-Revision: 353765 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Oct 2019 15:58:21 -0000 Author: dim Date: Sat Oct 19 15:58:20 2019 New Revision: 353765 URL: https://svnweb.freebsd.org/changeset/base/353765 Log: MFC r353655: Ensure lld respects the WITH/WITHOUT_SHARED_TOOLCHAIN option Traditionally, toolchain components such as cc, as, and ld have been built as static executables. The WITH_SHARED_TOOLCHAIN option from src.conf(5) is meant to link these as regular executables, e.g. using shared libraries. The build of ld.lld did not yet check this option. Fix the Makefile so it will do so now. Reported by: Mike Cui PR: 241257 Modified: stable/11/usr.bin/clang/lld/Makefile Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/usr.bin/clang/lld/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/11/usr.bin/clang/lld/Makefile ============================================================================== --- stable/11/usr.bin/clang/lld/Makefile Sat Oct 19 14:56:44 2019 (r353764) +++ stable/11/usr.bin/clang/lld/Makefile Sat Oct 19 15:58:20 2019 (r353765) @@ -14,6 +14,10 @@ SYMLINKS= ${PROG_CXX} ${BINDIR}/ld MLINKS= ld.lld.1 ld.1 .endif +.if ${MK_SHARED_TOOLCHAIN} == "no" +NO_SHARED?= yes +.endif + CFLAGS+= -I${LLD_SRCS}/ELF CFLAGS+= -I${LLD_SRCS}/include CFLAGS+= -I${.OBJDIR}