Bug 600247

Summary: umount btrfs take long time after doing online add/remove device and even may cause kernel panic
Product: Red Hat Enterprise Linux 6 Reporter: Eryu Guan <eguan>
Component: kernelAssignee: Josef Bacik <jbacik>
Status: CLOSED DUPLICATE QA Contact: Red Hat Kernel QE team <kernel-qe>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0CC: esandeen
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-07-22 15:13:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 584197    
Attachments:
Description Flags
panic log on kernel 2.6.32-27.el6 none

Description Eryu Guan 2010-06-04 09:32:17 UTC
Created attachment 421174 [details]
panic log on kernel 2.6.32-27.el6

Description of problem:
After doing online add/remove device test on btrfs, umount btrfs partition takes long time to finish (about 3 minute), and even may cause kernel panic.

There is no useful log when umount btrfs.
I have only panic log on kernel 2.6.32-27

Version-Release number of selected component (if applicable):
Kernel 2.6.32-33.el6.x86_64
btrfs-progs-0.19-10.el6.x86_64

How reproducible:
umount takes long time: 100%
kernel panic: less than 10%

Steps to Reproduce:
mkdir -p /mnt/btrfs
dd if=/dev/null of=/home/img0 bs=1G seek=5
dd if=/dev/null of=/home/img1 bs=1G seek=3
dd if=/dev/null of=/home/img2 bs=1G seek=2
dd if=/dev/null of=/home/img3 bs=1G seek=1
for i in 0 1 2 3;do losetup /dev/loop$i /home/img$i;done

# Create a filesystem across three drives
mkfs.btrfs /dev/loop0 /dev/loop1 /dev/loop2
mkfs.btrfs /dev/loop3
btrfs-show
mount /dev/loop0 /mnt/btrfs
cp -a /etc /mnt/btrfs
cat /mnt/btrfs/etc/fstab
# Add a device
btrfs-vol -a /dev/loop3 /mnt/btrfs
btrfs-show
cat /mnt/btrfs/etc/fstab
# Remove a device
btrfs-vol -r /dev/loop1 /mnt/btrfs
btrfsck /dev/loop0
btrfs-show
cat /mnt/btrfs/etc/fstab

# Clean up
umount /mnt/btrfs
  
Actual results:
umount takes about 3min to finish

Expected results:
umount returns within a reasonable time

Additional info:

Comment 2 RHEL Program Management 2010-06-07 16:20:46 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 3 Josef Bacik 2010-06-08 14:47:15 UTC
Going to need to see the panic, but its likely because of ENOSPC.  I'm going to backport the latest BTRFS stuff so that should fix this problem.

Comment 4 Eryu Guan 2010-07-09 09:34:28 UTC
This is fixed in -44 kernel, umount goes smoothly

Comment 5 RHEL Program Management 2010-07-15 15:08:53 UTC
This issue has been proposed when we are only considering blocker
issues in the current Red Hat Enterprise Linux release. It has
been denied for the current Red Hat Enterprise Linux release.

** If you would still like this issue considered for the current
release, ask your support representative to file as a blocker on
your behalf. Otherwise ask that it be considered for the next
Red Hat Enterprise Linux release. **

Comment 7 Josef Bacik 2010-07-22 15:13:18 UTC

*** This bug has been marked as a duplicate of bug 593834 ***