From owner-freebsd-hackers Fri Feb 27 17:59:33 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id RAA20843 for freebsd-hackers-outgoing; Fri, 27 Feb 1998 17:59:33 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from dingo.cdrom.com (dingo.cdrom.com [204.216.28.145]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id RAA20831 for ; Fri, 27 Feb 1998 17:59:14 -0800 (PST) (envelope-from mike@dingo.cdrom.com) Received: from dingo.cdrom.com (localhost [127.0.0.1]) by dingo.cdrom.com (8.8.8/8.8.5) with ESMTP id RAA29982; Fri, 27 Feb 1998 17:56:48 -0800 (PST) Message-Id: <199802280156.RAA29982@dingo.cdrom.com> X-Mailer: exmh version 2.0zeta 7/24/97 To: Greg Lehey cc: Mike Smith , FreeBSD Hackers Subject: Re: Kernel debugging: what's going on here? In-reply-to: Your message of "Sat, 28 Feb 1998 12:21:10 +1030." <19980228122110.36590@freebie.lemis.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 27 Feb 1998 17:56:46 -0800 From: Mike Smith Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > On Fri, 27 February 1998 at 17:45:39 -0800, Mike Smith wrote: > >> Can anybody explain this to me? I'm writing a disk block, and am > >> currently at bwrite: > >> > >> (kgdb) bt > >> #0 bwrite (bp=0xf051ec00) at ../../kern/vfs_bio.c:364 > >> #1 0xf0138d6a in vop_stdbwrite (ap=0xf2a76c74) at ../../kern/vfs_default.c:283 > >> #2 0xf0138bb1 in vop_defaultop (ap=0xf2a76c74) at ../../kern/vfs_default.c:130 > >> #3 0xf0146639 in spec_vnoperate (ap=0xf2a76c74) at ../../miscfs/specfs/spec_vnops.c:127 > >> #4 0xf01c5679 in ufs_vnoperatespec (ap=0xf2a76c74) at ../../ufs/ufs/ufs_vnops.c:2242 > >> #5 0xf2aab097 in VOP_BWRITE (bp=0xf051ec00) at vnode_if.h:1117 > >> #6 0xf2aa95c4 in vinumstart (vol=0xf0563000, bp=0xf10f1bb0) at request.c:228 > >> #7 0xf2aa9189 in vinumstrategy (bp=0xf10f1bb0) at request.c:71 > >> #8 0xf2aa7b63 in vinum_writedisklabel (vol=0xf0563000, lp=0xf0563110) at io.c:830 > >> > >> I've handed a buffer header up from frame 6 (not the bp in the > >> parameter list). When it gets to bwrite, it has a different content. > >> gdb tells me different contents depending on the frame it's in: > > > > My guess would be that the bp has been translated to reflect the block > > device that it will be operating on at bwrite level rather than the > > logical device that you were operating on when you called VOP_BWRITE. > > > > This would involve a change in vnode, as well as (maybe) offset etc. > > Look at the addresses. They're the same: Yes, I noticed. But rewriting the bp on the fly is not uncommon; quite a few device drivers do it, it wouldn't surprise me if it wasn't done elsewhere rather than cloning the original. -- \\ Sometimes you're ahead, \\ Mike Smith \\ sometimes you're behind. \\ mike@smith.net.au \\ The race is long, and in the \\ msmith@freebsd.org \\ end it's only with yourself. \\ msmith@cdrom.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message