ext4-extents-search-routines patch
RFC 1/1 ext4-extents-search-routines patch
the couple routines to find closest allocated blocks to the left and to the right for given path.
thanks, Alex
include/linux/ext4_fs_extents.h +2 -0
@@ -193,6 +193,8 @@ extern int ext4_ext_calc_credits_for_insextern int ext4_ext_insert_extent (handle_t *,struct inode *,struct ext4_ext_path *,struct ext4_extent *);extern int ext4_ext_walk_space (struct inode *,unsigned long ,unsigned long ,ext_prepare_callback ,void *);extern struct ext4_ext_path *ext4_ext_find_extent (struct inode *,int ,struct ext4_ext_path *); +extern int ext4_ext_search_left (struct inode *,struct ext4_ext_path *,ext4_fsblk_t *,ext4_fsblk_t *); +extern int ext4_ext_search_right (struct inode *,struct ext4_ext_path *,ext4_fsblk_t *,ext4_fsblk_t *);#endif /* _LINUX_EXT4_EXTENTS */
fs/ext4/extents.c +142 -0
148 lines not on this page · raw message