mirror of
https://github.com/torvalds/linux.git
synced 2024-12-25 04:11:49 +00:00
3241b1d3e0
The persistent-data library offers a re-usable framework for the storage and management of on-disk metadata in device-mapper targets. It's used by the thin-provisioning target in the next patch and in an upcoming hierarchical storage target. For further information, please read Documentation/device-mapper/persistent-data.txt Signed-off-by: Joe Thornber <thornber@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
20 lines
407 B
C
20 lines
407 B
C
/*
|
|
* 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 */
|