On Wed, Mar 27, 2024 at 09:59:13AM -0700, Christoph Hellwig wrote: > On Tue, Mar 26, 2024 at 07:43:35PM -0700, Darrick J. Wong wrote: > > From: Darrick J. Wong <djwong@xxxxxxxxxx> > > > > XFS has this behavior in its reflink implementation where it returns > > ENOSPC if one of the AGs that would be involved in the sharing operation > > becomes more than 90% full. As Kent Overstreet points out, that means > > the snapshot creator shuts down when the filesystem is only about a > > third full. We could exercise the system harder by not *forcing* > > reflink, which will actually fill the filesystem full. > > All these tests are supposed to test the reflink code, how does > using cp --reflink=auto make sense for that? Hmm. Well my initial thought was that the snapshot could fall back to buffered copies of file1 so that we wouldn't abort the test well before actually filling up the filesystem. But you're right that my solution smells off -- we want to test reflink dealing with ENOSPC. Perhaps the right thing to do is to truncate and rewrite file1 after a _cp_reflink fails, so that the next time through the loop we'll be reflinking extents from a (probably less full) AG. Ok let's see how that does. --D