mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 09:19:51 +00:00
![Joe Thornber](/assets/img/avatar_default.png)
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>
19 lines
407 B
C
19 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 */
|