https://github.com/torvalds/linux
Raw File
Tip revision: 19c329f6808995b142b3966301f217c831e7cf31 authored by Linus Torvalds on 18 January 2021, 00:37:05 UTC
Linux 5.11-rc4
Tip revision: 19c329f
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