Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 477986 - sys-kernel/gentoo-sources-3.10.2 sys-fs/btrfs-progs-0.20_rc1_p56 - BTRFS Send fails "send ioctl failed with -22: Invalid argument"
Summary: sys-kernel/gentoo-sources-3.10.2 sys-fs/btrfs-progs-0.20_rc1_p56 - BTRFS Send...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Mike Gilbert
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-24 09:33 UTC by Liam Dennehy
Modified: 2013-07-25 18:12 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Detailed log with commands (btrfs-send.log,2.26 KB, text/plain)
2013-07-24 09:36 UTC, Liam Dennehy
Details
strace output from btrfs send command (btrfs-send.strace,7.19 KB, text/plain)
2013-07-24 09:36 UTC, Liam Dennehy
Details
kernel config (config-3.10.2-gentoo,79.80 KB, text/plain)
2013-07-24 09:38 UTC, Liam Dennehy
Details
Obligatory emerge --info (emerge-info.txt,4.39 KB, text/plain)
2013-07-24 13:21 UTC, Liam Dennehy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Liam Dennehy 2013-07-24 09:33:45 UTC
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)
Comment 1 Liam Dennehy 2013-07-24 09:36:24 UTC
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.
Comment 2 Liam Dennehy 2013-07-24 09:36:44 UTC
Created attachment 354074 [details]
strace output from btrfs send command
Comment 3 Liam Dennehy 2013-07-24 09:38:49 UTC
Created attachment 354076 [details]
kernel config
Comment 4 Liam Dennehy 2013-07-24 13:16:43 UTC
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...
Comment 5 Liam Dennehy 2013-07-24 13:21:43 UTC
Created attachment 354096 [details]
Obligatory emerge --info
Comment 6 Mike Gilbert gentoo-dev 2013-07-24 14:00:51 UTC
Does it work properly with btrfs-progs-9999? If so, I will add a new snapshot to the tree.
Comment 7 Liam Dennehy 2013-07-24 19:06:37 UTC
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.
Comment 8 Liam Dennehy 2013-07-24 19:33:39 UTC
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. :)
Comment 9 Mike Gilbert gentoo-dev 2013-07-24 19:39:13 UTC
Assigning to myself then.
Comment 10 Mike Gilbert gentoo-dev 2013-07-25 02:08:21 UTC
+*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.
Comment 11 Liam Dennehy 2013-07-25 18:12:44 UTC
# 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!