The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: Warner Losh <imp@bsdimp.com>
To: Noel Chiappa <jnc@mercury.lcs.mit.edu>
Cc: tuhs@tuhs.org
Subject: [TUHS] Re: SCO's "evidence" (was: RIP Darl McBride former CEO of SCO)
Date: Tue, 5 Nov 2024 11:58:57 -0700	[thread overview]
Message-ID: <CANCZdfqpTKS91M+3HsEin_bJtDwd1uEqdRXm2jdiDUmsZ+aTMQ@mail.gmail.com> (raw)
In-Reply-To: <20241105175531.D180918C084@mercury.lcs.mit.edu>

[-- Attachment #1: Type: text/plain, Size: 4357 bytes --]

On Tue, Nov 5, 2024 at 10:55 AM Noel Chiappa <jnc@mercury.lcs.mit.edu>
wrote:

>     > From: Warner Losh
>
>     >> On Mon, Nov 4, 2024 at 8:14PM Larry McVoy wrote:
>
>     >> The bmap implementations I saw were bit for bit identical, same
> code,
>     >> same variables, same style, same indentation. I'm 100% sure they
> were
>     >> not independent.
>
>     > They are different in 4.3BSD. They are different in 4.2BSD (but less
>     > different). The underlying filesystems are different on disk, so they
>     > routines have to be different.
>
> That last sentence points out something important that people need to
> remember
> in this discussion: in between 4.1 and 4.2 (technically, in 4.1B), BSD
> switched to the BSD Fast File System, so I very much doubt that the
> low-level
> (i.e. logical file block to disk block) file system code in anything after
> 4.1A looks much like the AT+T low-level file system code. (I have no idea
> how
> the BSD code compares to the Linux file system code, but that's between the
> Linux people, and Berkeley.)
>

Yes. The original unix code was copied and redone somewhat. It was still
likely
a derivative work (which is why AT&T forced Berkeley to redo it for
4.4-lite), but
it was like 25% the same, 25% similar but functionally identical and 50%
new for
UFS, but filesystem layout is file system layout and some similarities
persisted.
3bsd added dtofsb() calls. 4bsd added code to make accessing the indirect
blocks
more reliable and made writing directories more reliable.  4.1 was
identical to 4bsd.
4.2 changed a lot. the 32V bmap was 112 lines long, while 4.2 was 196 lines
with
the following diffstat:
 1 file changed, 141 insertions(+), 57 deletions(-)
So by this measure, over half of the new function was new (though most of
the
comments were still the same). It did have the same structure, but
structure isn't
necessarily copyrightable since filesystem layout code will be similar
between
filesystems that are write-in-place. Looking at the diff, there's one
stretch of 15
lines that are identical, but otherwise there's changes (mostly additions)
every
few lines. A substantial re-write. These days, most open source authors
would
replace the copyright statement with their own for such an extensive rewrite
since the diff was over 2x the size of the original file (another very
imperfect
measure). Though the comments remaining identical is troublesome because
they are the parts of the code that are the most creative and subject to the
most freedom while the for loops and such are largely dictated by the
problem
or C language and customary style.

Between 4.2 and 4.3, the changes were around the edges of this function
though not in this function (I was remiss in not chasing down the bare diff
I did last night). By net.2 it was re-written again, moving most of the
function
of bmap elsewhere, so that almost nothing remained from the original 32V
in the original bmap function (though a quick grep shows that parts did move
elsewhere). In net.2 it's back down to 75 lines. shorter even than in 32V
(but
it's a bit deceptive since the code was elsewhere, though also largely
reworked).
diff reports only lines '{', '}', '/*', '*/' and a few simple assignments
(bap = bp->b_un.b_daddr;) and function calls (brelse(bp)) being the same and
all the comments different / gone from this function. Though a fair number
of
the diffs were due to changes in the "buffer cache" interface, some
formatting
changes and some substitution of #defines (like NIADDR) for bare constants
(3
in this case). These changes were also due to the role of bmap being reduced
and things like balloc being used to handle the details a fair bit
differently. And
bits of balloc do resemble bits of the original bmap, but again the
structure
had changed somewhat.

The numbers for my diffs and such are based on Krik's disks, but can also
be tested by looking at the links I posted earlier or downloading and
extracting
the sources from the TUHS archive.

The bmap() function I've extracted from different versions:

https://people.freebsd.org/~imp/pmap/pmap.32v
https://people.freebsd.org/~imp/pmap/pmap.4.2
https://people.freebsd.org/~imp/pmap/pmap.4.3
https://people.freebsd.org/~imp/pmap/pmap.net.2

Warner

[-- Attachment #2: Type: text/html, Size: 5592 bytes --]

  parent reply	other threads:[~2024-11-05 18:59 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-05 17:55 Noel Chiappa
2024-11-05 18:52 ` ron minnich
2024-11-05 19:01   ` Warner Losh
     [not found]     ` <CAEoi9W66zUf8RvzEYQG7qNXN-BX6gyDejXCrHw3rk46UM_-XPg@mail.gmail.com>
2024-11-08 20:27       ` Warner Losh
     [not found]         ` <61F8BCE5-44C5-49D2-BEFE-B8717E3DDEA8@kdbarto.org>
     [not found]           ` <CANCZdfrJExbrJqp3MgE0Tp9-a=PYTeFpkULk8NnPfBTeoyLW-g@mail.gmail.com>
2024-11-08 23:18             ` [TUHS] Fwd: " Warner Losh
2024-11-09  0:40               ` [TUHS] " rob
2024-11-05 18:58 ` Warner Losh [this message]
2024-11-05 20:25   ` [TUHS] Copyrights and copying.. [was SCO's "evidence" (was: RIP Darl McBride former CEO of SCO)] Christian Hopps
2024-11-05 20:35     ` [TUHS] " Warner Losh
  -- strict thread matches above, loose matches on Subject: below --
2024-11-04  1:17 [TUHS] RIP Darl McBride former CEO of SCO Will Senn
2024-11-04  2:31 ` [TUHS] " Greg 'groggy' Lehey
2024-11-04  3:34   ` Wesley Parish
2024-11-04 17:35     ` Marc Rochkind
2024-11-04 22:50       ` [TUHS] SCO's "evidence" (was: RIP Darl McBride former CEO of SCO) Greg 'groggy' Lehey
2024-11-05  0:05         ` [TUHS] " Marc Rochkind
2024-11-05  0:39           ` Warner Losh
2024-11-05  1:09             ` Larry McVoy
2024-11-05  1:32               ` ron minnich
2024-11-05  1:39                 ` Warner Losh
2024-11-05  3:14                 ` Larry McVoy
2024-11-05  5:00                   ` Warner Losh
2024-11-05  1:35               ` Warner Losh
2024-11-05  1:54                 ` Larry McVoy
2024-11-05  2:13                   ` Warner Losh
2024-11-05  3:14                     ` Marc Rochkind
2024-11-07 20:41                       ` ron minnich
2024-11-07 20:59                         ` Marc Rochkind
2024-11-08  0:03                           ` Theodore Ts'o
2024-11-08  0:35                             ` Warner Losh
2024-11-09 18:29                           ` G. Branden Robinson
2024-11-09 20:30                             ` Theodore Ts'o
2024-11-09 22:23                               ` G. Branden Robinson
2024-11-10  4:27                                 ` Theodore Ts'o
2024-11-12  1:55                       ` Kevin Bowling
2024-11-12  2:34                         ` Kevin Bowling
2024-11-12 18:12                           ` Marc Rochkind

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CANCZdfqpTKS91M+3HsEin_bJtDwd1uEqdRXm2jdiDUmsZ+aTMQ@mail.gmail.com \
    --to=imp@bsdimp.com \
    --cc=jnc@mercury.lcs.mit.edu \
    --cc=tuhs@tuhs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).