[v6,10/11] blksnap: Kconfig and Makefile
Commit Message
From: Sergei Shtepa <sergei.shtepa@veeam.com>
Allows to build a module and add the blksnap to the kernel tree.
Co-developed-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Sergei Shtepa <sergei.shtepa@veeam.com>
---
drivers/block/Kconfig | 2 ++
drivers/block/Makefile | 2 ++
drivers/block/blksnap/Kconfig | 31 +++++++++++++++++++++++++++++++
drivers/block/blksnap/Makefile | 15 +++++++++++++++
4 files changed, 50 insertions(+)
create mode 100644 drivers/block/blksnap/Kconfig
create mode 100644 drivers/block/blksnap/Makefile
@@ -404,4 +404,6 @@ config BLKDEV_UBLK_LEGACY_OPCODES
source "drivers/block/rnbd/Kconfig"
+source "drivers/block/blksnap/Kconfig"
+
endif # BLK_DEV
@@ -40,3 +40,5 @@ obj-$(CONFIG_BLK_DEV_NULL_BLK) += null_blk/
obj-$(CONFIG_BLK_DEV_UBLK) += ublk_drv.o
swim_mod-y := swim.o swim_asm.o
+
+obj-$(CONFIG_BLKSNAP) += blksnap/
new file mode 100644
@@ -0,0 +1,31 @@
+# SPDX-License-Identifier: GPL-2.0
+#
+# Block device snapshot module configuration
+#
+
+config BLKSNAP
+ tristate "Block Devices Snapshots Module (blksnap)"
+ help
+ Allow to create snapshots and track block changes for block devices.
+ Designed for creating backups for block devices. Snapshots are
+ temporary and are released when backup is completed. Change block
+ tracking allows to create incremental or differential backups.
+
+config BLKSNAP_DIFF_BLKDEV
+ bool "Use an optimized algorithm to store difference on a block device"
+ depends on BLKSNAP
+ default y
+ help
+ The difference storage for a snapshot can be a regular file or a
+ block device. We can work with a block device through the interface
+ of a regular file. However, direct management of I/O units should
+ allow for higher performance.
+
+config BLKSNAP_CHUNK_DIFF_BIO_SYNC
+ bool "Use a synchronous I/O unit processing algorithm for the snapshot image"
+ depends on BLKSNAP
+ default n
+ help
+ Theoretical asynchronous algorithm for processing I/O units should
+ have higher performance. However, an attempt to confirm this on test
+ runs did not bring any results.
new file mode 100644
@@ -0,0 +1,15 @@
+# SPDX-License-Identifier: GPL-2.0
+
+blksnap-y := \
+ cbt_map.o \
+ chunk.o \
+ diff_area.o \
+ diff_buffer.o \
+ diff_storage.o \
+ event_queue.o \
+ main.o \
+ snapimage.o \
+ snapshot.o \
+ tracker.o
+
+obj-$(CONFIG_BLKSNAP) += blksnap.o