aboutsummaryrefslogtreecommitdiff
path: root/fs/xfs/scrub
diff options
context:
space:
mode:
authorGravatar Christoph Hellwig <hch@lst.de> 2020-05-18 10:27:22 -0700
committerGravatar Darrick J. Wong <darrick.wong@oracle.com> 2020-05-19 09:40:58 -0700
commitdaf83964a3681cf1f1f255ad6095c0b60cba7dca (patch)
treee87b88a211f431fa758d6cbb4d6bbc56f4dde533 /fs/xfs/scrub
parentxfs: remove xfs_ifree_local_data (diff)
downloadlinux-daf83964a3681cf1f1f255ad6095c0b60cba7dca.tar.gz
linux-daf83964a3681cf1f1f255ad6095c0b60cba7dca.tar.bz2
linux-daf83964a3681cf1f1f255ad6095c0b60cba7dca.zip
xfs: move the per-fork nextents fields into struct xfs_ifork
There are there are three extents counters per inode, one for each of the forks. Two are in the legacy icdinode and one is directly in struct xfs_inode. Switch to a single counter in the xfs_ifork structure where it uses up padding at the end of the structure. This simplifies various bits of code that just wants the number of extents counter and can now directly dereference it. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Chandan Babu R <chandanrlinux@gmail.com> Reviewed-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/scrub')
-rw-r--r--fs/xfs/scrub/bmap.c3
-rw-r--r--fs/xfs/scrub/parent.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/fs/xfs/scrub/bmap.c b/fs/xfs/scrub/bmap.c
index 93d5b8a9d7f7..162912c5080a 100644
--- a/fs/xfs/scrub/bmap.c
+++ b/fs/xfs/scrub/bmap.c
@@ -566,6 +566,7 @@ xchk_bmap_check_rmaps(
struct xfs_scrub *sc,
int whichfork)
{
+ struct xfs_ifork *ifp = XFS_IFORK_PTR(sc->ip, whichfork);
xfs_agnumber_t agno;
bool zero_size;
int error;
@@ -594,7 +595,7 @@ xchk_bmap_check_rmaps(
zero_size = false;
if (XFS_IFORK_FORMAT(sc->ip, whichfork) != XFS_DINODE_FMT_BTREE &&
- (zero_size || XFS_IFORK_NEXTENTS(sc->ip, whichfork) > 0))
+ (zero_size || ifp->if_nextents > 0))
return 0;
for (agno = 0; agno < sc->mp->m_sb.sb_agcount; agno++) {
diff --git a/fs/xfs/scrub/parent.c b/fs/xfs/scrub/parent.c
index 5705adc43a75..855aa8bcab64 100644
--- a/fs/xfs/scrub/parent.c
+++ b/fs/xfs/scrub/parent.c
@@ -90,7 +90,7 @@ xchk_parent_count_parent_dentries(
* if there is one.
*/
lock_mode = xfs_ilock_data_map_shared(parent);
- if (parent->i_d.di_nextents > 0)
+ if (parent->i_df.if_nextents > 0)
error = xfs_dir3_data_readahead(parent, 0, 0);
xfs_iunlock(parent, lock_mode);
if (error)