Re: [PATCH 09/10] xfs: validate feature support when recovering rmap/refcount/bmap intents

Christoph Hellwig
2020-12-01T10:08:13Z

On Mon, Nov 30, 2020 at 07:38:34PM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
>
> The bmap, rmap, and refcount log intent items were added to support the
> rmap and reflink features. Because these features come with changes to
> the ondisk format, the log items aren't tied to a log incompat flags.
>
> However, the log recovery routines don't actually check for those
> feature flags. The kernel has no business replayng an intent item for a
> feature that isn't enabled, so check that as part of recovered log item
> validation. (Note that kernels pre-dating rmap and reflink will fail
> the mount on the unknown log item type code.)
>
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>

Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>