0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef OCFS2_LOCALALLOC_H
0011 #define OCFS2_LOCALALLOC_H
0012
0013 int ocfs2_load_local_alloc(struct ocfs2_super *osb);
0014
0015 void ocfs2_shutdown_local_alloc(struct ocfs2_super *osb);
0016
0017 void ocfs2_la_set_sizes(struct ocfs2_super *osb, int requested_mb);
0018 unsigned int ocfs2_la_default_mb(struct ocfs2_super *osb);
0019
0020 int ocfs2_begin_local_alloc_recovery(struct ocfs2_super *osb,
0021 int node_num,
0022 struct ocfs2_dinode **alloc_copy);
0023
0024 int ocfs2_complete_local_alloc_recovery(struct ocfs2_super *osb,
0025 struct ocfs2_dinode *alloc);
0026
0027 int ocfs2_alloc_should_use_local(struct ocfs2_super *osb,
0028 u64 bits);
0029
0030 struct ocfs2_alloc_context;
0031 int ocfs2_reserve_local_alloc_bits(struct ocfs2_super *osb,
0032 u32 bits_wanted,
0033 struct ocfs2_alloc_context *ac);
0034
0035 int ocfs2_claim_local_alloc_bits(struct ocfs2_super *osb,
0036 handle_t *handle,
0037 struct ocfs2_alloc_context *ac,
0038 u32 bits_wanted,
0039 u32 *bit_off,
0040 u32 *num_bits);
0041
0042 int ocfs2_free_local_alloc_bits(struct ocfs2_super *osb,
0043 handle_t *handle,
0044 struct ocfs2_alloc_context *ac,
0045 u32 bit_off,
0046 u32 num_bits);
0047
0048 void ocfs2_local_alloc_seen_free_bits(struct ocfs2_super *osb,
0049 unsigned int num_clusters);
0050 void ocfs2_la_enable_worker(struct work_struct *work);
0051
0052 #endif