Bug 196903 - btrfs send fails with ioctl error 524
Summary: btrfs send fails with ioctl error 524
Status: RESOLVED CODE_FIX
Alias: None
Product: File System
Classification: Unclassified
Component: btrfs (show other bugs)
Hardware: Intel Linux
: P1 high
Assignee: Josef Bacik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-11 06:19 UTC by Alessandro Polverini
Modified: 2018-03-19 16:28 UTC (History)
1 user (show)

See Also:
Kernel Version: 4.12.0-0.bpo.1-amd64
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Alessandro Polverini 2017-09-11 06:19:13 UTC
I've a filesystem with daily snapshots that I send remotely using send/receive.

After an unexpected reboot of the server, even if a complete fsck and scrub are perfectly ok, I'm unable to send new snapshots because btrfs send stops with this error:

> ERROR: send ioctl failed with -524: Unknown error 524

the problem arise both sending a complete snapshot or using -p.

I'm using btrfs progs version 4.12.
Comment 1 Alessandro Polverini 2017-09-11 06:25:06 UTC
I forgot to add that the problem is in the "send" side, because it arises even if I send a snapshot to a file.
Comment 2 Alessandro Polverini 2017-09-11 06:38:32 UTC
# uname -a
Linux delta.lkj.it 4.12.0-0.bpo.1-amd64 #1 SMP Debian 4.12.6-1~bpo9+1 (2017-08-27) x86_64 GNU/Linux

# btrfs --version
btrfs-progs v4.12

#   btrfs fi show
Label: 'data'  uuid: 8fa895ff-f225-4854-8025-569f570cb5b8
        Total devices 1 FS bytes used 578.25GiB
        devid    1 size 1.12TiB used 1.04TiB path /dev/sda3

# btrfs fi df /mnt/data/
Data, single: total=1.01TiB, used=566.61GiB
System, DUP: total=8.00MiB, used=128.00KiB
Metadata, DUP: total=13.50GiB, used=11.64GiB
GlobalReserve, single: total=512.00MiB, used=0.00B
Comment 3 Alessandro Polverini 2017-09-11 06:59:04 UTC
I've compiled btrfs progs 4.13 from sources and I get the same error.
Comment 4 David Sterba 2017-09-11 16:47:55 UTC
Errno 524 is ENOTSUPP, although that should be EOPNOTSUPP.

This error appears when an unsupported type of inode is found, there should be a message in the log "unexpected inode type %o", please look it up and post back the number you see there.

I'll send a fix for the error code and update the error message.
Comment 5 David Sterba 2017-09-11 16:50:45 UTC
Looking to the code, I'm suspecting that's the type is of a block device, so the expected value is 060000.
Comment 6 Alessandro Polverini 2017-09-11 20:22:48 UTC
I've since then found the problem: a zero-byte file with permissions ?--------- that I had to remove by myself.

After having removed it I can now create and send snapshots again.
Comment 7 Alessandro Polverini 2017-09-11 20:24:32 UTC
I can confirm that in the log there was this warning:

> BTRFS warning (device sda3): unexpected inode type 0

Note You need to log in before you can comment on or make changes to this bug.