FreeBSD/sys/fs/ext2fs/ext2_extents.c
/*
 * Find a block in ext4 extent cache.
 */
Find a block in ext4 extent cache.
Find a block in ext4 extent cache .
int
ext4_ext_in_cache(struct inode *ip, daddr_t lbn, struct ext4_extent *ep)
{
	struct ext4_extent_cache *ecp;
	int ret = EXT4_EXT_CACHE_NO;
	ecp = &ip->i_ext_cache;
	if (ecp->ec_type == EXT4_EXT_CACHE_NO)
		return (ret);
	if (lbn >= ecp->ec_blk && lbn < ecp->ec_blk + ecp->ec_len) {
		ep->e_blk = ecp->ec_blk;
		ep->e_start_lo = ecp->ec_start & 0xffffffff;
		ep->e_start_hi = ecp->ec_start >> 32 & 0xffff;
		ep->e_len = ecp->ec_len;
		ret = ecp->ec_type;
	}
	return (ret);
}
int ext4_ext_in_cache ( struct inode * ip , daddr_t lbn , struct ext4_extent * ep ) { struct ext4_extent_cache * ecp ; int ret = EXT4_EXT_CACHE_NO ; ecp = & ip -> i_ext_cache ; if ( ecp -> ec_type == EXT4_EXT_CACHE_NO ) return ( ret ) ; if ( lbn >= ecp -> ec_blk && lbn < ecp -> ec_blk + ecp -> ec_len ) { ep -> e_blk = ecp -> ec_blk ; ep -> e_start_lo = ecp -> ec_start & 0xffffffff ; ep -> e_start_hi = ecp -> ec_start >> 32 & 0xffff ; ep -> e_len = ecp -> ec_len ; ret = ecp -> ec_type ; } return ( ret ) ; }
Find a block in ext4 extent cache.
Find a block in ext4 extent cache .
/* cache is invalid */