Re: [PATCH 1/2] xfs: don't truncate attribute extents if no extents exist

Christoph Hellwig
2015-06-19T15:14:23Z

> A '-p 2' fsstress run to ENOSPC on a relatively small fs (1GB)
> reproduces these problems.

Any chance to add this test case to xfstests?

> /* invalidate and truncate the attribute fork extents */
> - if (dp->i_d.di_aformat != XFS_DINODE_FMT_LOCAL) {
> + if (xfs_inode_hasattr(dp) &&
> + dp->i_d.di_aformat != XFS_DINODE_FMT_LOCAL) {

And please add a comment describing the condition here, especially
as xfs_inode_hasattr doesn't have a very descriptive name.