aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/extent_map.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ocfs2/extent_map.h')
-rw-r--r--fs/ocfs2/extent_map.h39
1 files changed, 23 insertions, 16 deletions
diff --git a/fs/ocfs2/extent_map.h b/fs/ocfs2/extent_map.h
index fa3745efa886..de91e3e41a22 100644
--- a/fs/ocfs2/extent_map.h
+++ b/fs/ocfs2/extent_map.h
@@ -25,22 +25,29 @@
25#ifndef _EXTENT_MAP_H 25#ifndef _EXTENT_MAP_H
26#define _EXTENT_MAP_H 26#define _EXTENT_MAP_H
27 27
28int init_ocfs2_extent_maps(void); 28struct ocfs2_extent_map_item {
29void exit_ocfs2_extent_maps(void); 29 unsigned int ei_cpos;
30 unsigned int ei_phys;
31 unsigned int ei_clusters;
32 unsigned int ei_flags;
30 33
31/* 34 struct list_head ei_list;
32 * EVERY CALL here except _init, _trunc, and _drop expects alloc_sem 35};
33 * to be held. The allocation cannot change at all while the map is 36
34 * in the process of being updated. 37#define OCFS2_MAX_EXTENT_MAP_ITEMS 3
35 */ 38struct ocfs2_extent_map {
36int ocfs2_extent_map_init(struct inode *inode); 39 unsigned int em_num_items;
37int ocfs2_extent_map_append(struct inode *inode, 40 struct list_head em_list;
38 struct ocfs2_extent_rec *rec, 41};
39 u32 new_clusters); 42
40int ocfs2_extent_map_get_blocks(struct inode *inode, 43void ocfs2_extent_map_init(struct inode *inode);
41 u64 v_blkno, int count, 44void ocfs2_extent_map_trunc(struct inode *inode, unsigned int cluster);
42 u64 *p_blkno, int *ret_count); 45void ocfs2_extent_map_insert_rec(struct inode *inode,
43int ocfs2_extent_map_drop(struct inode *inode, u32 new_clusters); 46 struct ocfs2_extent_rec *rec);
44int ocfs2_extent_map_trunc(struct inode *inode, u32 new_clusters); 47
48int ocfs2_get_clusters(struct inode *inode, u32 v_cluster, u32 *p_cluster,
49 u32 *num_clusters, unsigned int *extent_flags);
50int ocfs2_extent_map_get_blocks(struct inode *inode, u64 v_blkno, u64 *p_blkno,
51 u64 *ret_count, unsigned int *extent_flags);
45 52
46#endif /* _EXTENT_MAP_H */ 53#endif /* _EXTENT_MAP_H */