From nobody Thu Feb 16 00:41:29 2023 X-Original-To: dev-commits-src-main@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 4PHGN93WRKz3rZ4C; Thu, 16 Feb 2023 00:41:29 +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 4PHGN930khz43X5; Thu, 16 Feb 2023 00:41:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676508089; 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=DSBz0BL1/kPq0qnXqnWZ8boKsZgq/i9c4UMUNZbeIjY=; b=TRe+V0cVbIoxG07JNGHiu7GnXkLMpzidAbe+ZIYuLO7oqI88SWWHNq/eNjWORTQ91oN9jM 0QsK8XsRBFw3fwHWKTDchz4LFf1a9IAGBdpIYq6BOS2F+pBk8vZiwnxbJgppLCrPVem2K4 vsDLtutm0vWfxxIososa4ERgw45JAxr2Sxz3Z5GxsPwAm/S5OrEl5v5Lv1BP3hviNZvBUM Fbkd8lAkFVYfS8qVhIQKqFPnEDErxVhRluavtqnVdn8W8BwuMbcHquOX8vf+E1HGWJGBfG k0WRA3X8HXMikQBmKGPryGHFT+6jo+O6TY/IVzPO1YARM61Ka0t9Y/ViHF0LwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676508089; 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=DSBz0BL1/kPq0qnXqnWZ8boKsZgq/i9c4UMUNZbeIjY=; b=STPnY8EtiRUAlWyDK7SZlHiNethbH9CEb7EMtUS9lh/TblpCSywABZhwE6ltsUFsPYB1sK 5VD4w7dnrBxnQsZsonN02LHgD0FROzAvZamga3R1s4U0d5UfskDQfRqHL/c8uXEb9gx2ZH z+qkl3ZpRDazn1lxo6Id0TW8BKpsMMcGpOQUx4kC1Z6zriTint+KLrBbkK1mL7MU7KbzpK zq4f7wmgBammszInWWBZDIecM+qCRQh8P4cz0J7LbCc2pNPb0fbGAWlqrw9xOFTeZFz2xi 5CUzI2N7TKVbeG/nAvvAiq3DWo/JFNYNab9H7QNb4cQsEMZGqKwU1YLp1IdSRw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676508089; a=rsa-sha256; cv=none; b=hF3aWqDXDtQ/7uAW4Kgi9JLVSkc64EoIikxtp/X1YXoNu/SM3Qm1h3SXtAI1C4ahFhMAoQ Mlq1N86S8JlJK3IeWiVeOAH3q7+f6n93nnGhxtEme8HtEZa3F4K2WwpWWNFTgVFuwWGwIs unOwDfJanfL68J/wl87IiZJ83jZWwu9HfSWAjtGXExbe9rxsOExFBNh/wNHSGSV6TPuPTO PvE4j7k2D5a9Mw/IC9LOZnNmlUMNfuYldS+EkCBdQcr2Qck9yiygtS/z7lAYviama/URWJ Aqf8ktvx0eKUmWHBt8Py4KSSac9tdyWTJg/7womeuYAP9g4agc+benRL8h1pwQ== 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 4PHGN924W8zlFx; Thu, 16 Feb 2023 00:41:29 +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 31G0fTH4098138; Thu, 16 Feb 2023 00:41:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31G0fTRE098137; Thu, 16 Feb 2023 00:41:29 GMT (envelope-from git) Date: Thu, 16 Feb 2023 00:41:29 GMT Message-Id: <202302160041.31G0fTRE098137@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Dag-Erling=20Sm=C3=B8rgrav?= Subject: git: bf84156b24ff - main - tarfs: Use a separate debug bit for bounce buffer usage. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bf84156b24ffd167b93980a91904fafe84ac7c49 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=bf84156b24ffd167b93980a91904fafe84ac7c49 commit bf84156b24ffd167b93980a91904fafe84ac7c49 Author: Dag-Erling Smørgrav AuthorDate: 2023-02-16 00:40:18 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-02-16 00:40:45 +0000 tarfs: Use a separate debug bit for bounce buffer usage. Sponsored by: Juniper Networks, Inc. Sponsored by: Klara, Inc. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D38588 --- share/man/man5/tarfs.5 | 3 ++- sys/fs/tarfs/tarfs_dbg.h | 1 + sys/fs/tarfs/tarfs_io.c | 6 +++--- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/share/man/man5/tarfs.5 b/share/man/man5/tarfs.5 index e431e5d1fa1c..29999b8066f7 100644 --- a/share/man/man5/tarfs.5 +++ b/share/man/man5/tarfs.5 @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd February 2, 2023 +.Dd February 14, 2023 .Dt TARFS 5 .Os .Sh NAME @@ -81,6 +81,7 @@ by adding together the relevant values from the table below. .It 0x40 Ta Decompression .It 0x80 Ta Decompression index .It 0x100 Ta Sparse file mapping +.It 0x200 Ta Bounce buffer usage .El .Sh SEE ALSO .Xr tar 1 , diff --git a/sys/fs/tarfs/tarfs_dbg.h b/sys/fs/tarfs/tarfs_dbg.h index 45d11d679719..bedb94b3d602 100644 --- a/sys/fs/tarfs/tarfs_dbg.h +++ b/sys/fs/tarfs/tarfs_dbg.h @@ -45,6 +45,7 @@ extern int tarfs_debug; #define TARFS_DEBUG_ZIO 0x40 #define TARFS_DEBUG_ZIDX 0x80 #define TARFS_DEBUG_MAP 0x100 +#define TARFS_DEBUG_BOUNCE 0x200 #define TARFS_DPF(category, fmt, ...) \ do { \ diff --git a/sys/fs/tarfs/tarfs_io.c b/sys/fs/tarfs/tarfs_io.c index 8837681ac5f0..58f3e7eab03f 100644 --- a/sys/fs/tarfs/tarfs_io.c +++ b/sys/fs/tarfs/tarfs_io.c @@ -391,7 +391,7 @@ tarfs_zread_zstd(struct tarfs_zio *zio, struct uio *uiop) if (uiop->uio_segflg == UIO_SYSSPACE) { zob.dst = uiop->uio_iov->iov_base; } else { - TARFS_DPF(ALLOC, "%s: allocating %zu-byte bounce buffer\n", + TARFS_DPF(BOUNCE, "%s: allocating %zu-byte bounce buffer\n", __func__, len); zob.dst = obuf = malloc(len, M_TEMP, M_WAITOK); } @@ -488,7 +488,7 @@ fail_unlocked: if (uiop->uio_segflg == UIO_SYSSPACE) { uiop->uio_resid = resid; } else if (len > resid) { - TARFS_DPF(ALLOC, "%s: bounced %zu bytes\n", __func__, + TARFS_DPF(BOUNCE, "%s: bounced %zu bytes\n", __func__, len - resid); error = uiomove(obuf, len - resid, uiop); #ifdef TARFS_DEBUG @@ -497,7 +497,7 @@ fail_unlocked: } } if (obuf != NULL) { - TARFS_DPF(ALLOC, "%s: freeing bounce buffer\n", __func__); + TARFS_DPF(BOUNCE, "%s: freeing bounce buffer\n", __func__); free(obuf, M_TEMP); } if (rl != NULL)