Re: [PATCH] btrfs/280: run defrag after creating file to get expected extent layout

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



On Wed, Jun 05, 2024 at 12:26:20PM +0100, fdmanana@xxxxxxxxxx wrote:
> From: Filipe Manana <fdmanana@xxxxxxxx>
> 
> The test writes a 128M file and expects to end up with 1024 extents, each
> with a size of 128K, which is the maximum size for compressed extents.
> Generally this is what happens, but often it's possibly for writeback to
> kick in while creating the file (due to memory pressure, or something
> calling sync in parallel, etc) which may result in creating more and
> smaller extents, which makes the test fail since its golden output
> expects exactly 1024 extents with a size of 128K each.
> 
> So to work around run defrag after creating the file, which will ensure
> we get only 128K extents in the file.
> 
> Signed-off-by: Filipe Manana <fdmanana@xxxxxxxx>

Reviewed-by: David Sterba <dsterba@xxxxxxxx>




[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux