diff options
Diffstat (limited to 'fs/xfs/xfs_itable.c')
-rw-r--r-- | fs/xfs/xfs_itable.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/fs/xfs/xfs_itable.c b/fs/xfs/xfs_itable.c index efeeafe275b9..1edd9afb664b 100644 --- a/fs/xfs/xfs_itable.c +++ b/fs/xfs/xfs_itable.c | |||
@@ -290,8 +290,16 @@ xfs_bulkstat_use_dinode( | |||
290 | return 1; | 290 | return 1; |
291 | dip = (xfs_dinode_t *) | 291 | dip = (xfs_dinode_t *) |
292 | xfs_buf_offset(bp, clustidx << mp->m_sb.sb_inodelog); | 292 | xfs_buf_offset(bp, clustidx << mp->m_sb.sb_inodelog); |
293 | /* | ||
294 | * Check the buffer containing the on-disk inode for di_nlink == 0. | ||
295 | * This is to prevent xfs_bulkstat from picking up just reclaimed | ||
296 | * inodes that have their in-core state initialized but not flushed | ||
297 | * to disk yet. This is a temporary hack that would require a proper | ||
298 | * fix in the future. | ||
299 | */ | ||
293 | if (be16_to_cpu(dip->di_core.di_magic) != XFS_DINODE_MAGIC || | 300 | if (be16_to_cpu(dip->di_core.di_magic) != XFS_DINODE_MAGIC || |
294 | !XFS_DINODE_GOOD_VERSION(dip->di_core.di_version)) | 301 | !XFS_DINODE_GOOD_VERSION(dip->di_core.di_version) || |
302 | !dip->di_core.di_nlink) | ||
295 | return 0; | 303 | return 0; |
296 | if (flags & BULKSTAT_FG_QUICK) { | 304 | if (flags & BULKSTAT_FG_QUICK) { |
297 | *dipp = dip; | 305 | *dipp = dip; |