* Return true if the extent is a real, allocated extent, or false if it is a
* delayed allocation, and unwritten extent or a hole.
*/
-static inline bool xfs_bmap_is_real_extent(struct xfs_bmbt_irec *irec)
+static inline bool xfs_bmap_is_written_extent(struct xfs_bmbt_irec *irec)
{
return irec->br_state != XFS_EXT_UNWRITTEN &&
irec->br_startblock != HOLESTARTBLOCK &&
if (error)
return error;
- if (nmap == 0 || !xfs_bmap_is_real_extent(&map)) {
+ if (nmap == 0 || !xfs_bmap_is_written_extent(&map)) {
XFS_ERROR_REPORT(__func__, XFS_ERRLEVEL_LOW, mp);
return -EFSCORRUPTED;
}
int error = 0;
/* Holes, unwritten, and delalloc extents cannot be shared */
- if (!xfs_is_cow_inode(ip) || !xfs_bmap_is_real_extent(irec)) {
+ if (!xfs_is_cow_inode(ip) || !xfs_bmap_is_written_extent(irec)) {
*shared = false;
return 0;
}
* preallocations can leak into the range we are called upon, and we
* need to skip them.
*/
- if (!xfs_bmap_is_real_extent(&got)) {
+ if (!xfs_bmap_is_written_extent(&got)) {
*end_fsb = del.br_startoff;
goto out_cancel;
}
xfs_off_t new_isize)
{
struct xfs_mount *mp = ip->i_mount;
- bool real_extent = xfs_bmap_is_real_extent(irec);
+ bool real_extent = xfs_bmap_is_written_extent(irec);
struct xfs_trans *tp;
unsigned int resblks;
struct xfs_bmbt_irec uirec;
goto out;
if (nmaps == 0)
break;
- if (!xfs_bmap_is_real_extent(&map[0]))
+ if (!xfs_bmap_is_written_extent(&map[0]))
goto next;
map[1] = map[0];