Date: Sat, 21 Aug 1999 10:15:05 +0200 From: Poul-Henning Kamp <phk@critter.freebsd.dk> To: "Brian F. Feldman" <green@FreeBSD.org> Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern kern_physio.c Message-ID: <11805.935223305@critter.freebsd.dk> In-Reply-To: Your message of "Sat, 21 Aug 1999 00:50:52 PDT." <Pine.BSF.4.10.9908210046530.55604-100000@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <Pine.BSF.4.10.9908210046530.55604-100000@freefall.freebsd.org>, "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. <CARDBOARD> 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. </CARDBOARD> -- 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?11805.935223305>