Bug 66941 - Btrfs file content missmatch incrementally sending subvolumes containing systemd journal files
Summary: Btrfs file content missmatch incrementally sending subvolumes containing syst...
Status: RESOLVED OBSOLETE
Alias: None
Product: File System
Classification: Unclassified
Component: btrfs (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Josef Bacik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-13 14:04 UTC by Emil Karlson
Modified: 2022-10-03 13:21 UTC (History)
3 users (show)

See Also:
Kernel Version: 3.12.4
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Emil Karlson 2013-12-13 14:04:22 UTC
After subvolume send on btrfs the sent subvolume journal files have different contents than the original subvolume journal files.

sha1sum {/snapshots/snapshot-2013-12-12T07.35.51N0007ff-sent,/mnt/snapshots/schur/root/snapshot-2013-12-12T07.35.51N0007ff}/var/log/journal/121d803e5e9a59f16ec21af30000000f/system@a5590d66040b4e6d98a8f07894937ab9-0000000000000001-0004e4523d76b700.journal
11b4a92dd4d72ef003e675a2a89afae4d337b46b  /snapshots/snapshot-2013-12-12T07.35.51N0007ff-sent/var/log/journal/121d803e5e9a59f16ec21af30000000f/system@a5590d66040b4e6d98a8f07894937ab9-0000000000000001-0004e4523d76b700.journal
7eff13a4934c5353bf9a988943d148636f818fdc  /mnt/snapshots/schur/root/snapshot-2013-12-12T07.35.51N0007ff/var/log/journal/121d803e5e9a59f16ec21af30000000f/system@a5590d66040b4e6d98a8f07894937ab9-0000000000000001-0004e4523d76b700.journal
Comment 1 Emil Karlson 2013-12-13 18:32:12 UTC
Apparently the send needs to be incremental probably with some actual changes in journal files.
Comment 2 David Sterba 2013-12-18 15:00:07 UTC
Journal files can be preallocated, this is not supported in current send stream format or code. Will be addressed in v2.
Comment 3 Emil Karlson 2013-12-20 10:51:35 UTC
I think it was stated that file content semantics should be still honoured by sending 0-filled writes if I can recall correctly.
Comment 4 Josef Bacik 2014-01-06 15:59:04 UTC
Yeah even tho we don't send the prealloc stuff across we will be sending 0's which means the sha's _should_ match.  So the fact that they are not is a problem so it's definitely a bug.  I'll try and figure out what is going on.
Comment 5 Emil Karlson 2014-01-07 14:42:14 UTC
Just to note, I have also this issue with other files:
jkarlson/.config/chromium/Default/Archived History
jkarlson/.local/share/Trash/files/wheezy-x86_64.img
jkarlson/.local/share/evolution/addressbook/system/log.0000000001
jkarlson/.local/storage/vm-images/wheezy-x86_32.img
jkarlson/.local/storage/vm-images/wheezy-x86_64.img
jkarlson/.local/storage/vm-images/windows-2008-server.img

Everything has full CoW and autodefrag unless applications are doing something for me. There is also hourly snapshotting, which may hinder autodefrag.

qemu-kvm access mode is if=virtio,cache=unsafe,aio=native, all images are created using truncate, holepunch has been applied sometimes using fstrim/loop though probably is not necessary condition for this 

.local/share/evolution/addressbook/system/log.0000000001: Berkeley DB (Log, version 16, native byte-order)

.config/chromium/Default/Archived History: SQLite 3.x database
Comment 6 Emil Karlson 2014-01-07 14:46:12 UTC
#60673 also mentions firefox/chromium explicitly, so it may be related in the scope of sqlite3.
Comment 7 Emil Karlson 2014-01-30 08:54:20 UTC
I guess this could be put to needinfo or fixed, as I need to reproduce this again and then check with https://git.kernel.org/cgit/linux/kernel/git/josef/btrfs-next.git/commit/?id=6b4843d59fde1893d2aac38cab32fa5cfc6179c8
Comment 8 Emil Karlson 2014-01-31 19:57:42 UTC
Discussed this on the IRC with fdmanana and the fix is not relevant to this problem. Also I am able to reproduce again.
Comment 9 David Sterba 2022-10-03 13:21:17 UTC
This is a semi-automated bugzilla cleanup, report is against an old kernel version. If the problem still happens, please open a new bug. Thanks.

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