Message ID | 154630855701.14372.16042422623260751227.stgit@magnolia (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show |
Series | xfs: inode scrubber fixes | expand |
On Mon, Dec 31, 2018 at 06:09:17PM -0800, Darrick J. Wong wrote: > From: Darrick J. Wong <darrick.wong@oracle.com> > > The extended attribute scrubber should abort the "read all attrs" loop > if there's a fatal signal pending on the process. > > Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> > --- Reviewed-by: Brian Foster <bfoster@redhat.com> > fs/xfs/scrub/attr.c | 5 +++++ > 1 file changed, 5 insertions(+) > > > diff --git a/fs/xfs/scrub/attr.c b/fs/xfs/scrub/attr.c > index 81d5e90547a1..9960bc5b5d76 100644 > --- a/fs/xfs/scrub/attr.c > +++ b/fs/xfs/scrub/attr.c > @@ -82,6 +82,11 @@ xchk_xattr_listent( > > sx = container_of(context, struct xchk_xattr, context); > > + if (xchk_should_terminate(sx->sc, &error)) { > + context->seen_enough = 1; > + return; > + } > + > if (flags & XFS_ATTR_INCOMPLETE) { > /* Incomplete attr key, just mark the inode for preening. */ > xchk_ino_set_preen(sx->sc, context->dp->i_ino); >
diff --git a/fs/xfs/scrub/attr.c b/fs/xfs/scrub/attr.c index 81d5e90547a1..9960bc5b5d76 100644 --- a/fs/xfs/scrub/attr.c +++ b/fs/xfs/scrub/attr.c @@ -82,6 +82,11 @@ xchk_xattr_listent( sx = container_of(context, struct xchk_xattr, context); + if (xchk_should_terminate(sx->sc, &error)) { + context->seen_enough = 1; + return; + } + if (flags & XFS_ATTR_INCOMPLETE) { /* Incomplete attr key, just mark the inode for preening. */ xchk_ino_set_preen(sx->sc, context->dp->i_ino);