From owner-cvs-all Sat Aug 21 1:15:14 1999 Delivered-To: cvs-all@freebsd.org Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.40.131]) by hub.freebsd.org (Postfix) with ESMTP id A960D14BF7; Sat, 21 Aug 1999 01:15:09 -0700 (PDT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.9.3/8.9.2) with ESMTP id KAA11807; Sat, 21 Aug 1999 10:15:05 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: "Brian F. Feldman" Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern kern_physio.c In-reply-to: Your message of "Sat, 21 Aug 1999 00:50:52 PDT." Date: Sat, 21 Aug 1999 10:15:05 +0200 Message-ID: <11805.935223305@critter.freebsd.dk> From: Poul-Henning Kamp Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk In message , "Brian F. Feldman" writes: >On Sat, 21 Aug 1999, Poul-Henning Kamp wrote: > >> >+ bp->b_blkno = blockno; >> >+ if (bp->b_blkno != blockno) { >> > ^- How can this comparison ever fail? >> >> They're different sizes. > >But you set bp->b_blkno to blockno, then compare whether or not they're >equal. I'm pretty sure that's not right. Assume for a moment that the uio_offset is 0x20000000000. Shifting it down 9 places we get: 0x100000000, this goes into blockno which is 64 bits wide: no worries. Next we assign blockno to bp->b_blockno which is 32 bits wide, what happens to the upper 32 bits ? They're ignored, so the value of bp->b_blockno will be: 0x00000000. Next we compare the two, are they the same ? No. -- Poul-Henning Kamp FreeBSD coreteam member phk@FreeBSD.ORG "Real hackers run -current on their laptop." FreeBSD -- It will take a long time before progress goes too far! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message