Package: btrfs-tools
Version: 3.12-1
Severity: important
Dear Maintainer,
I think I hit a bug when trying to receive incremental on a btrfs volume
mounted on a non-root default subvolume.
The following script reproduces it:
#!/bin/bash
mkdir bugtest
cd bugtest
for i in 1 2; do
mkdir -p mnt/$i
truncate -s 4G mnt/$i.img
mkfs.btrfs mnt/$i.img
mount -o loop mnt/$i.img mnt/$i
done
btrfs sub create mnt/1/subv
date > mnt/1/subv/fileA
btrfs sub snap -r mnt/1/subv mnt/1/subvROsnap1
date > mnt/1/subv/fileB
btrfs sub snap -r mnt/1/subv mnt/1/subvROsnap2
btrfs sub create mnt/2/def
defID=`btrfs sub list mnt/2 | grep def | awk '{print $2}'`
btrfs subvolume set-default $defID mnt/2/def/
umount mnt/2
mount -o loop mnt/2.img mnt/2
btrfs send mnt/1/subvROsnap1/ | btrfs receive mnt/2/
btrfs send -p mnt/1/subvROsnap1 mnt/1/subvROsnap2 | btrfs receive mnt/2/
---------
The last command fails. The full output is:
# ./test2.sh
WARNING! - Btrfs v3.12 IS EXPERIMENTAL
WARNING! - see http://btrfs.wiki.kernel.org before using
Turning ON incompat feature 'extref': increased hardlink limit per file to 65536
fs created label (null) on mnt/1.img
nodesize 16384 leafsize 16384 sectorsize 4096 size 4.00GiB
Btrfs v3.12
WARNING! - Btrfs v3.12 IS EXPERIMENTAL
WARNING! - see http://btrfs.wiki.kernel.org before using
Turning ON incompat feature 'extref': increased hardlink limit per file to 65536
fs created label (null) on mnt/2.img
nodesize 16384 leafsize 16384 sectorsize 4096 size 4.00GiB
Btrfs v3.12
Create subvolume 'mnt/1/subv'
Create a readonly snapshot of 'mnt/1/subv' in 'mnt/1/subvROsnap1'
Create a readonly snapshot of 'mnt/1/subv' in 'mnt/1/subvROsnap2'
Create subvolume 'mnt/2/def'
At subvol mnt/1/subvROsnap1/
At subvol subvROsnap1
At subvol mnt/1/subvROsnap2
At snapshot subvROsnap2
ERROR: open def/subvROsnap1 failed. No such file or directory
This does not happen if the receiving subvolume has not been mounted at a
non-root subvolume:
#!/bin/bash
mkdir bugtest
cd bugtest
for i in 1 2; do
mkdir -p mnt/$i
truncate -s 4G mnt/$i.img
mkfs.btrfs mnt/$i.img
mount -o loop mnt/$i.img mnt/$i
done
btrfs sub create mnt/1/subv
date > mnt/1/subv/fileA
btrfs sub snap -r mnt/1/subv mnt/1/subvROsnap1
date > mnt/1/subv/fileB
btrfs sub snap -r mnt/1/subv mnt/1/subvROsnap2
btrfs send mnt/1/subvROsnap1 | btrfs receive mnt/2
btrfs send -p mnt/1/subvROsnap1 mnt/1/subvROsnap2 | btrfs receive mnt/2
cd ..
umount bugtest/mnt/{1,2}
rm -rf bugtest/
-- System Information:
Debian Release: jessie/sid
APT prefers testing
APT policy: (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.13-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages btrfs-tools depends on:
ii e2fslibs 1.42.9-3
ii libblkid1 2.20.1-5.6
ii libc6 2.18-4
ii libcomerr2 1.42.9-3
ii liblzo2-2 2.06-1.2
ii libuuid1 2.20.1-5.6
ii zlib1g 1:1.2.8.dfsg-1
btrfs-tools recommends no packages.
btrfs-tools suggests no packages.
-- no debconf information
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]