Bugzilla – Bug 1216914
[btrfs] Warning message in syslog during sending snapshot (/fs/btrfs/send.c:7400 btrfs_ioctl_send)
Last modified: 2023-11-06 16:41:56 UTC
Created attachment 870653 [details] Archive with log and script to reproduce the bug OS: SUSE Linux Enterprise Server 15 sp5 (sp4 is also affected) CPU: amd_x64 Hdd with root btrfs. Bug description: I'm trying to make a series of backups of a btrfs root subvolume. There is a warning message in syslog from "btrfs send" process. This message appears when sending difference between parent and child snapshots. It happens starting from the third and the following snapshots. How to Reproduce: I'll prepare a simple script to reproduce the bug. 1. Prepare the host with two HDD sda with root fs sdb mounted to /mnt for the backups sda 8:0 0 20G 0 disk ├─sda1 8:1 0 8M 0 part ├─sda2 8:2 0 18.6G 0 part /var │ /home │ /boot/grub2/i386-pc │ /tmp │ /root │ /usr/local │ /srv │ /opt │ /boot/grub2/x86_64-efi │ /.snapshots │ / └─sda3 8:3 0 1.4G 0 part [SWAP] sdb 8:16 0 30G 0 disk /mnt 2. Run the script 3. You will see the warning in /var/log/messages 2023-11-06T18:28:43.156068+01:00 localhost kernel: [13781.549694][ T3171] WARNING: CPU: 2 PID: 3171 at ../fs/btrfs/send.c:7400 btrfs_ioctl_send+0x26e/0x1760 [btrfs] Additional info: The warning message is related to deleting the directory in which the snapshot was created. I'll mark this step in the script. If I don't delete this directory, the warning doesn't appear.
Warning message is generated here ../fs/btrfs/send.c long btrfs_ioctl_send(struct inode *inode, struct btrfs_ioctl_send_args *arg) .... WARN_ON(sctx && !ret && !RB_EMPTY_ROOT(&sctx->orphan_dirs));