Index: uspace/lib/ext4/include/ext4/cfg.h
===================================================================
--- uspace/lib/ext4/include/ext4/cfg.h	(revision b209135fccd9282dabef632255a0a7e0b536ab6c)
+++ uspace/lib/ext4/include/ext4/cfg.h	(revision 6ba36a06a45504c616f4b873b65b26d271265a90)
@@ -34,4 +34,6 @@
 #define LIBEXT4_CFG_H_
 
+#include "types.h"
+
 /** Versions available to choose from when creating a new file system. */
 typedef enum {
@@ -45,4 +47,12 @@
 #define ext4_def_fs_version extver_ext2
 
+/** Configuration of a new ext4 file system */
+typedef struct {
+	/** File system version */
+	ext4_cfg_ver_t version;
+	/** Volume name encoded as UTF-8 string */
+	const char *volume_name;
+} ext4_cfg_t;
+
 #endif
 
Index: uspace/lib/ext4/include/ext4/filesystem.h
===================================================================
--- uspace/lib/ext4/include/ext4/filesystem.h	(revision b209135fccd9282dabef632255a0a7e0b536ab6c)
+++ uspace/lib/ext4/include/ext4/filesystem.h	(revision 6ba36a06a45504c616f4b873b65b26d271265a90)
@@ -42,5 +42,5 @@
 
 extern errno_t ext4_filesystem_probe(service_id_t, ext4_fs_probe_info_t *);
-extern errno_t ext4_filesystem_create(ext4_cfg_ver_t, service_id_t);
+extern errno_t ext4_filesystem_create(ext4_cfg_t *, service_id_t);
 extern errno_t ext4_filesystem_open(ext4_instance_t *, service_id_t,
     enum cache_mode, aoff64_t *, ext4_filesystem_t **);
Index: uspace/lib/ext4/include/ext4/superblock.h
===================================================================
--- uspace/lib/ext4/include/ext4/superblock.h	(revision b209135fccd9282dabef632255a0a7e0b536ab6c)
+++ uspace/lib/ext4/include/ext4/superblock.h	(revision 6ba36a06a45504c616f4b873b65b26d271265a90)
@@ -120,5 +120,5 @@
 extern errno_t ext4_superblock_get_volume_name(ext4_superblock_t *, char *,
     size_t);
-extern void ext4_superblock_set_volume_name(ext4_superblock_t *, const char *);
+extern errno_t ext4_superblock_set_volume_name(ext4_superblock_t *, const char *);
 extern const char *ext4_superblock_get_last_mounted(ext4_superblock_t *);
 extern void ext4_superblock_set_last_mounted(ext4_superblock_t *, const char *);
@@ -166,5 +166,5 @@
 extern uint32_t ext4_superblock_get_inodes_in_group(ext4_superblock_t *,
     uint32_t);
-extern errno_t ext4_superblock_create(size_t, uint64_t, ext4_cfg_ver_t,
+extern errno_t ext4_superblock_create(size_t, uint64_t, ext4_cfg_t *,
     ext4_superblock_t **);
 extern uint32_t ext4_superblock_get_group_backup_blocks(ext4_superblock_t *,
Index: uspace/lib/ext4/include/ext4/types.h
===================================================================
--- uspace/lib/ext4/include/ext4/types.h	(revision b209135fccd9282dabef632255a0a7e0b536ab6c)
+++ uspace/lib/ext4/include/ext4/types.h	(revision 6ba36a06a45504c616f4b873b65b26d271265a90)
@@ -235,9 +235,11 @@
 } ext4_filesystem_t;
 
+/** Size of buffer for volume name. To hold 16 latin-1 chars encoded as UTF-8
+ * and a null terminator we need 2 * 16 + 1 bytes
+ */
+#define EXT4_VOL_NAME_BYTES 33
+
 typedef struct {
-	/** Volume name, to hold 16 latin-1 chars in UTF-8 and null terminator
-	 * we need 2 * 16 + 1 bytes
-	 */
-	char vol_name[33];
+	char vol_name[EXT4_VOL_NAME_BYTES];
 } ext4_fs_probe_info_t;
 
Index: uspace/lib/ext4/src/filesystem.c
===================================================================
--- uspace/lib/ext4/src/filesystem.c	(revision b209135fccd9282dabef632255a0a7e0b536ab6c)
+++ uspace/lib/ext4/src/filesystem.c	(revision 6ba36a06a45504c616f4b873b65b26d271265a90)
@@ -249,8 +249,8 @@
 /** Create new filesystem.
  *
- * @param ver Filesystem version
- * @param service_id Block device where to create new filesystem
- */
-errno_t ext4_filesystem_create(ext4_cfg_ver_t ver, service_id_t service_id)
+ * @param cfg Configuration of new file system
+ * @param service_id Block device where to create new file system
+ */
+errno_t ext4_filesystem_create(ext4_cfg_t *cfg, service_id_t service_id)
 {
 	errno_t rc;
@@ -282,5 +282,5 @@
 
 	/* Create superblock */
-	rc = ext4_superblock_create(dev_bsize, dev_nblocks, ver, &superblock);
+	rc = ext4_superblock_create(dev_bsize, dev_nblocks, cfg, &superblock);
 	if (rc != EOK)
 		goto err;
Index: uspace/lib/ext4/src/superblock.c
===================================================================
--- uspace/lib/ext4/src/superblock.c	(revision b209135fccd9282dabef632255a0a7e0b536ab6c)
+++ uspace/lib/ext4/src/superblock.c	(revision 6ba36a06a45504c616f4b873b65b26d271265a90)
@@ -912,8 +912,28 @@
  * @param sb   Superblock
  * @param name New name of the volume
- */
-void ext4_superblock_set_volume_name(ext4_superblock_t *sb, const char *name)
-{
-	memcpy(sb->volume_name, name, sizeof(sb->volume_name));
+ * @return EOK on success or error code
+ */
+errno_t ext4_superblock_set_volume_name(ext4_superblock_t *sb, const char *name)
+{
+	size_t off;
+	wchar_t ch;
+	size_t wi;
+
+	off = 0;
+	wi = 0;
+	while (wi < sizeof(sb->volume_name)) {
+		ch = str_decode(name, &off, STR_NO_LIMIT);
+		if (ch == 0)
+			break;
+		if (ch > 255)
+			return EINVAL;
+
+		sb->volume_name[wi++] = ch;
+	}
+
+	while (wi < sizeof(sb->volume_name))
+		sb->volume_name[wi++] = '\0';
+
+	return EOK;
 }
 
@@ -1475,10 +1495,10 @@
  * @param dev_bsize Device block size
  * @param dev_bcnt Device number of blocks
- * @param ver Filesystem version
+ * @param cfg Configuration of new file system
  * @param rsb Place to store pointer to newly allocated superblock
  * @return EOK on success or error code
  */
 errno_t ext4_superblock_create(size_t dev_bsize, uint64_t dev_bcnt,
-    ext4_cfg_ver_t ver, ext4_superblock_t **rsb)
+    ext4_cfg_t *cfg, ext4_superblock_t **rsb)
 {
 	ext4_superblock_t *sb;
@@ -1579,5 +1599,5 @@
 	ext4_superblock_set_check_interval(sb, 0);
 	ext4_superblock_set_creator_os(sb, EXT4_SUPERBLOCK_OS_LINUX);
-	if (ver >= extver_ext2)
+	if (cfg->version >= extver_ext2)
 		ext4_superblock_set_rev_level(sb, EXT4_DYNAMIC_REV);
 	else
@@ -1586,5 +1606,5 @@
 	ext4_superblock_set_def_resgid(sb, 0);
 
-	if (ver >= extver_ext2) {
+	if (cfg->version >= extver_ext2) {
 		/* Dynamic rev */
 		ext4_superblock_set_first_inode(sb, EXT4_REV0_FIRST_INO);
@@ -1596,6 +1616,9 @@
 
 		ext4_superblock_set_uuid(sb, &uuid);
-		/* 16-byte Latin-1 string padded with null characters */
-		ext4_superblock_set_volume_name(sb, "HelenOS-Ext4\0\0\0\0");
+
+		rc = ext4_superblock_set_volume_name(sb, cfg->volume_name);
+		if (rc != EOK)
+			goto error;
+
 		/* 64-byte Latin-1 string padded with null characters */
 		ext4_superblock_set_last_mounted(sb,
