Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1060806 - snapper fails to compare btrfs snapshots using ioctl for sending diff streams
Summary: snapper fails to compare btrfs snapshots using ioctl for sending diff streams
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: snapper
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: ---
Assignee: Ondrej Kozina
QA Contact: Eryu Guan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-03 16:29 UTC by Ondrej Kozina
Modified: 2014-06-18 04:57 UTC (History)
7 users (show)

Fixed In Version: snapper-0.1.7-5.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 13:19:48 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Ondrej Kozina 2014-02-03 16:29:45 UTC
Description of problem:

snapper fails to use faster internal (kernel) btrfs compare routines (provided by libbtrfs).

you can see in snapper.log following info about falling back to byte-by-byte comparison:

napper(8841) Btrfs.cc(process):1096 - dir1:'/mnt/btrfs/.snapshots/7/snapshot' dir2:'/mnt/btrfs/.snapshots/8/
snapshot'
2014-02-03 14:07:26 ERR libsnapper(8841) Btrfs.cc(do_send):1041 - send ioctl failed errno:2 (No such file or directory)
2014-02-03 14:07:26 ERR libsnapper(8841) Btrfs.cc(cmpDirs):1139 - special btrfs cmpDirs failed, Btrfs send/receive error
2014-02-03 14:07:26 MIL libsnapper(8841) Btrfs.cc(cmpDirs):1140 - cmpDirs fallback
2014-02-03 14:07:26 MIL libsnapper(8841) Compare.cc(cmpDirs):439 - path1:/mnt/btrfs/.snapshots/7/snapshot path2:/mnt/btrfs/.snapshots/8/snapshot
2014-02-03 14:07:26 MIL libsnapper(8841) Compare.cc(cmpDirs):462 - dev1:47 dev2:48
2014-02-03 14:07:26 MIL libsnapper(8841) Compare.cc(cmpDirs):466 - stopwatch 0.000807s for comparing directories

Version-Release number of selected component (if applicable):
snapper-0.1.7-4.el7.x86_64
btrfs-progs-3.12-4.el7.x86_64

How reproducible:
always

Steps to Reproduce:
1. create and mount btrfs filesystem  (i.e. mount to /mnt/btrfs)
2. create snapper config (snapper -c btrfs create-config /mnt/btrfs)
3. create pre snapshot (snapper -c btrfs create -t pre -p)
4. modify /mnt/btrfs volume (i.e.: echo "Hello" > /mnt/btrfs/hello_file)
5. create post snapshot (snapper -c btrfs create -t post --pre-num <insert_output_number_from_step_4>)

Actual results:
See /var/log/snapper.log file for error message: "send ioctl failed errno:2 (No such file or directory)"

Expected results:
no such error message and comparison is created much faster and by the numbers

Comment 1 Ondrej Kozina 2014-02-03 16:32:20 UTC
Got fix upstream

Comment 5 Eryu Guan 2014-02-21 17:43:33 UTC
Verified with snapper-0.1.7-4.el7

[root@hp-dl388g8-01 ~]# snapper -c btrfs  create-config /mnt/btrfs
[root@hp-dl388g8-01 ~]# snapper -c btrfs create -t pre -p
1
[root@hp-dl388g8-01 ~]# echo "Hello" > /mnt/btrfs/hello_file
[root@hp-dl388g8-01 ~]# snapper -c btrfs create -t post --pre-num 1
[root@hp-dl388g8-01 ~]# cat /var/log/snapper.log
...
2014-02-22 01:38:24 MIL libsnapper(4285) Comparison.cc(Comparison):54 - num1:1 num2:2
2014-02-22 01:38:24 MIL libsnapper(4285) Comparison.cc(load):147 - num1:1 num2:2
2014-02-22 01:38:24 MIL libsnapper(4285) Comparison.cc(create):118 - num1:1 num2:2
2014-02-22 01:38:24 MIL libsnapper(4285) Btrfs.cc(cmpDirs):1125 - special btrfs cmpDirs
2014-02-22 01:38:24 MIL libsnapper(4285) Btrfs.cc(process):1096 - dir1:'/mnt/btrfs/.snapshots/1/snapshot' dir2:'/mnt/btrfs/.snapshots/2/snapshot'
2014-02-22 01:38:24 MIL libsnapper(4285) Btrfs.cc(cmpDirs):1137 - stopwatch 0.004093s for comparing directories
2014-02-22 01:38:24 MIL libsnapper(4285) Comparison.cc(create):140 - found 1 lines
2014-02-22 01:38:24 MIL libsnapper(4285) Comparison.cc(save):205 - num1:1 num2:2

Comment 6 Ludek Smid 2014-06-13 13:19:48 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


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