shithub: riscv

ref: 1b09060f468f530af2f4ef75441a40084e912e54
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);