shithub: riscv

ref: f0f2d452c873255dec4b3359b3f93e349be0f2c5
dir: /sys/src/cmd/ext4srv/include/ext4_hash.h/

View raw version
#pragma once

#include "ext4_config.h"

struct ext4_hash_info {
	u32int hash;
	u32int minor_hash;
	u32int hash_version;
	const u32int *seed;
};

/**@brief   Directory entry name hash function.
 * @param   name entry name
 * @param   len entry name length
 * @param   hash_seed (from superblock)
 * @param   hash version (from superblock)
 * @param   hash_minor output value
 * @param   hash_major output value
 * @return  standard error code*/
int ext2_htree_hash(const char *name, int len, const u32int *hash_seed,
		    int hash_version, u32int *hash_major,
		    u32int *hash_minor);