From nobody Thu Sep 1 14:09:05 2022 X-Original-To: bugs@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 4MJNFb1cWQz4bk2B for ; Thu, 1 Sep 2022 14:09:07 +0000 (UTC) (envelope-from bugzilla-noreply@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 4MJNFZ6Xkvz45qy for ; Thu, 1 Sep 2022 14:09:06 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 4MJNFZ5VJvzVB9 for ; Thu, 1 Sep 2022 14:09:06 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 281E9614027986 for ; Thu, 1 Sep 2022 14:09:06 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 281E96YK027985 for bugs@FreeBSD.org; Thu, 1 Sep 2022 14:09:06 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 266158] bio_length and bio_bcount in the GEOM bio structure are documented to be the same, but they are not Date: Thu, 01 Sep 2022 14:09:05 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 13.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: 0mp@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1662041346; 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=Zv5fOz3ZsbPku5R1omP7ftrpSVz59Lm/TFrQj8+kfIg=; b=tKt9cR1zfRT3yQD0f/p8fjltbQfCzgpfMRSdGY50/VGaFCOZt+R1EDlkoHadl1ks6wOq+Q O4Pr34s1fovQSyl1hHbWTuYF8L92yP1PEfS/ynB4hE9RpYhauwHMbyLv2GqzbA8eYBXU7+ kZdsTD+a5C2K5DBAESuoMpUgXJK+jFy6jbMlHIWU9rLWC8IHXC8mYnA20i8ZgI6i/7oMd0 jZqQQlHKSXMUSDMXLZPNHGdbEwCIQw98U7Eo0hBePuBFM0VzfcASPC734XyKd8Wp+VyKqb yRlZBaRnqMCGmHEzRLTiPbJY5tQ4SZQcw8sbhG6TH5ZfwW3RHxNDFq0YXI6ynQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1662041346; a=rsa-sha256; cv=none; b=fWEJjPSYUAJxP8VK5x0ml0UqzkOsdjVc5GfO1FhbOtwPlGZmzEvhlH0rlGEJJex49Nm6Zw 1Tyo6tYKFVfKTSn3eF+Cf+RZnUhPD8Vjafh5SRTi7hXIHRZQ4NJSnYBS2zClOb22dSd+JB wsE+HgIPXcZTl423gYsb4sN4EJHOUxKeWGjXJBewsCLTaq1erCMF6HLPoLDChWbJa3rqQD YGkZHhd5Niozft1GTsobTJJ449wpowl/+jJjTUFODHhPwfiYxRbzER1MG+JIjdySiD3LIT IP0c6hQHCVL24hY0FUSKgOHm6alBIDkN0VE7IgXvjFL+z0nMbiSlPqCy6WKusQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D266158 Bug ID: 266158 Summary: bio_length and bio_bcount in the GEOM bio structure are documented to be the same, but they are not Product: Base System Version: 13.1-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: 0mp@FreeBSD.org In the source code (sys/sys/bio.h), bio_bcount is documented as "Valid byte= s in buffer". bio_length is documented as "Like bio_bcount". Unfortunately, they= are not the same. Here's a sh(1) script to show that: # Create a memory device. md=3D$(mdconfig -s 1G) # Trace the io subsystem when the dd command is executing. Limit the results to # the PID of the dd command only. dtrace -n ' io:::start /pid =3D=3D $target/ { @bcount[execname] =3D quantize(args[0]->bio_bcount); @length[execname] =3D quantize(args[0]->bio_length); } ' -c "dd if=3D/dev/random of=3D/dev/$md bs=3D1m count=3D230 oflag=3Dsyn= c" # Remove the memory device. mdconfig -d -u "$md" --=20 You are receiving this mail because: You are the assignee for the bug.=