ANDROID: dm: dm-user: New target that proxies BIOs to userspace

dm-user is essentially FUSE for block devices: as BIOs come in through
device mapper they are proxied to a userspace daemon via a control misc
device.

This is very much a work in progress.  There's a handful of FIXMEs
spread throughout the code with more details.  As far as I know there is
nothing broken with the current code, there's just more work to do.

Test: Ran the selftests on the version of this I'm developing for Linus'
      tree, on both 4.19 and 5.8.
Bug: 161496058
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
Change-Id: If5bcd8a43c3db5b556563ba303f474dd0d2902e8
This commit is contained in:
Palmer Dabbelt 2020-09-29 21:18:22 -07:00 committed by Alistair Delva
parent d547cb391b
commit 1caf05ce90
3 changed files with 1156 additions and 0 deletions

View file

@ -601,4 +601,18 @@ config DM_BOW
If unsure, say N.
config DM_USER
tristate "Block device in userspace"
depends on BLK_DEV_DM
default y
help
This device-mapper target allows a userspace daemon to provide the
contents of a block device. See
<file:Documentation/block/dm-user.rst> for more information.
To compile this code as a module, choose M here: the module will be
called dm-user.
If unsure, say N.
endif # MD

View file

@ -70,6 +70,7 @@ obj-$(CONFIG_DM_INTEGRITY) += dm-integrity.o
obj-$(CONFIG_DM_ZONED) += dm-zoned.o
obj-$(CONFIG_DM_WRITECACHE) += dm-writecache.o
obj-$(CONFIG_DM_BOW) += dm-bow.o
obj-$(CONFIG_DM_USER) += dm-user.o
ifeq ($(CONFIG_DM_UEVENT),y)
dm-mod-objs += dm-uevent.o

1141
drivers/md/dm-user.c Normal file

File diff suppressed because it is too large Load diff