Re: [PATCH v4 20/20] ext4: Allow punch hole with bigalloc enabled
From: Tomas Racek
Date: Tue Jun 18 2013 - 08:34:40 EST
----- Original Message -----
> On Fri, 31 May 2013, Theodore Ts'o wrote:
> > Date: Fri, 31 May 2013 11:14:54 -0400
> > From: Theodore Ts'o <tytso@xxxxxxx>
> > To: Lukas Czerner <lczerner@xxxxxxxxxx>
> > Cc: linux-mm@xxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
> > linux-fsdevel@xxxxxxxxxxxxxxx, linux-ext4@xxxxxxxxxxxxxxx,
> > akpm@xxxxxxxxxxxxxxxxxxxx, hughd@xxxxxxxxxx
> > Subject: Re: [PATCH v4 20/20] ext4: Allow punch hole with bigalloc enabled
> > On Tue, May 14, 2013 at 06:37:34PM +0200, Lukas Czerner wrote:
> > > In commits 5f95d21fb6f2aaa52830e5b7fb405f6c71d3ab85 and
> > > 30bc2ec9598a1b156ad75217f2e7d4560efdeeab we've reworked punch_hole
> > > implementation and there is noting holding us back from using punch hole
> > > on file system with bigalloc feature enabled.
> > >
> > > This has been tested with fsx and xfstests.
> > >
> > > Signed-off-by: Lukas Czerner <lczerner@xxxxxxxxxx>
> > > Reviewed-by: Jan Kara <jack@xxxxxxx>
> > This patch is causing a test failure with bigalloc enabled with the
> > xfstests shared/298.
> > Since it's at the end of the invalidate page range tests, I'm going to
> > drop this patch for now. Could you take a look at this?
> > Thanks!!
> > - Ted
> Hi Ted,
> I should have really noticed this earlier. This test (shared/298)
> have nothing to do with bigalloc, nor punch hole. It tests file
> system discard implementation.
> The most likely reason it failed for you is that the tests does not
> count with bigalloc feature. However it seems to be working for me
> without any problems. Can you provide more information about the
> problem you've seen, or at least your xfstest configuration so we
> can see what went wrong and possibly fix the test ?
You are right, the test doesn't count with bigalloc. I was able to trigger the test failure by using MKFS_OPTIONS="-O bigalloc -C 8192"
If I understood it correctly, the dumpe2fs outputs free blocks even if bigalloc is used, that is only the first block of the cluster. I changed the test to count with whole cluster. Please try the following patch to the xfstests if it helps you. I tried different cluster sizes from 8192 to 65536 and it works for me.