From nobody Tue Jan 02 20:52:37 2024 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 4T4Q5x6L0Vz56HwD; Tue, 2 Jan 2024 20:52:37 +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 4T4Q5x50kwz4XfD; Tue, 2 Jan 2024 20:52:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704228757; 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=WFlHUsFcamzFH4UtYB73UVz+92inQgacONLDel0Zy7k=; b=tbLcAoG/1MqPylcgUaNH5E/nPIEoBLEy/I+NTpGuGU/hLEBS24QophudNt5zDG/MdLr79D pcyXRrh6MwOT6Tovmui6a2IRevCKyBOs2p3Iu4/bQ7IG9U5/NhOtrSPXvt3U0ImmIiehDH S0fj1UnblDnQ1zrTcn4dO7uu8YrBJq4N/o4ui0LWw2XxFTj5O6Qe0UU8Kar409z6MEdILa FsGvZzvu+pUe9SLVVn6eKE2D+NaNrQpS0YS/CBR3DupKaZQlx2NHWeU+48wmrxrJZVa587 BauoVlaAR2QSiGMwp+XT+6NkR6uViDIkucOKBwSxaxRrRsqnU7HyUXWs0vrDXQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704228757; a=rsa-sha256; cv=none; b=DJ6nPGUWqS15y13j6DIr04oRlMYaygcW/qi32FRSq8e8HxIc3up+rWe9ddVF8RkO0o2Knu 2yUADrGC3MlbaogtSN0ytGsuQ5Dd8E6St17WJfPxVwZJBK9GN7G6mUO4wMgUZ5Mmo7IXUG 9dg+URsEpuTVO+4eIAtNO9rEUJqEFWFGVRBhVHKZ3cOcwM+RqGVieIOmmq9ixiksWJ2u5p kk6Uri3yHYUG8zE3D316zMtBneoxnQg3FndklGObmFtRGQY/oNkbhnsJyiCWQx8zuQc43y rVcxX8PJ4wc/NMIamCqPX007ON6zk0oT+wlUBlTAVFR1b0T9RYaaIFvDRr8lmw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704228757; 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=WFlHUsFcamzFH4UtYB73UVz+92inQgacONLDel0Zy7k=; b=TNXmzdfr3BRqKAyNv26lIYSa8bNFrCoImLggmdT/pY/abKJcWjw5LxgwmNa6CeF1zT6w3n 7Q64eozqOvUu4cr5Mm63GE0WK9++c5PdFxG9NhWopTKs9LAg4oo1J9IZUbPObTwmToXl28 O9apIy+gAmbirGDY/AjEYUvikX2nMQ4i0PJS5qkJbzap5XBaZSU62jBCmFZvChN3FlS3AH KlfNrXydIiidqR5fx/Vi0CranY6AP4mm2297Vo5qzni+2htQMmyqu05g6vSK4ohBtrWeFr tFT47LDVsIrif5wE0uEptBZU9G2PU2qujUVuiBcxYi3qlxZJ4f+NZfKMcjAPHQ== 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 4T4Q5x46Qrz1FR3; Tue, 2 Jan 2024 20:52:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 402KqbTb036931; Tue, 2 Jan 2024 20:52:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 402Kqbox036928; Tue, 2 Jan 2024 20:52:37 GMT (envelope-from git) Date: Tue, 2 Jan 2024 20:52:37 GMT Message-Id: <202401022052.402Kqbox036928@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 950162c4d33a - stable/14 - ctl: Use ctl_io_sbuf in ctl_process_done 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 950162c4d33ab033fe084e152203c2ec149e2b39 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=950162c4d33ab033fe084e152203c2ec149e2b39 commit 950162c4d33ab033fe084e152203c2ec149e2b39 Author: John Baldwin AuthorDate: 2023-10-16 22:47:09 +0000 Commit: John Baldwin CommitDate: 2024-01-02 19:20:37 +0000 ctl: Use ctl_io_sbuf in ctl_process_done This reduces a second copy of (mostly) the same code. Reviewed by: ken, imp Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D42210 (cherry picked from commit e846a3e0168f9188a6eccedd52707c63fd83cba2) --- sys/cam/ctl/ctl.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/sys/cam/ctl/ctl.c b/sys/cam/ctl/ctl.c index 6faecb0da0a4..a315c5ef7df3 100644 --- a/sys/cam/ctl/ctl.c +++ b/sys/cam/ctl/ctl.c @@ -13035,25 +13035,7 @@ ctl_process_done(union ctl_io *io) ctl_scsi_path_string(io, path_str, sizeof(path_str)); sbuf_new(&sb, str, sizeof(str), SBUF_FIXEDLEN); - sbuf_cat(&sb, path_str); - switch (io->io_hdr.io_type) { - case CTL_IO_SCSI: - ctl_scsi_command_string(&io->scsiio, NULL, &sb); - sbuf_printf(&sb, "\n"); - sbuf_cat(&sb, path_str); - sbuf_printf(&sb, "Tag: 0x%jx/%d, Prio: %d\n", - io->scsiio.tag_num, io->scsiio.tag_type, - io->scsiio.priority); - break; - case CTL_IO_TASK: - sbuf_printf(&sb, "Task Action: %d Tag: 0x%jx/%d\n", - io->taskio.task_action, - io->taskio.tag_num, io->taskio.tag_type); - break; - default: - panic("%s: Invalid CTL I/O type %d\n", - __func__, io->io_hdr.io_type); - } + ctl_io_sbuf(io, &sb); sbuf_cat(&sb, path_str); sbuf_printf(&sb, "ctl_process_done: %jd seconds\n", (intmax_t)time_uptime - io->io_hdr.start_time);