Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Sep 2002 22:32:03 +0200
From:      Poul-Henning Kamp <phk@critter.freebsd.dk>
To:        Matthew Dillon <dillon@apollo.backplane.com>
Cc:        Bruce Evans <bde@zeta.org.au>, cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG
Subject:   Re: cvs commit: src/sys/kern vfs_bio.c src/sys/sys bio.h 
Message-ID:  <2714.1032121923@critter.freebsd.dk>
In-Reply-To: Your message of "Sun, 15 Sep 2002 13:13:03 PDT." <200209152013.g8FKD3Ed057840@apollo.backplane.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <200209152013.g8FKD3Ed057840@apollo.backplane.com>, Matthew Dillon w
rites:

>    I'm not sure why you want to believe that, or use it as a justification
>    for blowing off the rather serious issues I've brought up instead of
>    tackling or answering or even discussing it.

Facts:

1.  You have raised no serious issues.

2.  You have evidently not examined where the biowait() function is used.

3.  Not knowing where it is used, you make fact-less assumptions.

4.  Those assumptions are obviously wildly off the mark.

5.  QED: you end up making a fool of yourself in public.

But since you insist on not reading the code, let me walk you
through it, step by step.

At this point in time, biowait() is used when formatting floppies,
and from inside GEOM for operations only called during GEOMs
discovery phase.

In all these cases the struct bio has no external references, ie,
no other code even knows it exists, so there is no race condition
to be had.

If the bio magically finishes between when biowait() checks the
BIO_DONE bit, but before we sleep on the pointer, we will simply
take the timeout, find out a little later and move on.

I repeat: Nobody else can do bad things to the bio, because it is
a totally private bio to the code in question.

To put it another way: The bio has no relation to any instance of
struct buf.  No other processes can ever get at it.

(And now for the big finale):  My commit, collected in one function
a loop which had been written out separately four places before.

* * * My commit makes no functional difference * * * 

Well, in fact it does, it improves the floppy formatting which might
have stalled in rare situations since that loop didn't even have
the timeout.

Anyway, I merely moved a common bit of programming into its own
function.

I do not share your opinion that it makes the world end faster.

Poul-Henning

PS: I realize that you have this urge to periodically tell the world
that compared to me you are much better informed, smarter, intelligent
etc.  and that I have no clue to what I am doing and that I am
botching the tree and you will have to save everybody from my
stupidity by fixing it etc.  And I almost don't mind, we all have
our urges, and I'm not really in a position to deny you yours.  But
you need to be more careful when you find your Casus Belli than you
were this time.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.

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?2714.1032121923>