Date: Thu, 01 Sep 2022 14:09:05 +0000 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 Message-ID: <bug-266158-227@https.bugs.freebsd.org/bugzilla/>
index | next in thread | raw e-mail
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=266158 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 bytes 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=$(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 == $target/ { @bcount[execname] = quantize(args[0]->bio_bcount); @length[execname] = quantize(args[0]->bio_length); } ' -c "dd if=/dev/random of=/dev/$md bs=1m count=230 oflag=sync" # Remove the memory device. mdconfig -d -u "$md" -- You are receiving this mail because: You are the assignee for the bug.home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-266158-227>
