Only try to scan the extended attributes of a file if bstat says that
the file actually has any. Surprisingly, this reduces the phase 5
runtime by 40% if most of the files don't have attrs.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
background_sleep();
/* Warn about naming problems in xattrs. */
- moveon = xfs_scrub_scan_fhandle_xattrs(ctx, descr, handle, bstat);
- if (!moveon)
- goto out;
+ if (bstat->bs_xflags & FS_XFLAG_HASATTR) {
+ moveon = xfs_scrub_scan_fhandle_xattrs(ctx, descr, handle,
+ bstat);
+ if (!moveon)
+ goto out;
+ }
/* Open the dir, let the kernel try to reconnect it to the root. */
if (S_ISDIR(bstat->bs_mode)) {