Skip to contentSkip to conversation

zeroed target

DISCUSSION Mikulas Patocka 1 participant 1 message Jan 28, 2013 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Mikulas Patocka

author maintainer
#1 lore raw

Hi

Here I'm sending updated dm-zeroed target.

Mikulas

---

dm-zeroed target

Dm-zeroed target provides a device that returns zeroed in areas that have not yet been written. It maintains a log containing bitmap of written areas.

Use:
the target accepts four arguments:
sectors_per_data_block sectors_per_metadata_block data_device metadata_device

On first use, zero the first 512 bytes of the metadata device. The target will then auto-initialize the metadata device.

We may resize data or metadata device, if we are resizing, the target must be suspended and resumed. It detects new sizes on resume.

---
 Documentation/device-mapper/zeroed.txt |   47 +
 drivers/md/Kconfig                     |    7 
 drivers/md/Makefile                    |    1 
 drivers/md/dm-zeroed.c                 | 1153 +++++++++++++++++++++++++++++++++
 4 files changed, 1208 insertions(+)
drivers/md/Kconfig +7 -0
Index: linux-3.8-rc5-fast/drivers/md/Kconfig
===================================================================
@@ -369,6 +369,13 @@ config DM_DELAY
 
 	If unsure, say N.
 
+config DM_ZEROED
+	tristate "Zeroed target"
+	depends on BLK_DEV_DM
+	select DM_BUFIO
+	---help---
+	  This target initializes all blocks with zeros.
+
 config DM_UEVENT
 	bool "DM uevents"
 	depends on BLK_DEV_DM
drivers/md/Makefile +1 -0
Index: linux-3.8-rc5-fast/drivers/md/Makefile
===================================================================
@@ -46,6 +46,7 @@ obj-$(CONFIG_DM_ZERO)		+= dm-zero.o
 obj-$(CONFIG_DM_RAID)	+= dm-raid.o
 obj-$(CONFIG_DM_THIN_PROVISIONING)	+= dm-thin-pool.o
 obj-$(CONFIG_DM_VERITY)		+= dm-verity.o
+obj-$(CONFIG_DM_ZEROED)		+= dm-zeroed.o
 
 ifeq ($(CONFIG_DM_UEVENT),y)
 dm-mod-objs			+= dm-uevent.o
drivers/md/dm-zeroed.c new file +1153 -0

1,153 lines not on this page · raw message

Documentation/device-mapper/zeroed.txt new file +47 -0

47 lines not on this page · raw message