On Wed, Oct 09, 2013 at 11:53:23PM +0800, Eryu Guan wrote:
> Hi all,
> 
> I hit a BUG_ON while playing with btrfs balance. Kernel is
> 3.12-rc4.
> 
> The reproducer is a script doing subvolume create/mount/umount/delete
> in loop at back ground and do balance at the same time.
> 
> It's reproducable everytime. And seems like this is a regression, I
> cannot reproduce it on 3.10 kernel. (I'll write a test case for
> xfstests.)
> 
> Reproducer:
> 
> # cat test.sh
> #!/bin/bash
> 
> btrfs_dev=$1
> btrfs_mnt=$2
> pid=$$
> subvol_mnt=/mnt/subvol_$pid
> 
> mkdir -p $subvol_mnt
> 
> trap "umount $subvol_mnt; btrfs sub del $btrfs_mnt/sub_$pid; rmdir 
> $subvol_mnt; exit 0" 0 1 2 3 15
> 
> while true;do
>         btrfs subvolume create $btrfs_mnt/sub_$pid
>         mount -o subvol=sub_$pid $btrfs_dev $subvol_mnt
>         umount $subvol_mnt
>         btrfs subvolume delete $btrfs_mnt/sub_$pid
> done
> 
> and do
> 
> # mkfs -t btrfs -f /dev/loop0 /dev/loop1
> # mount /dev/loop0 /mnt/btrfs
> # ./test.sh /dev/loop0 /mnt/btrfs >/dev/null &
> # btrfs fi balance /mnt/btrfs
> 

Fixed by Miao's patches in btrfs-next.  Thanks,

Josef
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to