On a new BTRFS volume, a read-only snapshot of a new volume fails to generate BTRFS SEND output. Pping to file, null or btrfs receive all results in the same error. Reproducible: Always Steps to Reproduce: 1. mkfs.btrfs /dev/vg1/btrfs-send; mount /dev/vg1/btrfs-send /mnt/btrfs-send 2. btrfs su cr /mnt/btrfs-send/subvol1; date > /mnt/btrfs-send/subvol1/date 3. btrfs su sn -r /mnt/btrfs-send/subvol1 /mnt/btrfs-send/subvol1-send 4. btrfs send /mnt/btrfs-send/subvol1-send >/dev/null Actual Results: At subvol /mnt/btrfs-send/subvol1-send ERROR: send ioctl failed with -22: Invalid argument Same result when using a pair of snapshots to produce a diff output. Expected Results: A blob or other output with the send for the subvolume seed. Latest gentoo-sources (~amd64) Latest btrfs-progs (~amd64)
Created attachment 354072 [details] Detailed log with commands System is LVM2 on luks, so first steps are showing stack from /dev/sdb to btrfs volume. Last steps are cleanup for a repoducible script.
Created attachment 354074 [details] strace output from btrfs send command
Created attachment 354076 [details] kernel config
Jeroen/wranglers, I appreciate btrfs is experimental but send/receive is a highly publicised feature. The three tasks I see it needing to complete for the feature to work are: 1. gather seed data for a subvolume snapshot 2. gather changes between snapshots 3. replay 1 + 2 to a target btrfs Step 1 is failing outright (wuthout even attempting to pipe to a receiver), which as far as the features go is a major problem. No data is lost, but a feature outright fails (as opposed to exhibiting quirks). Is Major rating not justified? Probably a cosmetic difference I appreciate...
Created attachment 354096 [details] Obligatory emerge --info
Does it work properly with btrfs-progs-9999? If so, I will add a new snapshot to the tree.
Reproducing on another machine, kver 3.9.9 and btrfs-progs-0.20_rc1_p56, issue occurs. Upgrading kernel to 3.10.2 to match this bug report and btrfs-progs to git - will advise.
Btrfs v0.20-rc1-358-g194aa4a from git: Send/Receive appears to be working! Very simple tests, but at least is not ejecting me immediately. Both seed and diff send/receive with single file changes work - all three steps I described earlier. :)
Assigning to myself then.
+*btrfs-progs-0.20_rc1_p358 (25 Jul 2013) + + 25 Jul 2013; Mike Gilbert <floppym@gentoo.org> + +btrfs-progs-0.20_rc1_p358.ebuild, btrfs-progs-9999.ebuild: + New snapshot.
# equery l btrfs-progs * Searching for btrfs-progs ... [IP-] [ ] sys-fs/btrfs-progs-0.20_rc1_p358:0 Ebuild works, send/receive functions as expected. Thanks all for the great response!