shuangy
|
1.1.2.1
|
1
|
|
|
2
|
|
|
3
|
|
|
4
|
|
|
5
|
|
|
6
|
|
|
7
|
#ifndef __DIST_DIR_UTILS_H
|
|
8
|
#define __DIST_DIR_UTILS_H
|
|
9
|
|
|
10
|
#include "pvfs2-types.h"
|
|
11
|
|
|
12
|
|
|
13
|
|
|
14
|
|
|
15
|
|
|
16
|
|
|
17
|
|
|
18
|
|
|
19
|
|
|
20
|
|
|
21
|
|
|
22
|
|
|
23
|
|
|
24
|
|
|
25
|
|
|
26
|
|
|
27
|
#define SET_BIT(i_bitfield, bitnum) \
|
shuangy
|
1.1.2.2
|
28
|
do { i_bitfield[(bitnum) >> 5] |= (1 << ((bitnum) & 0x1f));} while (0)
|
shuangy
|
1.1.2.1
|
29
|
|
|
30
|
#define CRL_BIT(i_bitfield, bitnum) \
|
shuangy
|
1.1.2.2
|
31
|
do { i_bitfield[(bitnum) >> 5] &= ~(1 << ((bitnum) & 0x1f));} while (0)
|
shuangy
|
1.1.2.1
|
32
|
|
|
33
|
#define TST_BIT(i_bitfield, bitnum) \
|
shuangy
|
1.1.2.2
|
34
|
( i_bitfield[(bitnum) >> 5] & (1 << ((bitnum) & 0x1f)) )
|
shuangy
|
1.1.2.1
|
35
|
|
|
36
|
|
|
37
|
|
|
38
|
#define PVFS_DIST_DIR_MAX_ENTRIES 16000
|
|
39
|
|
shuangy
|
1.1.2.2
|
40
|
|
|
41
|
#define PVFS_DIST_DIR_DEFAULT_TOTAL_DIRDATA_NUM 4
|
|
42
|
#define PVFS_DIST_DIR_DEFAULT_INITIAL_DIRDATA_NUM 4
|
|
43
|
|
shuangy
|
1.1.2.1
|
44
|
|
|
45
|
static double my_log2(const double n);
|
|
46
|
static int dist_dir_calc_branch_level(
|
shuangy
|
1.1.2.2
|
47
|
const PVFS_dist_dir_attr *dist_dir_attr,
|
|
48
|
const PVFS_dist_dir_bitmap bitmap);
|
shuangy
|
1.1.2.1
|
49
|
int PINT_init_dist_dir_state(
|
shuangy
|
1.1.2.2
|
50
|
PVFS_dist_dir_attr *dist_dir_attr,
|
|
51
|
PVFS_dist_dir_bitmap *bitmap_ptr,
|
|
52
|
const int num_servers,
|
|
53
|
const int server_no,
|
|
54
|
const int pre_dsg_num_server);
|
shuangy
|
1.1.2.1
|
55
|
int PINT_find_dist_dir_bucket(
|
shuangy
|
1.1.2.2
|
56
|
const PVFS_dist_dir_hash_type hash,
|
|
57
|
const PVFS_dist_dir_attr *const dist_dir_attr,
|
|
58
|
const PVFS_dist_dir_bitmap bitmap);
|
shuangy
|
1.1.2.1
|
59
|
int PINT_find_dist_dir_split_node(
|
shuangy
|
1.1.2.2
|
60
|
const PVFS_dist_dir_attr *const dist_dir_attr,
|
|
61
|
const PVFS_dist_dir_bitmap bitmap);
|
shuangy
|
1.1.2.1
|
62
|
int PINT_update_dist_dir_bitmap_from_bitmap(
|
shuangy
|
1.1.2.2
|
63
|
PVFS_dist_dir_attr *to_dir_attr,
|
|
64
|
PVFS_dist_dir_bitmap to_dir_bitmap,
|
|
65
|
const PVFS_dist_dir_attr *from_dir_attr,
|
|
66
|
const PVFS_dist_dir_bitmap from_dir_bitmap);
|
shuangy
|
1.1.2.1
|
67
|
PVFS_dist_dir_hash_type PINT_encrypt_dirdata(const char *const name);
|
|
68
|
|
|
69
|
|
|
70
|
|
|
71
|
|
|
72
|
#endif /* __DIST_DIR_UTILS_H */
|
|
73
|
|
|
74
|
|
|
75
|
|
|
76
|
|
|
77
|
|
|
78
|
|
|
79
|
|
|
80
|
|
|
81
|
|