https://github.com/torvalds/linux
Raw File
Tip revision: 39da7c509acff13fc8cb12ec1bb20337c988ed36 authored by Linus Torvalds on 09 April 2017, 16:49:44 UTC
Linux 4.11-rc6
Tip revision: 39da7c5
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