Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 95d402f0 authored by Mikulas Patocka's avatar Mikulas Patocka Committed by Alasdair G Kergon
Browse files

dm: add bufio



The dm-bufio interface allows you to do cached I/O on devices,
holding recently-read blocks in memory and performing delayed writes.

We don't use buffer cache or page cache already present in the kernel, because:
* we need to handle block sizes larger than a page
* we can't allocate memory to perform reads or we'd have deadlocks

Currently, when a cache is required, we limit its size to a fraction of
available memory.  Usage can be viewed and changed in
/sys/module/dm_bufio/parameters/ .

The first user is thin provisioning, but more dm users are planned.

Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
parent 3cf2e4ba
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -208,6 +208,14 @@ config DM_DEBUG

	  If unsure, say N.

config DM_BUFIO
       tristate
       depends on BLK_DEV_DM && EXPERIMENTAL
       ---help---
	 This interface allows you to do buffered I/O on a device and acts
	 as a cache, holding recently-read blocks in memory and performing
	 delayed writes.

config DM_CRYPT
	tristate "Crypt target support"
	depends on BLK_DEV_DM
+1 −0
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ obj-$(CONFIG_MD_MULTIPATH) += multipath.o
obj-$(CONFIG_MD_FAULTY)		+= faulty.o
obj-$(CONFIG_BLK_DEV_MD)	+= md-mod.o
obj-$(CONFIG_BLK_DEV_DM)	+= dm-mod.o
obj-$(CONFIG_DM_BUFIO)		+= dm-bufio.o
obj-$(CONFIG_DM_CRYPT)		+= dm-crypt.o
obj-$(CONFIG_DM_DELAY)		+= dm-delay.o
obj-$(CONFIG_DM_FLAKEY)		+= dm-flakey.o