File: dm-persistent-data-internal.h

package info (click to toggle)
linux 6.16.10-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,724,644 kB
  • sloc: ansic: 26,563,350; asm: 271,335; sh: 144,039; python: 72,469; makefile: 57,135; perl: 36,821; xml: 19,553; cpp: 5,820; yacc: 4,915; lex: 2,955; awk: 1,667; sed: 28; ruby: 25
file content (20 lines) | stat: -rw-r--r-- 467 bytes parent folder | download | duplicates (19)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * 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 int dm_hash_block(dm_block_t b, unsigned int hash_mask)
{
	const unsigned int BIG_PRIME = 4294967291UL;

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

#endif	/* _PERSISTENT_DATA_INTERNAL_H */