Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto reclaim fixes #41

Open
morbidrsa opened this issue May 7, 2021 · 0 comments
Open

Auto reclaim fixes #41

morbidrsa opened this issue May 7, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@morbidrsa
Copy link
Collaborator

David reported that auto-reclaim has problems:
Reporoducer:

#!/bin/sh -x                                                                                                                                                                                    
                                                                                                                                                                                                
dev=/dev/nullb0                                                                                                                                                                                 
umount mnt                                                                                                                                                                                      
blkzone report $dev                                                                                                                                                                             
blkzone reset $dev                                                                                                                                                                              
blkzone report $dev                                                                                                                                                                             
./mkfs.btrfs -L ZONED -f -d single -m single $dev                                                                                                                                               
blkzone report $dev                                                                                                                                                                             
                                                                                                                                                                                                
mount $dev mnt                                                                                                                                                                                  
                                                                                                                                                                                                
for i in `seq 10`; do                                                                                                                                                                           
        dd if=/dev/zero of=mnt/file$i bs=1M count=129 status=progress                                                                                                                           
        btrfs filesystem df mnt                                                                                                                                                                 
        df -h mnt                                                                                                                                                                               
        blkzone report $dev                                                                                                                                                                     
        btrfs filesystem sync mnt                                                                                                                                                               
done                                                                                                                                                                                            
                                                                                                                                                                                                
for i in `seq 1 2 10`; do                                                                                                                                                                       
        rm -f mnt/file$i                                                                                                                                                                        
done                                                                                                                                                                                            
sync                                                                                                                                                                                            
                                                                                                                                                                                                
btrfs filesystem df mnt                                                                                                                                                                         
df -h mnt                                                                                                                                                                                       
blkzone report $dev                                                                                                                                                                             
                                                                                                                                                                                                
echo "zones are probably full"                                                                                                                                                                  
for i in `seq 10`; do                                                                                                                                                                           
        rm -f mnt/file$i                                                                                                                                                                        
done                                                                                                                                                                                            
sync                                                                                                                                                                                            
                                                                                                                                                                                                
btrfs filesystem df mnt                                                                                                                                                                         
df -h mnt                                                                                                                                                                                       
blkzone report $dev                                                                                                                                                                             
                                                                                                                                                                                                
sync                                                                                                                                                                                            
ls -lR mnt                                                                                                                                                                                      
sleep 30                                                                                                                                                                                        
blkzone report $dev | grep fu                                                                                                                                                                   
                                                                                                                                                                                                
umount mnt
@morbidrsa morbidrsa added the bug Something isn't working label May 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant