From nobody Thu Oct 27 08:00:09 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MydQ20Pnwz4gYCB; Thu, 27 Oct 2022 08:00:10 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MydQ16q0Pz3kd6; Thu, 27 Oct 2022 08:00:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1666857610; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ALWvLipG285m3j4Ms6T7524khtDNiMklL26RIWBLXMQ=; b=VPyMFwdVK9Y4faM9zfY5YzZS+NzgFTAtyhhNo8dVrrl1OQaHrjWshQIRkT4SD/epP9bDUU rGCCrEPnEAdN3mZ6S5jPlpnqK+xgjNB83886Y65beDPxqCt6eBE9CFkHdrSQbFpPGrOZWt CKQ3FQ1cEuRcqemWA4IXsS86psWSlm2vJMvooHTP43LpX77g555mnEMG0KXL7OBLr0VizP b3p9EFIKZeteuPU9T/uCaXo/DUIgF/5fDlLySHKHcMG7uCOAzYE2y07E1xGAEyKMQPM+Tj H6wCsLD4Wa+94hGX2TfiKyQCg0Q/wtWLxSPUlHbxEVnwVrPEu2QWxwhATV8AvQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4MydQ15q72zqCw; Thu, 27 Oct 2022 08:00:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 29R8097Z072725; Thu, 27 Oct 2022 08:00:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 29R809i3072722; Thu, 27 Oct 2022 08:00:09 GMT (envelope-from git) Date: Thu, 27 Oct 2022 08:00:09 GMT Message-Id: <202210270800.29R809i3072722@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Holm Subject: git: 9349fc283b58 - main - stress2: Added a newfs(8) test scenario List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9349fc283b581a52396b6027bfa792e61dfd8035 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1666857610; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ALWvLipG285m3j4Ms6T7524khtDNiMklL26RIWBLXMQ=; b=bPn0NyeOGDm1prlY0g+ETL8mDJzgo3tcyGVrnxvC4Q3jnwVBF+OHDWhPMO4e4gQyQGrCSG 7JWT3P3Rt6y3hCw+v4oVn8RXOkOif5bbvMzRZ5HESEZEDgcoYkPl+UYdHZR2j41XA1rigq 4W5QB6+JUlykYs4hrn6LSAjf/qCjvA2pkd/5fq8v9trlEb9gDCheAjPjWM0YOJ41PEV4x1 jquOVkYlvDx/fhWgi+O/AXT5EvPo6AxQrA985qa5w6iy0er3kvV5ex++6le0ZSdnoszmyL nAwBlZWBbAuEso67XsDyEF7txoZdkUDNeyD7UpuKPtrgXEi2ps25Zd5r/p4dHw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1666857610; a=rsa-sha256; cv=none; b=iLekuHBMXIcafzc0PVSakYZik5V7Lv2ZwW5nndEqESM9GhvuZbjgwt1rjkeTz3oMlVfT0u LF/01+ht3GUa8ktDxIIZsyj0vGz/Tg5oYn+KDgX7sNPIzB107iNPTHrWayOdo4t8d83s0z EOgrK7NmOiAxBdkEA1U6gp6dloYwvvaZaeNLuHT2wtNea0fhBlYeY/txcR/tIvFA1it82s wv9KgucCFlMqZREpoxpqXiqL/Wb464JKqDIw9L8106p6ingrO5zTV1qvOb9IQX0dBy3LYc BvpDdFs/kRROFRh+MiEHVjy3mxoo0Gq1ReFM+4LHsrJ9ktm4N1bT9TzvWoH2+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=9349fc283b581a52396b6027bfa792e61dfd8035 commit 9349fc283b581a52396b6027bfa792e61dfd8035 Author: Peter Holm AuthorDate: 2022-10-27 07:59:16 +0000 Commit: Peter Holm CommitDate: 2022-10-27 07:59:16 +0000 stress2: Added a newfs(8) test scenario --- tools/test/stress2/misc/newfs6.sh | 57 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/tools/test/stress2/misc/newfs6.sh b/tools/test/stress2/misc/newfs6.sh new file mode 100755 index 000000000000..5e887f1496a6 --- /dev/null +++ b/tools/test/stress2/misc/newfs6.sh @@ -0,0 +1,57 @@ +#!/bin/sh + +# +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# +# Copyright (c) 2022 Peter Holm +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# + +# A fast version of newfs.sh + +[ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 + +. ../default.cfg + +mount | grep "on $mntpoint " | grep -q md$mdstart && + umount $mntpoint +mdconfig -l | grep -q md$mdstart && mdconfig -d -u $mdstart +mdconfig -a -t swap -s 1g -u $mdstart || exit 1 + +s=0 +for opt in -O1 -O2 -U -j; do + bs=4096 + while [ $bs -le 65536 ]; do + for i in 8 4 2 1; do + fragsize=$((bs / i)) + echo "newfs $opt -b $bs -f $fragsize md$mdstart " + newfs $opt -b $bs -f $fragsize \ + md$mdstart > /dev/null || { s=1; continue; } + mount /dev/md$mdstart $mntpoint || s=2 && + umount $mntpoint + done + bs=$((bs * 2)) + done +done +mdconfig -d -u $mdstart +exit $s