badblocks_list bb_list = 0;
unsigned int journal_blocks;
unsigned int i;
- int val;
+ int val, hash_alg;
io_manager io_ptr;
char tdb_string[40];
+ char *hash_alg_str;
#ifdef ENABLE_NLS
setlocale(LC_MESSAGES, "");
/*
* Initialize the directory index variables
*/
- fs->super->s_def_hash_version = EXT2_HASH_HALF_MD4;
+ hash_alg_str = get_string_from_profile(fs_types, "hash_alg",
+ "half_md4");
+ hash_alg = e2p_string2hash(hash_alg_str);
+ fs->super->s_def_hash_version = (hash_alg >= 0) ? hash_alg :
+ EXT2_HASH_HALF_MD4;
uuid_generate((unsigned char *) fs->super->s_hash_seed);
/*
specify a blocksize on the command line, and the filesystem-type
specific section of the configuration file does not specify a blocksize.
.TP
+.I hash_alg
+This relation specifies the default hash algorithm used for the
+new filesystems with hashed b-tree directories. Valid algorithms
+accepted are:
+.IR legacy ,
+.IR half_md4 ,
+and
+.IR tea .
+.TP
.I inode_ratio
This relation specifies the default inode ratio if the user does not
specify one on the command line, and the filesystem-type
This relation specifies the default inode size if the user does not
specify one on the command line.
.TP
+.I hash_alg
+This relation specifies the default hash algorithm used for the
+new filesystems with hashed b-tree directories. Valid algorithms
+accepted are:
+.IR legacy ,
+.IR half_md4 ,
+and
+.IR tea .
+.TP
.I flex_bg_size
This relation specifies the number of block goups that will be packed
together to create one large virtual block group on an ext4 filesystem.