Distributed storage release.
Subsystems (4)
Hi.
I am pleased to announce new Distributed Storage (DST) project release.
DST is a block layer network device, which among others has following features:
* Kernel-side client and server. No need for any special tools for data processing (like special userspace applications) except for configuration.
* Bullet-proof memory allocations via memory pools for all temporary objects (transaction and so on).
* Zero-copy sending (except header) if supported by device using sendpage().
* Failover recovery in case of broken link
(reconnection if remote node is down).
* Full transaction support (resending of the failed transactions on timeout of after reconnect to failed node).
* Dynamically resizeable pool of threads used for data receiving and crypto processing.
* Initial autoconfiguration. Ability to extend it with additional attributes if needed.
* Support for any kind of network media (not limited to tcp or inet protocols) higher MAC layer (socket layer). Out of the box kernel-side IPv6 support (needs to extend configuration utility, check how it was done in POHMELFS [1]).
* Security attributes for local export nodes (list of allowed to connect addresses with permissions).
* Ability to use any supported cryptographically strong checksums. Ability to encrypt data channel.
This release brings following changes:
* compilation warnings removed
* space, init, alloc, config, debug cleanups
* s o m e c h e c k p a t c h . p l m a s t u r b a t i o n
* new DST name
Consider for inclusion.
One can grab sources (various configuration examples can be found in 'userspace' dir) from archive, or via kernel and userspace GIT trees.
1. POHMELFS homepage.
http://tservice.net.ru/~s0mbre/old/?section=projects&item=pohmelfs
2. DST homepage.
http://tservice.net.ru/~s0mbre/old/?section=projects&item=dst
3. DST archive.
http://tservice.net.ru/~s0mbre/archive/dst/
4. DST git trees.
http://tservice.net.ru/~s0mbre/archive/dst/dst.git/
http://tservice.net.ru/~s0mbre/archive/dst/dst-userspace.git/
drivers/block/Kconfig +2 -0
@@ -433,4 +433,6 @@ config VIRTIO_BLK This is the virtual block driver for virtio. It can be used with lguest or QEMU based VMMs (like KVM or Xen). Say Y or M. +source "drivers/block/dst/Kconfig" + endif # BLK_DEV
drivers/block/Makefile +2 -0
@@ -31,3 +31,5 @@ obj-$(CONFIG_BLK_DEV_SX8) += sx8.o obj-$(CONFIG_BLK_DEV_UB) += ub.o obj-$(CONFIG_XEN_BLKDEV_FRONTEND) += xen-blkfront.o + +obj-$(CONFIG_DST) += dst/
drivers/block/dst/Kconfig new file +14 -0
@@ -0,0 +1,14 @@ +config DST + tristate "Distributed storage" + depends on NET + select CONNECTOR + select LIBCRC32C + ---help--- + This driver allows to create a distributed storage block device. + +config DST_DEBUG + bool "DST debug" + depends on DST + ---help--- + This option will turn HEAVY debugging of the DST. + Turn it on ONLY if you have to debug some really obscure problem.
drivers/block/dst/Makefile new file +3 -0
@@ -0,0 +1,3 @@ +obj-$(CONFIG_DST) += dst.o + +dst-y := dcore.o state.o export.o thread_pool.o crypto.o trans.o
drivers/block/dst/crypto.c new file +678 -0
678 lines not on this page · raw message
drivers/block/dst/dcore.c new file +833 -0
833 lines not on this page · raw message
drivers/block/dst/export.c new file +584 -0
584 lines not on this page · raw message
drivers/block/dst/state.c new file +755 -0
755 lines not on this page · raw message
drivers/block/dst/thread_pool.c new file +306 -0
122 lines not on this page · raw message
drivers/block/dst/trans.c new file +291 -0
291 lines not on this page · raw message
include/linux/dst.h new file +431 -0
431 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
Evgeniy Polyakov
Part of the diff is not shown here. View the raw message.
Quoted 1 line · Evgeniy Polyakov
I am pleased to announce new Distributed Storage (DST) project release.
Hi,
I just had another quick random look over it and found a small memory leak in an error path, that was already present in your last post, but I didn't notice. Also there still seem to be some non-critical style issues, like an explicit continue at then end of a loop, but I didn't bother to catch them this time.
Sven
Quoted 14 lines
drivers/block/dst/crypto.c new file +14
-0+static void *dst_crypto_thread_init (void *data) +{ +struct dst_node *n = data; +struct dst_crypto_engine *e; +int err = -ENOMEM ; + + e =kzalloc (sizeof (struct dst_crypto_engine ),GFP_KERNEL ); +if (!e) + goto err_out_exit; + e->src =kzalloc (sizeof (struct scatterlist ) *2 * n->max_pages, +GFP_KERNEL ); +if (!e->src) + goto err_out_free; +
drivers/block/dst/crypto.c line 369
Quoted 10 lines
drivers/block/dst/crypto.c new file +10
-0+ e->dst = e->src + n->max_pages; + + err =dst_crypto_engine_init (e, n); +if (err) + goto err_out_free; + +return e; + +err_out_free: +kfree (e->src);
You leak the memory allocated for e here.
Quoted 3 lines
drivers/block/dst/crypto.c new file +3
-0+err_out_exit: +return ERR_PTR (err); +}
Hi Sven.
Quoted 18 lines · Sven Wegener
Quoted 18 lines
drivers/block/dst/crypto.c new file +18
-0+static void *dst_crypto_thread_init (void *data) +{ +struct dst_node *n = data; +struct dst_crypto_engine *e; +int err = -ENOMEM ; + + e =kzalloc (sizeof (struct dst_crypto_engine ),GFP_KERNEL ); +if (!e) + goto err_out_exit; + e->src =kzalloc (sizeof (struct scatterlist ) *2 * n->max_pages, +GFP_KERNEL ); +if (!e->src) + goto err_out_free; + + e->dst = e->src + n->max_pages; + + err =dst_crypto_engine_init (e, n); +if (err)
Quoted 8 lines
drivers/block/dst/crypto.c line 369
Quoted 6 lines
drivers/block/dst/crypto.c new file +6
-0+ goto err_out_free; + +return e; + +err_out_free: +kfree (e->src);You leak the memory allocated for e here.
Thanks a lot for pointing this out, I will fix it.
Signature · 1 line
Evgeniy Polyakov