https://github.com/torvalds/linux
Raw File
Tip revision: c7788792a5e7b0d5d7f96d0766b4cb6112d47d75 authored by Linus Torvalds on 20 May 2013, 21:37:38 UTC
Linux 3.10-rc2
Tip revision: c778879
dm-persistent-data-internal.h
/*
 * Copyright (C) 2011 Red Hat, Inc.
 *
 * This file is released under the GPL.
 */

#ifndef _DM_PERSISTENT_DATA_INTERNAL_H
#define _DM_PERSISTENT_DATA_INTERNAL_H

#include "dm-block-manager.h"

static inline unsigned dm_hash_block(dm_block_t b, unsigned hash_mask)
{
	const unsigned BIG_PRIME = 4294967291UL;

	return (((unsigned) b) * BIG_PRIME) & hash_mask;
}

#endif	/* _PERSISTENT_DATA_INTERNAL_H */
back to top