Index: uspace/srv/bd/hr/fge.c
===================================================================
--- uspace/srv/bd/hr/fge.c	(revision 746e636585e0d3bd3069437de2f444739c3aa1a7)
+++ uspace/srv/bd/hr/fge.c	(revision 6d0fc1180b67061b8a08ad0dadb0ce418098023c)
@@ -53,4 +53,5 @@
 #include "fge.h"
 
+/* forward declarations */
 struct fge_fibril_data;
 typedef struct fge_fibril_data fge_fibril_data_t;
@@ -58,55 +59,55 @@
 typedef struct wu_queue wu_queue_t;
 
-static void *hr_fpool_make_storage(hr_fpool_t *, ssize_t *);
-static void hr_fpool_group_epilogue(hr_fpool_t *);
-static errno_t fge_fibril(void *);
-static errno_t wu_queue_init(wu_queue_t *, size_t);
-static void wu_queue_push(wu_queue_t *, fge_fibril_data_t *);
-static void wu_queue_pop(wu_queue_t *, fge_fibril_data_t *);
-static ssize_t hr_fpool_get_free_slot(hr_fpool_t *);
-
-typedef struct fge_fibril_data {
-	hr_wu_t wu; /* user-provided work unit fcn pointer */
-	void *arg;
-	hr_fgroup_t *group;
-	ssize_t memslot; /* index to pool bitmap slot */
-} fge_fibril_data_t;
-
-typedef struct wu_queue {
-	fibril_mutex_t lock;
-	fibril_condvar_t not_empty;
-	fibril_condvar_t not_full;
-	fge_fibril_data_t *fexecs;
+static void	*hr_fpool_make_storage(hr_fpool_t *, ssize_t *);
+static void	 hr_fpool_group_epilogue(hr_fpool_t *);
+static errno_t	 fge_fibril(void *);
+static errno_t	 wu_queue_init(wu_queue_t *, size_t);
+static void	 wu_queue_push(wu_queue_t *, fge_fibril_data_t *);
+static void	 wu_queue_pop(wu_queue_t *, fge_fibril_data_t *);
+static ssize_t	 hr_fpool_get_free_slot(hr_fpool_t *);
+
+struct fge_fibril_data {
+	hr_wu_t		 wu;		/* work unit function pointer */
+	void		*arg;		/* work unit function argument */
+	hr_fgroup_t	*group;		/* back-pointer to group */
+	ssize_t		 memslot;	/* index to pool bitmap slot */
+};
+
+struct wu_queue {
+	fibril_mutex_t		 lock;
+	fibril_condvar_t	 not_empty;
+	fibril_condvar_t	 not_full;
+	fge_fibril_data_t	*fexecs;	/* circ-buf memory */
 	circ_buf_t cbuf;
-} wu_queue_t;
+};
 
 struct hr_fpool {
-	fibril_mutex_t lock;
+	fibril_mutex_t	 lock;
+	bitmap_t	 bitmap;	/* memory slot bitmap */
+	wu_queue_t	 queue;
+	fid_t		*fibrils;
+	uint8_t		*wu_storage;	/* pre-allocated pool storage */
+	size_t		 fibril_cnt;
+	size_t		 max_wus;
+	size_t		 active_groups;
+	bool		 stop;
+	size_t		 wu_size;
+	size_t		 wu_storage_free_count;
 	fibril_condvar_t all_wus_done;
-	bitmap_t bitmap;
-	wu_queue_t queue;
-	fid_t *fibrils;
-	uint8_t *wu_storage;
-	size_t fibril_cnt;
-	size_t max_wus;
-	size_t active_groups;
-	bool stop;
-	size_t wu_size;
-	size_t wu_storage_free_count;
 };
 
 struct hr_fgroup {
-	hr_fpool_t *pool;
-	size_t wu_cnt;		/* total wu count */
-	size_t submitted;
-	size_t reserved_cnt;	/* no. of reserved wu storage slots */
-	size_t reserved_avail;
-	size_t *memslots;	/* indices to pool bitmap */
-	void *own_mem;
-	size_t own_used;
-	errno_t final_errno;
-	size_t finished_okay;
-	size_t finished_fail;
-	fibril_mutex_t lock;
+	hr_fpool_t	*pool;		/* back-pointer to pool */
+	size_t		 wu_cnt;	/* upper bound of work units */
+	size_t		 submitted;	/* number of submitted jobs */
+	size_t		 reserved_cnt;	/* no. of reserved wu storage slots */
+	size_t		 reserved_avail;
+	size_t		*memslots;	/* indices to pool bitmap */
+	void		*own_mem;	/* own allocated memory */
+	size_t		 own_used;	/* own memory slots used counter */
+	errno_t		 final_errno;	/* agreggated errno */
+	size_t		 finished_okay;	/* no. of wus that ended with EOK */
+	size_t		 finished_fail;	/* no. of wus that ended with != EOK */
+	fibril_mutex_t	 lock;
 	fibril_condvar_t all_done;
 };
Index: uspace/srv/bd/hr/fge.h
===================================================================
--- uspace/srv/bd/hr/fge.h	(revision 746e636585e0d3bd3069437de2f444739c3aa1a7)
+++ uspace/srv/bd/hr/fge.h	(revision 6d0fc1180b67061b8a08ad0dadb0ce418098023c)
@@ -1,4 +1,4 @@
 /*
- * Copyright (c) 2024 Miroslav Cimerman
+ * Copyright (c) 2025 Miroslav Cimerman
  * Copyright (c) 2024 Vojtech Horky
  * All rights reserved.
@@ -48,10 +48,10 @@
 typedef errno_t (*hr_wu_t)(void *);
 
-extern hr_fpool_t *hr_fpool_create(size_t, size_t, size_t);
-extern void hr_fpool_destroy(hr_fpool_t *);
-extern hr_fgroup_t *hr_fgroup_create(hr_fpool_t *, size_t);
-extern void *hr_fgroup_alloc(hr_fgroup_t *);
-extern void hr_fgroup_submit(hr_fgroup_t *, hr_wu_t, void *);
-extern errno_t hr_fgroup_wait(hr_fgroup_t *, size_t *, size_t *);
+extern hr_fpool_t	*hr_fpool_create(size_t, size_t, size_t);
+extern void		 hr_fpool_destroy(hr_fpool_t *);
+extern hr_fgroup_t	*hr_fgroup_create(hr_fpool_t *, size_t);
+extern void		*hr_fgroup_alloc(hr_fgroup_t *);
+extern void		 hr_fgroup_submit(hr_fgroup_t *, hr_wu_t, void *);
+extern errno_t		 hr_fgroup_wait(hr_fgroup_t *, size_t *, size_t *);
 
 #endif
Index: uspace/srv/bd/hr/hr.c
===================================================================
--- uspace/srv/bd/hr/hr.c	(revision 746e636585e0d3bd3069437de2f444739c3aa1a7)
+++ uspace/srv/bd/hr/hr.c	(revision 6d0fc1180b67061b8a08ad0dadb0ce418098023c)
@@ -58,4 +58,12 @@
 #include "var.h"
 
+static void hr_assemble_srv(ipc_call_t *);
+static void hr_auto_assemble_srv(ipc_call_t *);
+static void hr_stop_srv(ipc_call_t *);
+static void hr_add_hotspare_srv(ipc_call_t *);
+static void hr_print_status_srv(ipc_call_t *);
+static void hr_ctl_conn(ipc_call_t *, void *);
+static void hr_client_conn(ipc_call_t *, void *);
+
 loc_srv_t *hr_srv;
 list_t hr_volumes;
@@ -63,98 +71,4 @@
 
 static service_id_t ctl_sid;
-
-static void hr_auto_assemble_srv(ipc_call_t *icall)
-{
-	HR_DEBUG("%s()", __func__);
-
-	errno_t rc;
-	size_t size;
-	size_t assembled_cnt = 0;
-	ipc_call_t call;
-
-	if (!async_data_read_receive(&call, &size)) {
-		async_answer_0(icall, EREFUSED);
-		return;
-	}
-
-	if (size != sizeof(size_t)) {
-		async_answer_0(&call, EINVAL);
-		async_answer_0(icall, EINVAL);
-		return;
-	}
-
-	rc = hr_util_try_assemble(NULL, &assembled_cnt);
-	if (rc != EOK)
-		goto error;
-
-	rc = async_data_read_finalize(&call, &assembled_cnt, size);
-	if (rc != EOK)
-		goto error;
-
-	async_answer_0(icall, EOK);
-	return;
-error:
-	async_answer_0(&call, rc);
-	async_answer_0(icall, rc);
-}
-
-static void hr_assemble_srv(ipc_call_t *icall)
-{
-	HR_DEBUG("%s()", __func__);
-
-	errno_t rc;
-	size_t size, assembled_cnt;
-	hr_config_t *cfg;
-	ipc_call_t call;
-
-	if (!async_data_write_receive(&call, &size)) {
-		async_answer_0(&call, EREFUSED);
-		async_answer_0(icall, EREFUSED);
-		return;
-	}
-
-	if (size != sizeof(hr_config_t)) {
-		async_answer_0(&call, EINVAL);
-		async_answer_0(icall, EINVAL);
-		return;
-	}
-
-	cfg = calloc(1, sizeof(hr_config_t));
-	if (cfg == NULL) {
-		async_answer_0(&call, ENOMEM);
-		async_answer_0(icall, ENOMEM);
-		return;
-	}
-
-	rc = async_data_write_finalize(&call, cfg, size);
-	if (rc != EOK)
-		goto error;
-
-	if (!async_data_read_receive(&call, &size)) {
-		async_answer_0(icall, EREFUSED);
-		return;
-	}
-
-	if (size != sizeof(size_t)) {
-		async_answer_0(icall, EINVAL);
-		return;
-	}
-
-	rc = hr_util_try_assemble(cfg, &assembled_cnt);
-	if (rc != EOK)
-		goto error;
-
-	rc = async_data_read_finalize(&call, &assembled_cnt, size);
-	if (rc != EOK)
-		goto error;
-
-	free(cfg);
-	async_answer_0(icall, EOK);
-	return;
-error:
-	free(cfg);
-	async_answer_0(&call, rc);
-	async_answer_0(icall, rc);
-}
 
 static void hr_create_srv(ipc_call_t *icall)
@@ -264,4 +178,98 @@
 	free(cfg);
 	hr_destroy_vol_struct(new_volume);
+	async_answer_0(icall, rc);
+}
+
+static void hr_assemble_srv(ipc_call_t *icall)
+{
+	HR_DEBUG("%s()", __func__);
+
+	errno_t rc;
+	size_t size, assembled_cnt;
+	hr_config_t *cfg;
+	ipc_call_t call;
+
+	if (!async_data_write_receive(&call, &size)) {
+		async_answer_0(&call, EREFUSED);
+		async_answer_0(icall, EREFUSED);
+		return;
+	}
+
+	if (size != sizeof(hr_config_t)) {
+		async_answer_0(&call, EINVAL);
+		async_answer_0(icall, EINVAL);
+		return;
+	}
+
+	cfg = calloc(1, sizeof(hr_config_t));
+	if (cfg == NULL) {
+		async_answer_0(&call, ENOMEM);
+		async_answer_0(icall, ENOMEM);
+		return;
+	}
+
+	rc = async_data_write_finalize(&call, cfg, size);
+	if (rc != EOK)
+		goto error;
+
+	if (!async_data_read_receive(&call, &size)) {
+		async_answer_0(icall, EREFUSED);
+		return;
+	}
+
+	if (size != sizeof(size_t)) {
+		async_answer_0(icall, EINVAL);
+		return;
+	}
+
+	rc = hr_util_try_assemble(cfg, &assembled_cnt);
+	if (rc != EOK)
+		goto error;
+
+	rc = async_data_read_finalize(&call, &assembled_cnt, size);
+	if (rc != EOK)
+		goto error;
+
+	free(cfg);
+	async_answer_0(icall, EOK);
+	return;
+error:
+	free(cfg);
+	async_answer_0(&call, rc);
+	async_answer_0(icall, rc);
+}
+
+static void hr_auto_assemble_srv(ipc_call_t *icall)
+{
+	HR_DEBUG("%s()", __func__);
+
+	errno_t rc;
+	size_t size;
+	size_t assembled_cnt = 0;
+	ipc_call_t call;
+
+	if (!async_data_read_receive(&call, &size)) {
+		async_answer_0(icall, EREFUSED);
+		return;
+	}
+
+	if (size != sizeof(size_t)) {
+		async_answer_0(&call, EINVAL);
+		async_answer_0(icall, EINVAL);
+		return;
+	}
+
+	rc = hr_util_try_assemble(NULL, &assembled_cnt);
+	if (rc != EOK)
+		goto error;
+
+	rc = async_data_read_finalize(&call, &assembled_cnt, size);
+	if (rc != EOK)
+		goto error;
+
+	async_answer_0(icall, EOK);
+	return;
+error:
+	async_answer_0(&call, rc);
 	async_answer_0(icall, rc);
 }
Index: uspace/srv/bd/hr/io.h
===================================================================
--- uspace/srv/bd/hr/io.h	(revision 746e636585e0d3bd3069437de2f444739c3aa1a7)
+++ uspace/srv/bd/hr/io.h	(revision 6d0fc1180b67061b8a08ad0dadb0ce418098023c)
@@ -40,12 +40,12 @@
 
 typedef struct hr_io {
-	hr_bd_op_type_t type;
-	uint64_t ba;
-	uint64_t cnt;
-	size_t extent;
-	void *data_read;
-	const void *data_write;
-	hr_volume_t *vol;
-	void (*state_callback)(hr_volume_t *, size_t, errno_t);
+	hr_bd_op_type_t	 type;
+	uint64_t	 ba;
+	uint64_t	 cnt;
+	size_t		 extent;
+	void		*data_read;
+	const void	*data_write;
+	hr_volume_t	*vol;
+	void		(*state_callback)(hr_volume_t *, size_t, errno_t);
 } hr_io_t;
 
Index: uspace/srv/bd/hr/raid0.c
===================================================================
--- uspace/srv/bd/hr/raid0.c	(revision 746e636585e0d3bd3069437de2f444739c3aa1a7)
+++ uspace/srv/bd/hr/raid0.c	(revision 6d0fc1180b67061b8a08ad0dadb0ce418098023c)
@@ -53,30 +53,31 @@
 #include "var.h"
 
+static void	hr_raid0_update_vol_status(hr_volume_t *);
+static void	raid0_state_callback(hr_volume_t *, size_t, errno_t);
+static errno_t	hr_raid0_bd_op(hr_bd_op_type_t, bd_srv_t *, aoff64_t, size_t,
+    void *, const void *, size_t);
+
+/* bdops */
+static errno_t	hr_raid0_bd_open(bd_srvs_t *, bd_srv_t *);
+static errno_t 	hr_raid0_bd_close(bd_srv_t *);
+static errno_t 	hr_raid0_bd_read_blocks(bd_srv_t *, aoff64_t, size_t, void *,
+    size_t);
+static errno_t	hr_raid0_bd_sync_cache(bd_srv_t *, aoff64_t, size_t);
+static errno_t	hr_raid0_bd_write_blocks(bd_srv_t *, aoff64_t, size_t,
+    const void *, size_t);
+static errno_t	hr_raid0_bd_get_block_size(bd_srv_t *, size_t *);
+static errno_t	hr_raid0_bd_get_num_blocks(bd_srv_t *, aoff64_t *);
+
+static bd_ops_t hr_raid0_bd_ops = {
+	.open		= hr_raid0_bd_open,
+	.close		= hr_raid0_bd_close,
+	.sync_cache	= hr_raid0_bd_sync_cache,
+	.read_blocks	= hr_raid0_bd_read_blocks,
+	.write_blocks	= hr_raid0_bd_write_blocks,
+	.get_block_size	= hr_raid0_bd_get_block_size,
+	.get_num_blocks	= hr_raid0_bd_get_num_blocks
+};
+
 extern loc_srv_t *hr_srv;
-
-static void hr_raid0_update_vol_status(hr_volume_t *);
-static errno_t hr_raid0_bd_op(hr_bd_op_type_t, bd_srv_t *, aoff64_t, size_t,
-    void *, const void *, size_t);
-
-/* bdops */
-static errno_t hr_raid0_bd_open(bd_srvs_t *, bd_srv_t *);
-static errno_t hr_raid0_bd_close(bd_srv_t *);
-static errno_t hr_raid0_bd_read_blocks(bd_srv_t *, aoff64_t, size_t, void *,
-    size_t);
-static errno_t hr_raid0_bd_sync_cache(bd_srv_t *, aoff64_t, size_t);
-static errno_t hr_raid0_bd_write_blocks(bd_srv_t *, aoff64_t, size_t,
-    const void *, size_t);
-static errno_t hr_raid0_bd_get_block_size(bd_srv_t *, size_t *);
-static errno_t hr_raid0_bd_get_num_blocks(bd_srv_t *, aoff64_t *);
-
-static bd_ops_t hr_raid0_bd_ops = {
-	.open = hr_raid0_bd_open,
-	.close = hr_raid0_bd_close,
-	.sync_cache = hr_raid0_bd_sync_cache,
-	.read_blocks = hr_raid0_bd_read_blocks,
-	.write_blocks = hr_raid0_bd_write_blocks,
-	.get_block_size = hr_raid0_bd_get_block_size,
-	.get_num_blocks = hr_raid0_bd_get_num_blocks
-};
 
 errno_t hr_raid0_create(hr_volume_t *new_volume)
Index: uspace/srv/bd/hr/raid1.c
===================================================================
--- uspace/srv/bd/hr/raid1.c	(revision 746e636585e0d3bd3069437de2f444739c3aa1a7)
+++ uspace/srv/bd/hr/raid1.c	(revision 6d0fc1180b67061b8a08ad0dadb0ce418098023c)
@@ -54,38 +54,38 @@
 #include "var.h"
 
+static void	hr_raid1_update_vol_status(hr_volume_t *);
+static void	hr_raid1_ext_state_callback(hr_volume_t *, size_t, errno_t);
+static size_t	hr_raid1_count_good_extents(hr_volume_t *, uint64_t, size_t,
+    uint64_t);
+static errno_t	hr_raid1_bd_op(hr_bd_op_type_t, bd_srv_t *, aoff64_t, size_t,
+    void *, const void *, size_t);
+static errno_t	hr_raid1_rebuild(void *);
+static errno_t	init_rebuild(hr_volume_t *, size_t *);
+static errno_t	swap_hs(hr_volume_t *, size_t, size_t);
+static errno_t	hr_raid1_restore_blocks(hr_volume_t *, size_t, uint64_t, size_t,
+    void *);
+
+/* bdops */
+static errno_t	hr_raid1_bd_open(bd_srvs_t *, bd_srv_t *);
+static errno_t	hr_raid1_bd_close(bd_srv_t *);
+static errno_t	hr_raid1_bd_read_blocks(bd_srv_t *, aoff64_t, size_t, void *,
+    size_t);
+static errno_t	hr_raid1_bd_sync_cache(bd_srv_t *, aoff64_t, size_t);
+static errno_t	hr_raid1_bd_write_blocks(bd_srv_t *, aoff64_t, size_t,
+    const void *, size_t);
+static errno_t	hr_raid1_bd_get_block_size(bd_srv_t *, size_t *);
+static errno_t	hr_raid1_bd_get_num_blocks(bd_srv_t *, aoff64_t *);
+
+static bd_ops_t hr_raid1_bd_ops = {
+	.open		= hr_raid1_bd_open,
+	.close		= hr_raid1_bd_close,
+	.sync_cache	= hr_raid1_bd_sync_cache,
+	.read_blocks	= hr_raid1_bd_read_blocks,
+	.write_blocks	= hr_raid1_bd_write_blocks,
+	.get_block_size	= hr_raid1_bd_get_block_size,
+	.get_num_blocks	= hr_raid1_bd_get_num_blocks
+};
+
 extern loc_srv_t *hr_srv;
-
-static void hr_raid1_update_vol_status(hr_volume_t *);
-static void hr_raid1_ext_state_callback(hr_volume_t *, size_t, errno_t);
-static size_t hr_raid1_count_good_extents(hr_volume_t *, uint64_t, size_t,
-    uint64_t);
-static errno_t hr_raid1_bd_op(hr_bd_op_type_t, bd_srv_t *, aoff64_t, size_t,
-    void *, const void *, size_t);
-static errno_t hr_raid1_rebuild(void *);
-static errno_t init_rebuild(hr_volume_t *, size_t *);
-static errno_t swap_hs(hr_volume_t *, size_t, size_t);
-static errno_t hr_raid1_restore_blocks(hr_volume_t *, size_t, uint64_t, size_t,
-    void *);
-
-/* bdops */
-static errno_t hr_raid1_bd_open(bd_srvs_t *, bd_srv_t *);
-static errno_t hr_raid1_bd_close(bd_srv_t *);
-static errno_t hr_raid1_bd_read_blocks(bd_srv_t *, aoff64_t, size_t, void *,
-    size_t);
-static errno_t hr_raid1_bd_sync_cache(bd_srv_t *, aoff64_t, size_t);
-static errno_t hr_raid1_bd_write_blocks(bd_srv_t *, aoff64_t, size_t,
-    const void *, size_t);
-static errno_t hr_raid1_bd_get_block_size(bd_srv_t *, size_t *);
-static errno_t hr_raid1_bd_get_num_blocks(bd_srv_t *, aoff64_t *);
-
-static bd_ops_t hr_raid1_bd_ops = {
-	.open = hr_raid1_bd_open,
-	.close = hr_raid1_bd_close,
-	.sync_cache = hr_raid1_bd_sync_cache,
-	.read_blocks = hr_raid1_bd_read_blocks,
-	.write_blocks = hr_raid1_bd_write_blocks,
-	.get_block_size = hr_raid1_bd_get_block_size,
-	.get_num_blocks = hr_raid1_bd_get_num_blocks
-};
 
 errno_t hr_raid1_create(hr_volume_t *new_volume)
Index: uspace/srv/bd/hr/raid5.c
===================================================================
--- uspace/srv/bd/hr/raid5.c	(revision 746e636585e0d3bd3069437de2f444739c3aa1a7)
+++ uspace/srv/bd/hr/raid5.c	(revision 6d0fc1180b67061b8a08ad0dadb0ce418098023c)
@@ -53,41 +53,41 @@
 #include "var.h"
 
+static errno_t	hr_raid5_vol_usable(hr_volume_t *);
+static ssize_t	hr_raid5_get_bad_ext(hr_volume_t *);
+static errno_t	hr_raid5_update_vol_status(hr_volume_t *);
+static void	hr_raid5_handle_extent_error(hr_volume_t *, size_t, errno_t);
+static void	xor(void *, const void *, size_t);
+static errno_t	hr_raid5_read_degraded(hr_volume_t *, uint64_t, uint64_t,
+    void *, size_t);
+static errno_t	hr_raid5_write(hr_volume_t *, uint64_t, uint64_t, aoff64_t,
+    const void *, size_t);
+static errno_t	hr_raid5_write_parity(hr_volume_t *, uint64_t, uint64_t,
+    uint64_t, const void *, size_t);
+static errno_t	hr_raid5_bd_op(hr_bd_op_type_t, bd_srv_t *, aoff64_t, size_t,
+    void *, const void *, size_t);
+static errno_t	hr_raid5_rebuild(void *);
+
+/* bdops */
+static errno_t	hr_raid5_bd_open(bd_srvs_t *, bd_srv_t *);
+static errno_t	hr_raid5_bd_close(bd_srv_t *);
+static errno_t	hr_raid5_bd_read_blocks(bd_srv_t *, aoff64_t, size_t, void *,
+    size_t);
+static errno_t	hr_raid5_bd_sync_cache(bd_srv_t *, aoff64_t, size_t);
+static errno_t	hr_raid5_bd_write_blocks(bd_srv_t *, aoff64_t, size_t,
+    const void *, size_t);
+static errno_t	hr_raid5_bd_get_block_size(bd_srv_t *, size_t *);
+static errno_t	hr_raid5_bd_get_num_blocks(bd_srv_t *, aoff64_t *);
+
+static bd_ops_t hr_raid5_bd_ops = {
+	.open		= hr_raid5_bd_open,
+	.close		= hr_raid5_bd_close,
+	.sync_cache	= hr_raid5_bd_sync_cache,
+	.read_blocks	= hr_raid5_bd_read_blocks,
+	.write_blocks	= hr_raid5_bd_write_blocks,
+	.get_block_size	= hr_raid5_bd_get_block_size,
+	.get_num_blocks	= hr_raid5_bd_get_num_blocks
+};
+
 extern loc_srv_t *hr_srv;
-
-static errno_t hr_raid5_vol_usable(hr_volume_t *);
-static ssize_t hr_raid5_get_bad_ext(hr_volume_t *);
-static errno_t hr_raid5_update_vol_status(hr_volume_t *);
-static void hr_raid5_handle_extent_error(hr_volume_t *, size_t, errno_t);
-static void xor(void *, const void *, size_t);
-static errno_t hr_raid5_read_degraded(hr_volume_t *, uint64_t, uint64_t,
-    void *, size_t);
-static errno_t hr_raid5_write(hr_volume_t *, uint64_t, uint64_t, aoff64_t,
-    const void *, size_t);
-static errno_t hr_raid5_write_parity(hr_volume_t *, uint64_t, uint64_t,
-    uint64_t, const void *, size_t);
-static errno_t hr_raid5_bd_op(hr_bd_op_type_t, bd_srv_t *, aoff64_t, size_t,
-    void *, const void *, size_t);
-static errno_t hr_raid5_rebuild(void *);
-
-/* bdops */
-static errno_t hr_raid5_bd_open(bd_srvs_t *, bd_srv_t *);
-static errno_t hr_raid5_bd_close(bd_srv_t *);
-static errno_t hr_raid5_bd_read_blocks(bd_srv_t *, aoff64_t, size_t, void *,
-    size_t);
-static errno_t hr_raid5_bd_sync_cache(bd_srv_t *, aoff64_t, size_t);
-static errno_t hr_raid5_bd_write_blocks(bd_srv_t *, aoff64_t, size_t,
-    const void *, size_t);
-static errno_t hr_raid5_bd_get_block_size(bd_srv_t *, size_t *);
-static errno_t hr_raid5_bd_get_num_blocks(bd_srv_t *, aoff64_t *);
-
-static bd_ops_t hr_raid5_bd_ops = {
-	.open = hr_raid5_bd_open,
-	.close = hr_raid5_bd_close,
-	.sync_cache = hr_raid5_bd_sync_cache,
-	.read_blocks = hr_raid5_bd_read_blocks,
-	.write_blocks = hr_raid5_bd_write_blocks,
-	.get_block_size = hr_raid5_bd_get_block_size,
-	.get_num_blocks = hr_raid5_bd_get_num_blocks
-};
 
 errno_t hr_raid5_create(hr_volume_t *new_volume)
Index: uspace/srv/bd/hr/superblock.h
===================================================================
--- uspace/srv/bd/hr/superblock.h	(revision 746e636585e0d3bd3069437de2f444739c3aa1a7)
+++ uspace/srv/bd/hr/superblock.h	(revision 6d0fc1180b67061b8a08ad0dadb0ce418098023c)
@@ -63,6 +63,6 @@
 	uint64_t	data_offset;
 
-	uint64_t	counter;		/* yet unused */
-	uint32_t	version;		/* yet unused */
+	uint64_t	counter;		/* XXX: yet unused */
+	uint32_t	version;		/* XXX: yet unused */
 	uint32_t	extent_no;
 
Index: uspace/srv/bd/hr/util.c
===================================================================
--- uspace/srv/bd/hr/util.c	(revision 746e636585e0d3bd3069437de2f444739c3aa1a7)
+++ uspace/srv/bd/hr/util.c	(revision 6d0fc1180b67061b8a08ad0dadb0ce418098023c)
@@ -53,9 +53,30 @@
 #include "var.h"
 
+struct svc_id_linked;
+
+static bool	hr_range_lock_overlap(hr_range_lock_t *, hr_range_lock_t *);
+static errno_t	hr_add_svc_linked_to_list(list_t *, service_id_t, bool,
+    hr_metadata_t *);
+static void	free_svc_id_linked(struct svc_id_linked *);
+static void	free_svc_id_list(list_t *);
+static errno_t	hr_fill_disk_part_svcs_list(list_t *);
+static errno_t	block_init_dev_list(list_t *);
+static void	block_fini_dev_list(list_t *);
+static errno_t	hr_util_get_matching_md_svcs_list(list_t *, list_t *,
+    service_id_t, hr_metadata_t *);
+static errno_t	hr_util_assemble_from_matching_list(list_t *);
+static errno_t	hr_fill_svcs_list_from_cfg(hr_config_t *, list_t *);
+
 #define HR_RL_LIST_LOCK(vol) (fibril_mutex_lock(&vol->range_lock_list_lock))
 #define HR_RL_LIST_UNLOCK(vol) \
     (fibril_mutex_unlock(&vol->range_lock_list_lock))
 
-static bool hr_range_lock_overlap(hr_range_lock_t *, hr_range_lock_t *);
+struct svc_id_linked {
+	link_t		 link;
+	service_id_t	 svc_id;
+	hr_metadata_t	*md;
+	bool		 inited;
+	bool		 md_present;
+};
 
 extern loc_srv_t *hr_srv;
@@ -586,12 +607,4 @@
 }
 
-struct svc_id_linked {
-	link_t link;
-	service_id_t svc_id;
-	hr_metadata_t *md;
-	bool inited;
-	bool md_present;
-};
-
 static errno_t hr_add_svc_linked_to_list(list_t *list, service_id_t svc_id,
     bool inited, hr_metadata_t *md)
