From 722a5cfbf432bf9661628e4b3edc5f45bb4ed336 Mon Sep 17 00:00:00 2001 From: Arvin Schnell Date: Tue, 22 Jan 2019 12:17:51 +0100 Subject: [PATCH] - adapted to libbtrfs changes to resurrect special btrfs directory comparison (bsc#1111414) --- VERSION | 2 +- dists/debian/changelog | 6 ++++++ package/snapper.changes | 7 +++++++ snapper/Btrfs.cc | 13 +++++++++++-- 4 files changed, 25 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index 6f4eebdf..100435be 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.8.1 +0.8.2 diff --git a/dists/debian/changelog b/dists/debian/changelog index dd2a673b..d6356951 100644 --- a/dists/debian/changelog +++ b/dists/debian/changelog @@ -1,3 +1,9 @@ +snapper (0.8.2) stable; urgency=low + + * Updated to version 0.8.2 + + -- Arvin Schnell Tue, 22 Jan 2019 11:07:18 +0100 + snapper (0.8.1) stable; urgency=low * Updated to version 0.8.1 diff --git a/package/snapper.changes b/package/snapper.changes index a01e08ea..7d80dfbe 100644 --- a/package/snapper.changes +++ b/package/snapper.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Jan 22 11:05:01 CET 2019 - aschnell@suse.com + +- adapted to libbtrfs changes to resurrect special btrfs directory + comparison (bsc#1111414) +- version 0.8.2 + ------------------------------------------------------------------- Fri Jan 18 10:45:54 CET 2019 - aschnell@suse.com diff --git a/snapper/Btrfs.cc b/snapper/Btrfs.cc index e54cacf1..7bfcfb0d 100644 --- a/snapper/Btrfs.cc +++ b/snapper/Btrfs.cc @@ -1275,11 +1275,13 @@ namespace snapper { FdCloser fd_closer(fd); + unsigned int iterations = 0; + while (true) { boost::this_thread::interruption_point(); - // remove the fourth parameter for older versions of libbtrfs + // remove the fourth parameter for older versions of libbtrfs int r; #if BTRFS_LIB_VERSION < 101 @@ -1288,7 +1290,13 @@ namespace snapper r = btrfs_read_and_process_send_stream(fd, &send_ops, &*this, 0, 1); #endif - if (r < 0) + // Only return an error when r == -ENODATA if this was the + // first call to btrfs_read_and_process_send_stream(). See + // https://github.com/openSUSE/snapper/pull/438, + // https://bugzilla.suse.com/show_bug.cgi?id=1111414 and + // the btrfs-progs source code. + + if (r < 0 && !(r == -ENODATA && iterations > 0)) { y2err("btrfs_read_and_process_send_stream failed " << r); @@ -1308,6 +1316,7 @@ namespace snapper return true; } + ++iterations; } } -- 2.47.3