This is the simplest repro recipe for this that I have found so far.
It takes only a few minutes for the rm processes to get stuck here:
# cat /proc/28396/stack Thu May 7 18:13:05 2015
[<ffffffff813c8a2d>] lock_extent_bits+0x1ad/0x200
[<ffffffff813b5dfa>] btrfs_evict_inode+0x17a/0x5e0
[<ffffffff8123fc68>] evict+0xb8/0x1b0
[<ffffffff81240813>] iput+0x1f3/0x260
[<ffffffff81233c68>] do_unlinkat+0x1d8/0x360
[<ffffffff812346db>] SyS_unlinkat+0x1b/0x40
[<ffffffff8190024d>] system_call_fastpath+0x16/0x1b
[<ffffffffffffffff>] 0xffffffffffffffff
Run these three scripts in a directory that is the top of a subvol:
# Script #1: randomly create or delete snapshots
while sleep 1; do
if [ $[RANDOM%2] = 0 ]; then
btrfs sub snap . snaps-$RANDOM
else
for x in snaps-*; do
btrfs sub del $x
break
done
btrfs sub sync .
fi
done
# Script #2: create a bunch of files of random sizes
while true; do
d=$[RANDOM%9]/$[RANDOM%9]/$[RANDOM%9]/$[RANDOM%9]
mkdir -p ${d%/*}
head -c $[RANDOM%1024]k /usr/share/doc/chromium/copyright > $d
done
# Script #3: read and immediately delete all the files
while date; do
sleep 1
find -type f -exec cat {} \; -exec rm -fv {} \; > /dev/null
done
Attachment:
signature.asc
Description: Digital signature
