Skip to contentSkip to conversation

Regression in v5.14-rc1: f2165627319f btrfs: compression: don't try to compress if we don't have enough pages

DISCUSSION Zygo Blaxell 2 participants 4 messages Aug 22, 2021 – Aug 26, 2021 Btrfs file system

lore
Share & tools
lore
#0 lore raw

Before this commit:

	# head /dev/zero -c 4095 > inline
	# compsize inline
	Type       Perc     Disk Usage   Uncompressed Referenced  
	TOTAL        0%       18B         3.9K         3.9K       
	zstd         0%       18B         3.9K         3.9K       

After this commit:

	# head /dev/zero -c 4095 > inline                                                                        
	# compsize inline                                                                                        
	Processed 1 file, 1 regular extents (1 refs), 0 inline.                                                                                      
	Type       Perc     Disk Usage   Uncompressed Referenced                                                                                     
	TOTAL      100%      4.0K         4.0K         4.0K                                                                                          
	none       100%      4.0K         4.0K         4.0K                                                                                          

This change makes the metadata sizes of trees of small files (e.g. source checkouts) blow up.

It looks like we need to look at the offset of the extent, as well as its length.

#1 lore raw

On Sun, Aug 22, 2021 at 01:51:15AM -0400, Zygo Blaxell wrote:

I trimmed my cut+paste too eagerly...

Quoted 4 lines

Before this commit:

	# head /dev/zero -c 4095 > inline
	# compsize inline

Processed 1 file, 0 regular extents (0 refs), 1 inline.

Quoted 18 lines

Type Perc Disk Usage Uncompressed Referenced
TOTAL 0% 18B 3.9K 3.9K
zstd 0% 18B 3.9K 3.9K

After this commit:

	# head /dev/zero -c 4095 > inline                                                                        
	# compsize inline                                                                                        
	Processed 1 file, 1 regular extents (1 refs), 0 inline.                                                                                      
	Type       Perc     Disk Usage   Uncompressed Referenced                                                                                     
	TOTAL      100%      4.0K         4.0K         4.0K                                                                                          
	none       100%      4.0K         4.0K         4.0K                                                                                          

This change makes the metadata sizes of trees of small files (e.g. source checkouts) blow up.

It looks like we need to look at the offset of the extent, as well as its length.

#2 lore raw
In reply to Zygo Blaxell
Quoted 17 lines · Zygo Blaxell

Before this commit:

	# head /dev/zero -c 4095 > inline
	# compsize inline
	Type       Perc     Disk Usage   Uncompressed Referenced  
	TOTAL        0%       18B         3.9K         3.9K       
	zstd         0%       18B         3.9K         3.9K       

After this commit:

	# head /dev/zero -c 4095 > inline                                                                        
	# compsize inline                                                                                        
	Processed 1 file, 1 regular extents (1 refs), 0 inline.                                                                                      
	Type       Perc     Disk Usage   Uncompressed Referenced                                                                                     
	TOTAL      100%      4.0K         4.0K         4.0K                                                                                          
	none       100%      4.0K         4.0K         4.0K                                                                                          
Quoted 5 lines

This change makes the metadata sizes of trees of small files (e.g. source checkouts) blow up.

It looks like we need to look at the offset of the extent, as well as its length.

Thanks for the report, my bad, I'll look into it.

#3 lore raw
Quoted 18 lines · David Sterba
Quoted 17 lines · Zygo Blaxell

Before this commit:

	# head /dev/zero -c 4095 > inline
	# compsize inline
	Type       Perc     Disk Usage   Uncompressed Referenced  
	TOTAL        0%       18B         3.9K         3.9K       
	zstd         0%       18B         3.9K         3.9K       

After this commit:

	# head /dev/zero -c 4095 > inline                                                                        
	# compsize inline                                                                                        
	Processed 1 file, 1 regular extents (1 refs), 0 inline.                                                                                      
	Type       Perc     Disk Usage   Uncompressed Referenced                                                                                     
	TOTAL      100%      4.0K         4.0K         4.0K                                                                                          
	none       100%      4.0K         4.0K         4.0K                                                                                          
Quoted 7 lines
Quoted 5 lines

This change makes the metadata sizes of trees of small files (e.g. source checkouts) blow up.

It looks like we need to look at the offset of the extent, as well as its length.

Thanks for the report, my bad, I'll look into it.

The patch has been reverted in Linus' tree so it'll be in 5.14 final and will be in the upcoming stable updates according to their release schedule.