]> git.karo-electronics.de Git - linux-beck.git/commit
xfs: ignore leaf attr ichdr.count in verifier during log replay
authorEric Sandeen <sandeen@redhat.com>
Mon, 9 Jan 2017 15:38:58 +0000 (16:38 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Jan 2017 10:39:44 +0000 (11:39 +0100)
commit3c382dda47e4b51de6d67847ddfc9c10962c4ca3
tree069ef59a0aadb11c67efe700d50fa1b97ba3b993
parentc00203386d50c1d2f2621163b9d7a533de4819fc
xfs: ignore leaf attr ichdr.count in verifier during log replay

commit 2e1d23370e75d7d89350d41b4ab58c7f6a0e26b2 upstream.

When we create a new attribute, we first create a shortform
attribute, and try to fit the new attribute into it.
If that fails, we copy the (empty) attribute into a leaf attribute,
and do the copy again.  Thus there can be a transient state where
we have an empty leaf attribute.

If we encounter this during log replay, the verifier will fail.
So add a test to ignore this part of the leaf attr verification
during log replay.

Thanks as usual to dchinner for spotting the problem.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/xfs/libxfs/xfs_attr_leaf.c