From: "G. Branden Robinson" <g.branden.robinson@gmail.com>
To: Seth McDonald <sethmcmail@pm.me>
Cc: linux-man@vger.kernel.org
Subject: the origin of mkdir(2) (was: [PATCH v1 00/21] man/man2/*: Update history of syscalls H-M)
Date: Mon, 26 Jan 2026 12:38:24 -0600 [thread overview]
Message-ID: <20260126183824.kpl2f3bjfre4uufx@illithid> (raw)
In-Reply-To: <cover.1769429341.git.sethmcmail@pm.me>
[-- Attachment #1: Type: text/plain, Size: 1674 bytes --]
Hi Seth,
At 2026-01-26T12:28:10+0000, Seth McDonald wrote:
> This set updates the history of system calls H to M.
>
> While I have been thorough with my research, I would encourage those
> interested to double-check that my edits make sense given the listed
> sources. Particularly for linkat(2), SEEK_DATA/SEEK_HOLE, mkdirat(2),
> and mincore(2), since they took significantly more time and research
> than other functions.
I thank you for this work! I could not have told you that mkdir(2)--
the system call--arrived in Unix as late as 4.2BSD. My first thought
was, "that can't be right". My second was, "ah, that must be when Unix
got rid of the 14-character limit on file names".
(Traditionally in Unix, a directory was a plain file of 16-byte
entries--a 14-byte `char` field for the file name, which was not
null-terminated if of maximum length, and a 2-byte `int` for the file's
inode number. This design kept the system call interface narrow. It
also, if I understand the war stories correctly, could lead to horrible
problems, like users open(2)ing directories belonging to themselves and
trashing them with sloppy code, or introducing cycles into into the
graph of the file system by creating hard links to directories.[1])
And sure enough, history appears to record that the Berkeley FFS ("fast
file system") came in with 4.2BSD as well.
https://www.oreilly.com/openbook/opensources/book/kirkmck.html
Regards,
Branden
[1] This was such an unthinkable and invalid situation that, again AIUI,
that rather than being flatly prohibited by the kernel, only root
was allowed to create hard links to directories.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2026-01-26 18:38 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-26 12:28 [PATCH v1 00/21] man/man2/*: Update history of syscalls H-M Seth McDonald
2026-01-26 12:28 ` [PATCH v1 01/21] man/man2/ioctl_eventpoll.2: HISTORY: ffix Seth McDonald
2026-01-26 12:28 ` [PATCH v1 02/21] man/man2/kill.2: HISTORY: Update POSIX appearances of kill(2) Seth McDonald
2026-01-26 12:28 ` [PATCH v1 03/21] man/man2/link.2: HISTORY: Change order of linkat(2) Seth McDonald
2026-01-26 12:28 ` [PATCH v1 04/21] man/man2/link.2: HISTORY: Update POSIX appearances of link(2) Seth McDonald
2026-01-26 12:28 ` [PATCH v1 05/21] man/man2/listen.2: HISTORY: Change order Seth McDonald
2026-01-26 12:28 ` [PATCH v1 06/21] man/man2/lseek.2: HISTORY: Update appearances of SEEK_{DATA,HOLE} Seth McDonald
2026-01-26 18:28 ` G. Branden Robinson
2026-01-26 12:29 ` [PATCH v1 07/21] man/man2/lseek.2: HISTORY: Update POSIX appearances of lseek(2) Seth McDonald
2026-01-26 12:29 ` [PATCH v1 08/21] man/man2/mincore.2: HISTORY: Update appearances of mincore(2) Seth McDonald
2026-02-10 23:50 ` Alejandro Colomar
2026-01-26 12:29 ` [PATCH v1 09/21] man/man2/mkdir.2: HISTORY: Change order of mkdirat(2) Seth McDonald
2026-01-26 12:29 ` [PATCH v1 10/21] man/man2/mkdir.2: HISTORY: Update BSD and POSIX appearances of mkdir(2) Seth McDonald
2026-01-26 12:29 ` [PATCH v1 11/21] man/man2/mknod.2: HISTORY: Change order of mknodat(2) Seth McDonald
2026-01-26 12:29 ` [PATCH v1 12/21] man/man2/mknod.2: HISTORY: Update POSIX appearances of mknod(2) Seth McDonald
2026-01-26 12:29 ` [PATCH v1 13/21] man/man2/mknod.2: STANDARDS: Update Seth McDonald
2026-01-26 12:29 ` [PATCH v1 14/21] man/man2/mlock.2: HISTORY: Update POSIX appearances of m(un)lock(all)(2) Seth McDonald
2026-01-26 12:29 ` [PATCH v1 15/21] man/man2/mmap.2: HISTORY: Update POSIX appearances of m(un)map(2) Seth McDonald
2026-01-26 12:30 ` [PATCH v1 16/21] man/man2/{mount_setattr,move_mount}.2: HISTORY: ffix Seth McDonald
2026-01-26 12:30 ` [PATCH v1 17/21] man/man2/mprotect.2: HISTORY: Update POSIX appearances of mprotect(2) Seth McDonald
2026-01-26 12:30 ` [PATCH v1 18/21] man/man2/msgctl.2: STANDARDS, HISTORY: Update POSIX appearances of msgctl(2) Seth McDonald
2026-01-26 12:30 ` [PATCH v1 19/21] man/man2/msgget.2: STANDARDS, HISTORY: Update POSIX appearances of msgget(2) Seth McDonald
2026-01-26 12:30 ` [PATCH v1 20/21] man/man2/msgop.2: STANDARDS, HISTORY: Update POSIX appearances of msg{rcv,snd}(2) Seth McDonald
2026-01-26 12:30 ` [PATCH v1 21/21] man/man2/msync.2: HISTORY: Update POSIX appearances of msync(2) Seth McDonald
2026-01-26 18:38 ` G. Branden Robinson [this message]
2026-02-11 0:04 ` [PATCH v1 00/21] man/man2/*: Update history of syscalls H-M Alejandro Colomar
2026-02-16 11:44 ` [PATCH v2 0/1] " Seth McDonald
2026-02-16 11:45 ` [PATCH v2 1/1] man/man2/mincore.2: HISTORY: Update appearances of mincore(2) Seth McDonald
2026-02-16 13:41 ` Alejandro Colomar
2026-02-16 13:57 ` [PATCH v2 0/1] man/man2/*: Update history of syscalls H-M Alejandro Colomar
2026-02-17 12:37 ` Seth McDonald
2026-02-17 12:51 ` Alejandro Colomar
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=20260126183824.kpl2f3bjfre4uufx@illithid \
--to=g.branden.robinson@gmail.com \
--cc=linux-man@vger.kernel.org \
--cc=sethmcmail@pm.me \
/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