xfs: pass struct xfs_bmbt_irec to xfs_bmbt_validate_extent
This removed an unaligned load per extent, as well as the manual poking into the on-disk extent format. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
This commit is contained in:

committed by
Darrick J. Wong

parent
c38ccf5990
commit
dac9c9b137
@@ -122,9 +122,9 @@ extern struct xfs_btree_cur *xfs_bmbt_init_cursor(struct xfs_mount *,
|
||||
* Check that the extent does not contain an invalid unwritten extent flag.
|
||||
*/
|
||||
static inline bool xfs_bmbt_validate_extent(struct xfs_mount *mp, int whichfork,
|
||||
struct xfs_bmbt_rec *ep)
|
||||
struct xfs_bmbt_irec *irec)
|
||||
{
|
||||
if (get_unaligned_be64(&ep->l0) >> (64 - BMBT_EXNTFLAG_BITLEN) == 0)
|
||||
if (irec->br_state == XFS_EXT_NORM)
|
||||
return true;
|
||||
if (whichfork == XFS_DATA_FORK &&
|
||||
xfs_sb_version_hasextflgbit(&mp->m_sb))
|
||||
|
Reference in New Issue
Block a user