Accepting request 247054 from home:dsterba:branches:filesystems
- workaround for send api breakage - Added patch: send-stream-api-wokaround.patch OBS-URL: https://build.opensuse.org/request/show/247054 OBS-URL: https://build.opensuse.org/package/show/filesystems/btrfsprogs?expand=0&rev=169
This commit is contained in:
parent
6ad0ff7ce9
commit
9d838c0f72
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Sep 1 14:07:53 CEST 2014 - dsterba@suse.cz
|
||||||
|
|
||||||
|
- workaround for send api breakage
|
||||||
|
- Added patch: send-stream-api-wokaround.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Aug 27 17:23:48 CEST 2014 - dsterba@suse.cz
|
Wed Aug 27 17:23:48 CEST 2014 - dsterba@suse.cz
|
||||||
|
|
||||||
|
@ -64,6 +64,8 @@ Patch171: 0171-btrfs-progs-make-free-space-checker-work-on-non-4k-s.patch
|
|||||||
|
|
||||||
Patch1000: local-version-override.patch
|
Patch1000: local-version-override.patch
|
||||||
Patch1001: library-version-defines.patch
|
Patch1001: library-version-defines.patch
|
||||||
|
Patch1002: send-stream-api-wokaround.patch
|
||||||
|
|
||||||
BuildRequires: asciidoc
|
BuildRequires: asciidoc
|
||||||
BuildRequires: libacl-devel
|
BuildRequires: libacl-devel
|
||||||
BuildRequires: libattr-devel
|
BuildRequires: libattr-devel
|
||||||
@ -132,6 +134,7 @@ build applications to interface with btrfs.
|
|||||||
%patch171 -p1
|
%patch171 -p1
|
||||||
%patch1000 -p1
|
%patch1000 -p1
|
||||||
%patch1001 -p1
|
%patch1001 -p1
|
||||||
|
%patch1002 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
make %{?_smp_mflags} CFLAGS="%{optflags}" all btrfs-convert \
|
make %{?_smp_mflags} CFLAGS="%{optflags}" all btrfs-convert \
|
||||||
|
55
send-stream-api-wokaround.patch
Normal file
55
send-stream-api-wokaround.patch
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
Index: btrfs-progs-v3.16/cmds-receive.c
|
||||||
|
===================================================================
|
||||||
|
--- btrfs-progs-v3.16.orig/cmds-receive.c
|
||||||
|
+++ btrfs-progs-v3.16/cmds-receive.c
|
||||||
|
@@ -877,7 +877,7 @@ static int do_receive(struct btrfs_recei
|
||||||
|
goto out;
|
||||||
|
|
||||||
|
while (!end) {
|
||||||
|
- ret = btrfs_read_and_process_send_stream(r_fd, &send_ops, r,
|
||||||
|
+ ret = btrfs_read_and_process_send_stream2(r_fd, &send_ops, r,
|
||||||
|
r->honor_end_cmd,
|
||||||
|
max_errors);
|
||||||
|
if (ret < 0)
|
||||||
|
Index: btrfs-progs-v3.16/send-stream.c
|
||||||
|
===================================================================
|
||||||
|
--- btrfs-progs-v3.16.orig/send-stream.c
|
||||||
|
+++ btrfs-progs-v3.16/send-stream.c
|
||||||
|
@@ -436,11 +436,21 @@ out:
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
+ * Temporary backward compatibility workaround
|
||||||
|
+ */
|
||||||
|
+int btrfs_read_and_process_send_stream(int fd,
|
||||||
|
+ struct btrfs_send_ops *ops, void *user,
|
||||||
|
+ int honor_end_cmd)
|
||||||
|
+{
|
||||||
|
+ return btrfs_read_and_process_send_stream2(fd, ops, user, honor_end_cmd, 1);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+/*
|
||||||
|
* If max_errors is 0, then don't stop processing the stream if one of the
|
||||||
|
* callbacks in btrfs_send_ops structure returns an error. If greater than
|
||||||
|
* zero, stop after max_errors errors happened.
|
||||||
|
*/
|
||||||
|
-int btrfs_read_and_process_send_stream(int fd,
|
||||||
|
+int btrfs_read_and_process_send_stream2(int fd,
|
||||||
|
struct btrfs_send_ops *ops, void *user,
|
||||||
|
int honor_end_cmd,
|
||||||
|
u64 max_errors)
|
||||||
|
Index: btrfs-progs-v3.16/send-stream.h
|
||||||
|
===================================================================
|
||||||
|
--- btrfs-progs-v3.16.orig/send-stream.h
|
||||||
|
+++ btrfs-progs-v3.16/send-stream.h
|
||||||
|
@@ -58,6 +58,10 @@ struct btrfs_send_ops {
|
||||||
|
|
||||||
|
int btrfs_read_and_process_send_stream(int fd,
|
||||||
|
struct btrfs_send_ops *ops, void *user,
|
||||||
|
+ int honor_end_cmd);
|
||||||
|
+/* Temporary API */
|
||||||
|
+int btrfs_read_and_process_send_stream2(int fd,
|
||||||
|
+ struct btrfs_send_ops *ops, void *user,
|
||||||
|
int honor_end_cmd,
|
||||||
|
u64 max_errors);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user