From da99898c78a5c580ef1cb54fdcbd66cb7d48d429 Mon Sep 17 00:00:00 2001 From: Chris Mason Date: Thu, 15 Mar 2007 12:56:47 -0400 Subject: Use a chunk of the key flags to record the item type. Add (untested and simple) directory item code Fix comp_keys to use the new key ordering Add btrfs_insert_empty_item --- hasher.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 hasher.c (limited to 'hasher.c') diff --git a/hasher.c b/hasher.c new file mode 100644 index 00000000..96702da4 --- /dev/null +++ b/hasher.c @@ -0,0 +1,23 @@ +#include +#include +#include +#include "kerncompat.h" +#include "hash.h" + +int main() { + u64 result; + int ret; + char line[255]; + char *p; + while(1) { + p = fgets(line, 255, stdin); + if (!p) + break; + if (strlen(line) == 0) + continue; + ret = btrfs_name_hash(line, strlen(line), &result); + BUG_ON(ret); + printf("hash returns %Lu\n", result); + } + return 0; +} -- cgit v1.2.3