Re: [PATCH 11/43] xfs: skip always_cow inodes in xfs_reflink_trim_around_shared

Christoph Hellwig
2024-12-13T05:12:44Z

On Thu, Dec 12, 2024 at 01:38:57PM -0800, Darrick J. Wong wrote:
> On Wed, Dec 11, 2024 at 09:54:36AM +0100, Christoph Hellwig wrote:
> > xfs_reflink_trim_around_shared tries to find shared blocks in the
> > refcount btree. Always_cow inodes don't have that tree, so don't
> > bother.
> >
> > Signed-off-by: Christoph Hellwig <hch@lst.de>
>
> Is this a bug fix?

For the existing always_cow code it is a minor optimization. For
the zoned code that can do COW without the rtreflink code it avoids
triggering a NULL pointer dereference.