aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ext4_fs_extents.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/ext4_fs_extents.h')
-rw-r--r--include/linux/ext4_fs_extents.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/ext4_fs_extents.h b/include/linux/ext4_fs_extents.h
index acfe59740b03..e3d5afc6f23e 100644
--- a/include/linux/ext4_fs_extents.h
+++ b/include/linux/ext4_fs_extents.h
@@ -188,6 +188,21 @@ ext4_ext_invalidate_cache(struct inode *inode)
188 EXT4_I(inode)->i_cached_extent.ec_type = EXT4_EXT_CACHE_NO; 188 EXT4_I(inode)->i_cached_extent.ec_type = EXT4_EXT_CACHE_NO;
189} 189}
190 190
191static inline void ext4_ext_mark_uninitialized(struct ext4_extent *ext)
192{
193 ext->ee_len |= cpu_to_le16(0x8000);
194}
195
196static inline int ext4_ext_is_uninitialized(struct ext4_extent *ext)
197{
198 return (int)(le16_to_cpu((ext)->ee_len) & 0x8000);
199}
200
201static inline int ext4_ext_get_actual_len(struct ext4_extent *ext)
202{
203 return (int)(le16_to_cpu((ext)->ee_len) & 0x7FFF);
204}
205
191extern int ext4_extent_tree_init(handle_t *, struct inode *); 206extern int ext4_extent_tree_init(handle_t *, struct inode *);
192extern int ext4_ext_calc_credits_for_insert(struct inode *, struct ext4_ext_path *); 207extern int ext4_ext_calc_credits_for_insert(struct inode *, struct ext4_ext_path *);
193extern unsigned int ext4_ext_check_overlap(struct inode *, struct ext4_extent *, struct ext4_ext_path *); 208extern unsigned int ext4_ext_check_overlap(struct inode *, struct ext4_extent *, struct ext4_ext_path *);