Skip to content

Commit

Permalink
ANDROID: dm: dm-user: New target that proxies BIOs to userspace
Browse files Browse the repository at this point in the history
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 <[email protected]>
Change-Id: If5bcd8a43c3db5b556563ba303f474dd0d2902e8
  • Loading branch information
palmer-dabbelt authored and adelva1984 committed Jan 12, 2021
1 parent d547cb3 commit 1caf05c
Show file tree
Hide file tree
Showing 3 changed files with 1,156 additions and 0 deletions.
14 changes: 14 additions & 0 deletions drivers/md/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions drivers/md/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading

0 comments on commit 1caf05c

Please sign in to comment.