diff options
Diffstat (limited to 'fs/ocfs2/extent_map.h')
-rw-r--r-- | fs/ocfs2/extent_map.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/fs/ocfs2/extent_map.h b/fs/ocfs2/extent_map.h index 1c4aa8b06f34..b7dd9731b462 100644 --- a/fs/ocfs2/extent_map.h +++ b/fs/ocfs2/extent_map.h | |||
@@ -57,4 +57,28 @@ int ocfs2_xattr_get_clusters(struct inode *inode, u32 v_cluster, | |||
57 | u32 *p_cluster, u32 *num_clusters, | 57 | u32 *p_cluster, u32 *num_clusters, |
58 | struct ocfs2_extent_list *el); | 58 | struct ocfs2_extent_list *el); |
59 | 59 | ||
60 | int ocfs2_read_virt_blocks(struct inode *inode, u64 v_block, int nr, | ||
61 | struct buffer_head *bhs[], int flags, | ||
62 | int (*validate)(struct super_block *sb, | ||
63 | struct buffer_head *bh)); | ||
64 | static inline int ocfs2_read_virt_block(struct inode *inode, u64 v_block, | ||
65 | struct buffer_head **bh, | ||
66 | int (*validate)(struct super_block *sb, | ||
67 | struct buffer_head *bh)) | ||
68 | { | ||
69 | int status = 0; | ||
70 | |||
71 | if (bh == NULL) { | ||
72 | printk("ocfs2: bh == NULL\n"); | ||
73 | status = -EINVAL; | ||
74 | goto bail; | ||
75 | } | ||
76 | |||
77 | status = ocfs2_read_virt_blocks(inode, v_block, 1, bh, 0, validate); | ||
78 | |||
79 | bail: | ||
80 | return status; | ||
81 | } | ||
82 | |||
83 | |||
60 | #endif /* _EXTENT_MAP_H */ | 84 | #endif /* _EXTENT_MAP_H */ |