Distributed storage release.
Subsystems (4)
Hi Andrew.
I am pleased to announce new distributed storage (DST) project release. This release increases size of the patch by 10% by providing lots of comments on how code works. Also cleaned up number of pointed issues:
kzalloc/kcalloc, style, config deps and so on.
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). All clients structures are allocated as single transaction from the memory pool and except this there is no allocation overhead. Network adds own though. Server uses memory pools too, but number of allocations is higher (bio, transaction and pages for IO).
* 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.
* Keepalive messages to detect failed nodes early.
One can grab sources (various configuration examples can be found in 'userspace' dir) from archive, or via kernel and userspace GIT trees.
Consider for inclusion.
Thank you.
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/
5. GIT web interface.
http://tservice.net.ru/~s0mbre/cgi-bin/gitweb.cgi
drivers/block/Kconfig | 2 + drivers/block/Makefile | 2 + drivers/block/dst/Kconfig | 14 + drivers/block/dst/Makefile | 3 + drivers/block/dst/crypto.c | 731 +++++++++++++++++++++++++++++ drivers/block/dst/dcore.c | 963 +++++++++++++++++++++++++++++++++++++++ drivers/block/dst/export.c | 662 +++++++++++++++++++++++++++ drivers/block/dst/state.c | 838 ++++++++++++++++++++++++++++++++++ drivers/block/dst/thread_pool.c | 345 ++++++++++++++ drivers/block/dst/trans.c | 335 ++++++++++++++ include/linux/connector.h | 4 +- include/linux/dst.h | 572 +++++++++++++++++++++++ 12 files changed, 4470 insertions(+), 1 deletions(-)
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 && CRYPTO && SYSFS + 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) += nst.o + +nst-y := dcore.o state.o export.o thread_pool.o crypto.o trans.o
drivers/block/dst/crypto.c new file +731 -0
731 lines not on this page · raw message
drivers/block/dst/dcore.c new file +963 -0
963 lines not on this page · raw message
drivers/block/dst/export.c new file +662 -0
662 lines not on this page · raw message
drivers/block/dst/state.c new file +838 -0
616 lines not on this page · raw message
drivers/block/dst/thread_pool.c new file +345 -0
345 lines not on this page · raw message
drivers/block/dst/trans.c new file +335 -0
335 lines not on this page · raw message
include/linux/dst.h new file +572 -0
572 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.
Hi.
Quoted 4 lines · Evgeniy Polyakov
I am pleased to announce new distributed storage (DST) project release. This release increases size of the patch by 10% by providing lots of comments on how code works. Also cleaned up number of pointed issues:
kzalloc/kcalloc, style, config deps and so on.
Just in case you will want to apply it to the latest tree and compile, following patch is needed to properly work with 2.6.27 tree. 2.6.26 (as what it was against) does not need this.
drivers/block/dst/dcore.c +1 -0
@@ -24,6 +24,7 @@#include <linux/jhash.h> #include <linux/idr.h> #include <linux/init.h> +#include <linux/namei.h> #include <linux/slab.h> #include <linux/socket.h>
Signature · 1 line
Evgeniy Polyakov
And to make everyone happy, here is couple of whitespace cleanups. Everyone happy? I hope so. Now world is round again and there is no war.
commit b2be28f2f09ea9e06753cb50a2e68b4ca0ab4607
Author: Evgeniy Polyakov [email protected] Date: Wed Oct 15 03:27:02 2008 +0400
Whitespace cleanups
drivers/block/dst/crypto.c +1 -1
@@ -643,7 +643,7 @@ err_out_exit:/* * Schedule crypto processing for given transaction. -*/ +*/ int dst_trans_crypto (struct dst_trans *t) {struct dst_node *n = t->n;
drivers/block/dst/dcore.c +0 -2
@@ -795,7 +795,6 @@ static int dst_start_node(struct dst_node *n, struct dst_ctl *ctl,return 0 ; } -typedef int (*dst_command_func )(struct dst_node *n,struct dst_ctl *ctl,void *data,unsigned int size);
@@ -823,7 +822,6 @@ static void cn_dst_callback(void *data)struct dst_node *n =NULL , *tmp;unsigned int hash; -if (msg->len <sizeof (struct dst_ctl )) { err = -EBADMSG ; goto out;
drivers/block/dst/export.c +3 -3
@@ -271,13 +271,13 @@ static void dst_state_cleanup_export(struct dst_state *st)if (p)bio_put (p->bio); - +dprintk ("%s: st: %p, refcnt: %d, list_empty: %d, p: %p.\n" , __func__, st,atomic_read (&st->refcnt),list_empty (&st->request_list), p); } } - +dst_state_put (st); }
@@ -327,7 +327,7 @@ static int dst_accept(void *init_data, void *schedule_data) }dprintk ("%s: freeing listening socket st: %p.\n" , __func__, main); - +dst_state_lock (main);dst_poll_exit (main);dst_state_socket_release (main);
drivers/block/dst/state.c +2 -2
@@ -809,7 +809,7 @@ int dst_trans_send(struct dst_trans *t)struct bio *bio = t->bio;dst_convert_cmd (&t->cmd); - +dst_state_lock (st);if (!st->socket) { err =dst_state_init_connected (st);
@@ -828,7 +828,7 @@ int dst_trans_send(struct dst_trans *t)dst_state_unlock (st);return 0 ; - + err_out_reset:dst_state_reset_nolock (st); err_out_unlock:
drivers/block/dst/thread_pool.c +2 -2
@@ -42,7 +42,7 @@ struct thread_pool_workerint has_data;int need_exit;unsigned int id; - +wait_queue_head_t wait;void *private;
@@ -170,7 +170,7 @@ void thread_pool_del_worker_id(struct thread_pool *p, unsigned int id) } }mutex_unlock (&p->thread_lock); - +if (found)thread_pool_exit_worker (w); }
Signature · 1 line
Evgeniy Polyakov