Go to file
David van Moolenbroek b4d909d415 Split block/character protocols and libdriver
This patch separates the character and block driver communication
protocols. The old character protocol remains the same, but a new
block protocol is introduced. The libdriver library is replaced by
two new libraries: libchardriver and libblockdriver. Their exposed
API, and drivers that use them, have been updated accordingly.
Together, libbdev and libblockdriver now completely abstract away
the message format used by the block protocol. As the memory driver
is both a character and a block device driver, it now implements its
own message loop.

The most important semantic change made to the block protocol is that
it is no longer possible to return both partial results and an error
for a single transfer. This simplifies the interaction between the
caller and the driver, as the I/O vector no longer needs to be copied
back. Also, drivers are now no longer supposed to decide based on the
layout of the I/O vector when a transfer should be cut short. Put
simply, transfers are now supposed to either succeed completely, or
result in an error.

After this patch, the state of the various pieces is as follows:
- block protocol: stable
- libbdev API: stable for synchronous communication
- libblockdriver API: needs slight revision (the drvlib/partition API
  in particular; the threading API will also change shortly)
- character protocol: needs cleanup
- libchardriver API: needs cleanup accordingly
- driver restarts: largely unsupported until endpoint changes are
  reintroduced

As a side effect, this patch eliminates several bugs, hacks, and gcc
-Wall and -W warnings all over the place. It probably introduces a
few new ones, too.

Update warning: this patch changes the protocol between MFS and disk
drivers, so in order to use old/new images, the MFS from the ramdisk
must be used to mount all file systems.
2011-11-23 14:06:37 +01:00
benchmarks Fixed unixbench Run script 2010-10-25 08:32:14 +00:00
bin Increase gid_t and uid_t to 32 bits 2011-09-05 13:56:14 +00:00
boot boot e820 memory detection fixes 2011-09-19 13:36:03 +00:00
commands gcore command to coredump a process 2011-11-22 22:07:41 +01:00
common Split block/character protocols and libdriver 2011-11-23 14:06:37 +01:00
dist/bzip2 import NetBSD bzip2 and libbz2 2011-11-18 11:11:04 +01:00
docs Switch to NetBSD passwd format 2011-11-14 14:47:42 +00:00
drivers Split block/character protocols and libdriver 2011-11-23 14:06:37 +01:00
etc import NetBSD bzip2 and libbz2 2011-11-18 11:11:04 +01:00
include gcore command to coredump a process 2011-11-22 22:07:41 +01:00
kernel Introduce sys_getregs call, and let vfs use it 2011-11-22 02:07:33 +01:00
lib Split block/character protocols and libdriver 2011-11-23 14:06:37 +01:00
libexec update/fix manpage support 2011-09-28 15:24:15 +00:00
man More cleanup: no more CMOS and SCSI ioctls 2011-11-16 11:50:53 +01:00
nbsd_include gcore command to coredump a process 2011-11-22 22:07:41 +01:00
servers Split block/character protocols and libdriver 2011-11-23 14:06:37 +01:00
share Split block/character protocols and libdriver 2011-11-23 14:06:37 +01:00
test Split block/character protocols and libdriver 2011-11-23 14:06:37 +01:00
tools import NetBSD bzip2 and libbz2 2011-11-18 11:11:04 +01:00
usr.bin import NetBSD bzip2 and libbz2 2011-11-18 11:11:04 +01:00
usr.sbin Switch to NetBSD passwd format 2011-11-14 14:47:42 +00:00
.gitignore update/fix manpage support 2011-09-28 15:24:15 +00:00
LICENSE Fix parameter parsing in cut 2010-01-21 10:16:05 +00:00
Makefile Switch to NetBSD passwd format 2011-11-14 14:47:42 +00:00