I don't really like the xfs_inode_alloc_blocksize helper, given that it is very easy to be confused with the allocsize concept. I'd just add a helper ala: static bool xfs_falloc_is_unaligned( struct inode *inode, loff_t offset, loff_t len) { struct xfs_mount *mp = XFS_I(ip)->i_mount; unsigned int blksize_mask = i_blocksize(inode) - 1; if (XFS_IS_REALTIME_INODE(XFS_I(ip))) blksize_mask = XFS_FSB_TO_B(mp, mp->m_sb.sb_rextsize) - 1; return (offset & blksize_mask) || (len & blksize_mask); }