Gentoo Archives: gentoo-commits

From: Alexys Jacob <ultrabug@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-cluster/glusterfs/files/, sys-cluster/glusterfs/
Date: Sun, 09 Feb 2020 16:32:36
Message-Id: 1581265914.2a677e4cdb886a25f62f26059c4247b96c7545a4.ultrabug@gentoo
1 commit: 2a677e4cdb886a25f62f26059c4247b96c7545a4
2 Author: Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
3 AuthorDate: Mon Jan 27 06:54:03 2020 +0000
4 Commit: Alexys Jacob <ultrabug <AT> gentoo <DOT> org>
5 CommitDate: Sun Feb 9 16:31:54 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2a677e4c
7
8 sys-cluster/glusterfs: fix seek
9
10 Bug: https://bugs.gentoo.org/705536
11 Package-Manager: Portage-2.3.85, Repoman-2.3.20
12 Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
13 Closes: https://github.com/gentoo/gentoo/pull/14468
14 Signed-off-by: Alexys Jacob <ultrabug <AT> gentoo.org>
15
16 .../glusterfs/files/glusterfs-6.7-fix-seek.patch | 45 ++++++++++++++++++++++
17 ...lusterfs-6.7.ebuild => glusterfs-6.7-r1.ebuild} | 4 ++
18 ...lusterfs-7.2.ebuild => glusterfs-7.2-r1.ebuild} | 4 ++
19 3 files changed, 53 insertions(+)
20
21 diff --git a/sys-cluster/glusterfs/files/glusterfs-6.7-fix-seek.patch b/sys-cluster/glusterfs/files/glusterfs-6.7-fix-seek.patch
22 new file mode 100644
23 index 00000000000..07d1ecef037
24 --- /dev/null
25 +++ b/sys-cluster/glusterfs/files/glusterfs-6.7-fix-seek.patch
26 @@ -0,0 +1,45 @@
27 +diff --git a/xlators/performance/open-behind/src/open-behind.c b/xlators/performance/open-behind/src/open-behind.c
28 +index 70a144abb5..95e00dbd79 100644
29 +--- a/xlators/performance/open-behind/src/open-behind.c
30 ++++ b/xlators/performance/open-behind/src/open-behind.c
31 +@@ -708,6 +708,32 @@ ob_fstat(call_frame_t *frame, xlator_t *this, fd_t *fd, dict_t *xdata)
32 + return 0;
33 + }
34 +
35 ++int
36 ++ob_seek(call_frame_t *frame, xlator_t *this, fd_t *fd, off_t offset,
37 ++ gf_seek_what_t what, dict_t *xdata)
38 ++{
39 ++ call_stub_t *stub = NULL;
40 ++ fd_t *wind_fd = NULL;
41 ++
42 ++ wind_fd = ob_get_wind_fd(this, fd, NULL);
43 ++
44 ++ stub = fop_seek_stub(frame, default_seek_resume, wind_fd, offset, what,
45 ++ xdata);
46 ++
47 ++ fd_unref(wind_fd);
48 ++
49 ++ if (!stub)
50 ++ goto err;
51 ++
52 ++ open_and_resume(this, wind_fd, stub);
53 ++
54 ++ return 0;
55 ++err:
56 ++ STACK_UNWIND_STRICT(fstat, frame, -1, ENOMEM, 0, 0);
57 ++
58 ++ return 0;
59 ++}
60 ++
61 + int
62 + ob_flush(call_frame_t *frame, xlator_t *this, fd_t *fd, dict_t *xdata)
63 + {
64 +@@ -1256,6 +1282,7 @@ struct xlator_fops fops = {
65 + .flush = ob_flush,
66 + .fsync = ob_fsync,
67 + .fstat = ob_fstat,
68 ++ .seek = ob_seek,
69 + .ftruncate = ob_ftruncate,
70 + .fsetxattr = ob_fsetxattr,
71 + .setxattr = ob_setxattr,
72
73 diff --git a/sys-cluster/glusterfs/glusterfs-6.7.ebuild b/sys-cluster/glusterfs/glusterfs-6.7-r1.ebuild
74 similarity index 97%
75 rename from sys-cluster/glusterfs/glusterfs-6.7.ebuild
76 rename to sys-cluster/glusterfs/glusterfs-6.7-r1.ebuild
77 index 9bb5a61620b..d36a647109c 100644
78 --- a/sys-cluster/glusterfs/glusterfs-6.7.ebuild
79 +++ b/sys-cluster/glusterfs/glusterfs-6.7-r1.ebuild
80 @@ -83,6 +83,10 @@ src_prepare() {
81 # https://bugzilla.redhat.com/show_bug.cgi?id=1786983
82 eapply "${FILESDIR}/glusterfs-6.7-fix-rebalance-crash.patch"
83
84 + # https://bugs.gentoo.org/705536
85 + # https://bugzilla.redhat.com/show_bug.cgi?id=1793990
86 + eapply "${FILESDIR}/glusterfs-6.7-fix-seek.patch"
87 +
88 # build rpc-transport and xlators only once as shared libs
89 find rpc/rpc-transport xlators -name Makefile.am |
90 xargs sed -i 's|.*$(top_srcdir).*\.sym|\0 -shared|' || die
91
92 diff --git a/sys-cluster/glusterfs/glusterfs-7.2.ebuild b/sys-cluster/glusterfs/glusterfs-7.2-r1.ebuild
93 similarity index 97%
94 rename from sys-cluster/glusterfs/glusterfs-7.2.ebuild
95 rename to sys-cluster/glusterfs/glusterfs-7.2-r1.ebuild
96 index 27be5d5543a..d122e64c226 100644
97 --- a/sys-cluster/glusterfs/glusterfs-7.2.ebuild
98 +++ b/sys-cluster/glusterfs/glusterfs-7.2-r1.ebuild
99 @@ -80,6 +80,10 @@ pkg_setup() {
100 src_prepare() {
101 default
102
103 + # https://bugs.gentoo.org/705536
104 + # https://bugzilla.redhat.com/show_bug.cgi?id=1793990
105 + eapply "${FILESDIR}/glusterfs-6.7-fix-seek.patch"
106 +
107 # build rpc-transport and xlators only once as shared libs
108 find rpc/rpc-transport xlators -name Makefile.am |
109 xargs sed -i 's|.*$(top_srcdir).*\.sym|\0 -shared|' || die