Hello community, here is the log from the commit of package drbd.15138 for openSUSE:Leap:15.2:Update checked in at 2020-11-29 06:25:30 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Leap:15.2:Update/drbd.15138 (Old) and /work/SRC/openSUSE:Leap:15.2:Update/.drbd.15138.new.5913 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "drbd.15138" Sun Nov 29 06:25:30 2020 rev:1 rq:850830 version:9.0.22~1+git.fe2b5983 Changes: -------- New Changes file: --- /dev/null 2020-11-18 17:46:03.679371574 +0100 +++ /work/SRC/openSUSE:Leap:15.2:Update/.drbd.15138.new.5913/drbd.changes 2020-11-29 06:25:31.075340975 +0100 @@ -0,0 +1,1894 @@ +------------------------------------------------------------------- +Tue Nov 3 11:21:13 UTC 2020 - nick wang <nw...@suse.com> + +- bsc#1178388, build error with -Wreturn-type + Add patch fix-err-of-wrong-return-type.patch + +------------------------------------------------------------------- +Tue Mar 10 09:03:04 UTC 2020 - nick wang <nw...@suse.com> + +- bsc#1166298, Update to drbd-9.0.22-1 + * introduce locking to avoid connection retries when UUIDs or + relevant flags change during the exchange of this data + * improve serialization of events after loosing a primary + * fix a constraint in sanitize state that can caused a promote to be + deliced by some other node + * fix a case of a false positive detection of a split brain condition + * allow a resync target to switch to the resync source with less + bits out of sync + * fix bitmap UUID after resync to use current UUID from self rather + than sync source + * fix pushing bitmap UUID into history when changed + * fix regression introduced with 9.0.20, that can cause a missed + resync after a reconciliation resync + * fix regression introduced with 9.0.20, that can cause a missed + resync after a promote on a diskless node + * fix UUID handling in case a node promotes during (a short) + reconciliation resync + * fix removing of a diskless node when quorum is enabled + +------------------------------------------------------------------- +Tue Feb 25 07:03:39 UTC 2020 - nick wang <nw...@suse.com> + +- Update to drbd-9.0.21-1, require coccinelle >= 1.0.8 + * fix compat for write same on linux 4.9 and the Debian users + * fix kernel compat for linux 4.8 and 4.9; this mainly affected Debian + users; The symptoms where slow resync and resync getting stuck always at + the same point + * enable resync of lost and re-created backing devices (think lost node) when + the backing device was thinly provisioned and its current uuid is pre-set + to a 'day0 UUID' (by LINSTOR); that works by copying a unused bitmap slot + which tracks all changes since day 0 + * fix attach when bitmap is on PMEM; before it was set to + 'all blocks out-of-sync' upon attach + * avoid doing reconciliation resync multiple times by updating the + resync target's dagtag after if completed successfully + * return disk-state from Outdated to UpToDate when it loses connection + while in WFBitMapT and we have a stable and UpToDate peer + * new option --force-resync flag can be passed to new-current-uuid, that + can be used to trigger initial resync without touching the role +- Remove upstream drbd-update-resync-target-s-dagtag.patch +- Modify patch suse-coccinelle.patch to adopt spaas + +------------------------------------------------------------------- +Fri Jan 3 08:52:14 UTC 2020 - nick wang <nw...@suse.com> + +- bsc#1159786, fix build issue against v5.5 + add patch without_pr_warning.patch + +------------------------------------------------------------------- +Thu Dec 26 07:55:03 UTC 2019 - nick wang <nw...@suse.com> + +- bsc#1159333, back port patch for duplicate resync. + add patch drbd-update-resync-target-s-dagtag.patch + +------------------------------------------------------------------- +Mon Dec 16 06:29:42 UTC 2019 - nick wang <nw...@suse.com> + +- bsc#1158446, fix metadata limit due to 64k page size of ppc64le. + add patch drbd-fix-zero-metadata-limit-by-page-size-misaligned.patch + +------------------------------------------------------------------- +Thu Oct 17 17:48:47 UTC 2019 - Richard Brown <rbr...@suse.com> + +- Remove obsolete Groups tag (fate#326485) + +------------------------------------------------------------------- +Fri Oct 11 02:32:09 UTC 2019 - nick wang <nw...@suse.com> + +- Update to drbd-9.0.20-1 + * fix a case of false split brain detection if a diskless node promotes + multiple times, by aligning the rules for generating a new current-UUID + on a diskless nodes with them on a node with disk + * check if we still have quorum by exchanging a drbd-ping with peers + before creating new current UUID after loosing one peer + * fix after weak handling to not interfere with reconciliation resyncs + * retry connect when one of the relevant flags changes during UUID exchange + * fix reconciliation resync if one of the secondary got an current-UUID update + * fix resync to make progress after it was paused by an other resync operation + * fix false split-brains when a resync source changes current-UUID during + resync operation + * fix restore of D_OUTDATED when the resource first only attached and + then the peer objects are created (in contrast to the usual, new-peer, + attach, connect) + * abort creating new current-UUID when writing to meta-data fails in + the moment where the new-current-UUID should be written + * removed DRBD marking itself as read-only when secondary; this flag + was exposed using the BLKROGET ioctl; that should be left to user-land + use; recent KVM checks that flag, and does not dare auto-promote when + set by DRBD + * fix a small memory-leak when creating peer devices + * fix a possible information leak of kernel memory that pads net-link packets + * completing implications of "allow-remote-read=no"; i.e. when not to + create a new-current-UUID as read-write access to the data set was lost; + also fail both reads and writes if reads are no longer possible + * new option value "rr-conflict=retry-connect"; that helps in scenarios with + quorum where stopping a service takes longer than a temporarily network + outage and DRBD's reconnect + * code cleanups, introduced enums for remaining magic numbers + * new kernel-backward-compatibility framework based on spatch/coccinelle, + replacing an unmaintainable moloch of C preprocessor hell; Merged the + complete kernel-compat submodule + * ships with pre-computed compat-patches for main distros' kernels; in case + an other kernel is found it tries to use local spatch, if that is not + installed the build process tries to use a LINBIT hosted web service + to create the compat patch ("spatch-as-a-service"). + * compat with up to Linux-5.3-rc2 +- Modify patch suse-coccinelle.patch to adopt spaas + +------------------------------------------------------------------- +Wed Sep 20 08:22:12 UTC 2019 - nick wang <nw...@suse.com> + +- bsc#1151579, fix collinelle default path and always trigger in obs + Add patch suse-coccinelle.patch + +------------------------------------------------------------------- +Tue Sep 17 04:31:08 UTC 2019 - nw...@suse.com + +- bsc#1146117, disallow dual primaries when not configured. + Modify patch rely-on-sb-handles.patch + +------------------------------------------------------------------- +Tue Sep 10 07:45:05 UTC 2019 - Jan Engelhardt <jeng...@inai.de> + +- Restore higher summary specifity. +- Drop old-age %clean, %defattr. + +------------------------------------------------------------------- +Mon Sep 9 07:09:37 UTC 2019 - nick wang <nw...@suse.com> + +- bsc#1149945, update to 8e93a5d93 (drbd-9.0 branch) + * Coccinelle support + * compat with up to Linux-5.3 +- Remove patch compat_no_bioset_initialized.patch + +------------------------------------------------------------------- +Fri Jul 19 03:06:11 UTC 2019 - nw...@suse.com + +- Update to 9.0.19-1 + * check on CAP_SYS_ADMIN instead of CAP_NET_ADMIN for certain operations + * fix detection of unstable resync + * fix possible stuck resync when resync started from an other secondary + and later continued from a primary + * fix NULL dereference with disk-timeout enabled; was introduced in 9.0.9 + * retry connect when own current UUID changes during UUID exchange + * fix quorum tie-breaker diskless logic for settings other than "majority" + * disable quorum tie-breaker for 0 voters + * fix dax_direct_access() error return check + * fix resync stuck at near completion; bug was intorduces with 9.0.17 + * unblock IO when on-quorum-lost policy is changed (suspend -> io-error) + * introduce allow-remote-read configuration option; set it to "no" for + DR links you only want to write, but never read + * only complain about UUID changes during initial handshake + +------------------------------------------------------------------- +Tue May 28 05:52:07 UTC 2019 - nw...@suse.com + +- Upgrade to 9.0.18-1 + * Fix an IO deadlock under memory pressure + * Fix disconnect timing in case the network connection suddenly + drops all packets + * Fix some misbehavior that surfaced with Ahead/Behind + * Fix potential spinlock deadlock in IRQ + * Minor fixes: forget-peer, _rcu iterators + * Quickly stop resync during AHEAD/BEHIND by introducing new + packet for that purpose. + * The quorum feature can now use the connectivity to + the majority of Diskless nodes as tiebreaker + * Access meta-data using DAX if it is on persistent memory + (NVDIMM or PMEM); For write intense workloads this is a x2 to x4 speedup! +- Remove patch fix-make-error.patch since merged into upstream(46e8e3fc) + +------------------------------------------------------------------- +Fri Mar 22 02:10:17 UTC 2019 - nw...@suse.com + +- Upgrade to 9.0.17-1 + * Fix UUID handling of a diskless primary that has not peer with + usable data may not touch the current UUID + * Fix resync-after dependencies; cross-resource dependencies + and missing resources + * Fix resync when the sync source suddenly connects to a more recent + data set via an other connection and becomes sync target on that + other connection; pause first resync; fix wrong display of negative + resync progress percentage in this case + * Fix volume numbers between 32767 and 65534 + * Fix the data integrity implementation; it was broken since drbd-9.0 + and reported only false positives + * Fix for a corner-case when a promote action happens concurrently with ++++ 1697 more lines (skipped) ++++ between /dev/null ++++ and /work/SRC/openSUSE:Leap:15.2:Update/.drbd.15138.new.5913/drbd.changes New: ---- Module.supported _service drbd-9.0.22~1+git.fe2b5983.tar.bz2 drbd-fix-zero-metadata-limit-by-page-size-misaligned.patch drbd.changes drbd.spec drbd_git_revision fix-err-of-wrong-return-type.patch fix-resync-finished-with-syncs-have-bits-set.patch preamble rely-on-sb-handlers.patch suse-coccinelle.patch without_pr_warning.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ drbd.spec ++++++ # # spec file for package drbd # # Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # # needssslcertforbuild %if ! 0%{?is_opensuse} %ifarch x86_64 %define buildrt 1 %endif %endif Name: drbd Version: 9.0.22~1+git.fe2b5983 Release: 0 Summary: Linux driver for the "Distributed Replicated Block Device" License: GPL-2.0-or-later URL: https://drbd.linbit.com/ Source: %{name}-%{version}.tar.bz2 Source1: preamble #In kernel is: kernel/drivers/block/drbd/drbd.ko Source2: Module.supported Source3: drbd_git_revision Patch1: fix-resync-finished-with-syncs-have-bits-set.patch Patch2: rely-on-sb-handlers.patch Patch3: drbd-fix-zero-metadata-limit-by-page-size-misaligned.patch #In 61ff72f401680(v5.5-rc2), pr_warning is removed Patch4: without_pr_warning.patch Patch5: fix-err-of-wrong-return-type.patch Patch99: suse-coccinelle.patch #https://github.com/openSUSE/rpmlint-checks/blob/master/KMPPolicyCheck.py BuildRequires: coccinelle >= 1.0.8 BuildRequires: kernel-source BuildRequires: kernel-syms BuildRequires: libelf-devel BuildRequires: modutils Requires: drbd-utils >= 9.2.0 Supplements: drbd-utils >= 9.2.0 Obsoletes: drbd-kmp < %{version} ExcludeArch: i586 s390 %kernel_module_package -n drbd -p %{_sourcedir}/preamble %if 0%{?buildrt} == 1 BuildRequires: kernel-source-rt BuildRequires: kernel-syms-rt %endif %description DRBD is a distributed replicated block device. It mirrors a block device over the network to another machine. Think of it as networked raid 1. It is a building block for setting up clusters. %package KMP Summary: Kernel driver URL: http://drbd.linbit.com/ %description KMP This module is the kernel-dependent driver for DRBD. This is split out so that multiple kernel driver versions can be installed, one for each installed kernel. %prep %setup -q -n drbd-%{version} %patch1 -p1 %patch2 -p1 %patch3 -p1 %patch4 -p1 %patch5 -p1 %patch99 -p1 mkdir source cp -a drbd/. source/. || : cp $RPM_SOURCE_DIR/drbd_git_revision source/.drbd_git_revision %build rm -rf obj mkdir obj ln -s ../scripts obj/ export WANT_DRBD_REPRODUCIBLE_BUILD=1 export CONFIG_BLK_DEV_DRBD=m export EXTRA_CFLAGS='-DVERSION=\"%{version}\"' # Unset SPAAS or set as 'true' will use `spatch-as-a-service` from drbd.io # when "coccinelle" not installed. Set SPAAS to 'false' to force an ERROR. export SPAAS='false' for flavor in %{flavors_to_build}; do rm -rf $flavor cp -a -r source $flavor cp -a %{_sourcedir}/Module.supported $flavor export DRBDSRC="$PWD/obj/$flavor" # bsc#1160194, check the coccicheck work. #make coccicheck make %{?_smp_mflags} -C %{kernel_source $flavor} modules M=$PWD/$flavor SPAAS=${SPAAS} # Check the compat result cat $PWD/$flavor/compat.h done %install export INSTALL_MOD_PATH=%{buildroot} export INSTALL_MOD_DIR=updates for flavor in %{flavors_to_build}; do make -C %{kernel_source $flavor} modules_install M=$PWD/$flavor done mkdir -p %{buildroot}/%{_sbindir} ln -s -f %{_sbindir}/service %{buildroot}/%{_sbindir}/rc%{name} rm -f drbd.conf %files %license COPYING %doc ChangeLog %{_sbindir}/rc%{name} %changelog ++++++ Module.supported ++++++ updates/drbd.ko updates/drbd_transport_tcp.ko ++++++ _service ++++++ <services> <service name="tar_scm" mode="disabled"> <param name="url">g...@github.com:LINBIT/drbd-9.0.git</param> <param name="scm">git</param> <param name="filename">drbd</param> <!-- To update to a new release, change "revision" to the desired git commit hash and bump "version" if necessary This will download branch first instead of tag. <param name="revision">drbd-9.0</param> <param name="version">9.0.22~1</param> --> <param name="versionformat">9.0.22~1+git.%h</param> <param name="revision">drbd-9.0</param> </service> <service name="recompress" mode="disabled"> <param name="file">*drbd*.tar</param> <param name="compression">bz2</param> </service> <service name="set_version" mode="disabled"> <param name="basename">drbd</param> </service> </services> ++++++ drbd-fix-zero-metadata-limit-by-page-size-misaligned.patch ++++++ From 55293e6d7064c39183c3622c63ef6c2ab7162b80 Mon Sep 17 00:00:00 2001 From: Nick Wang <nw...@suse.com> Date: Wed, 11 Dec 2019 14:50:21 +0800 Subject: [PATCH] drbd: fix zero metadata limit by misaligned with page size Metadata is aligned on 4k blocks, which is ok for x86 platform. But may cause a result of zero page with PPC64LE or ARM with 64k page size. And calculate effective bytes directly from sector size. Error log: ... drbd0: Device size clipped from 2097016s to 0s due to metadata size ... Signed-off-by: Nick Wang <nw...@suse.com> CC: drbd-...@lists.linbit.com --- drbd/drbd_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drbd/drbd_main.c b/drbd/drbd_main.c index a7294639..336a4177 100644 --- a/drbd/drbd_main.c +++ b/drbd/drbd_main.c @@ -5589,8 +5589,7 @@ u64 directly_connected_nodes(struct drbd_resource *resource, enum which_state wh static sector_t bm_sect_to_max_capacity(unsigned int bm_max_peers, sector_t bm_sect) { - u64 bm_pages = bm_sect >> (PAGE_SHIFT - SECTOR_SHIFT); - u64 bm_bytes = bm_pages << PAGE_SHIFT; + u64 bm_bytes = bm_sect << SECTOR_SHIFT; u64 bm_bytes_per_peer = div_u64(bm_bytes, bm_max_peers); u64 bm_bits_per_peer = bm_bytes_per_peer * BITS_PER_BYTE; return BM_BIT_TO_SECT(bm_bits_per_peer); -- 2.16.4 ++++++ drbd_git_revision ++++++ GIT-hash: fe2b59836bdf1c7c81ccbaad8ef8016d9c3ba582 ++++++ fix-err-of-wrong-return-type.patch ++++++ diff -Naur drbd-9.0.16+git.ab9777df.orig/drbd/drbd-kernel-compat/tests/have_blk_qc_t_make_request.c drbd-9.0.16+git.ab9777df/drbd/drbd-kernel-compat/tests/have_blk_qc_t_make_request.c --- drbd-9.0.16+git.ab9777df.orig/drbd/drbd-kernel-compat/tests/have_blk_qc_t_make_request.c 2020-11-03 17:45:49.362231056 +0800 +++ drbd-9.0.16+git.ab9777df/drbd/drbd-kernel-compat/tests/have_blk_qc_t_make_request.c 2020-11-03 19:11:54.843913135 +0800 @@ -11,6 +11,7 @@ blk_qc_t drbd_make_request(struct request_queue *q, struct bio *bio) { + return 0; } #ifndef __same_type diff -Naur drbd-9.0.16+git.ab9777df.orig/drbd/drbd-kernel-compat/tests/have_proc_create_single.c drbd-9.0.16+git.ab9777df/drbd/drbd-kernel-compat/tests/have_proc_create_single.c --- drbd-9.0.16+git.ab9777df.orig/drbd/drbd-kernel-compat/tests/have_proc_create_single.c 2020-11-03 17:45:49.362231056 +0800 +++ drbd-9.0.16+git.ab9777df/drbd/drbd-kernel-compat/tests/have_proc_create_single.c 2020-11-05 11:18:57.996540948 +0800 @@ -8,6 +8,7 @@ static int foo_seq_show(struct seq_file *seq, void *v) { + return 0; } struct proc_dir_entry *foo(void) diff -Naur drbd-9.0.16+git.ab9777df.orig/drbd/drbd-kernel-compat/tests/sock_ops_returns_addr_len.c drbd-9.0.16+git.ab9777df/drbd/drbd-kernel-compat/tests/sock_ops_returns_addr_len.c --- drbd-9.0.16+git.ab9777df.orig/drbd/drbd-kernel-compat/tests/sock_ops_returns_addr_len.c 2020-11-03 17:45:49.362231056 +0800 +++ drbd-9.0.16+git.ab9777df/drbd/drbd-kernel-compat/tests/sock_ops_returns_addr_len.c 2020-11-05 12:02:16.457436250 +0800 @@ -1,5 +1,6 @@ #include <linux/net.h> int always_getpeername(struct socket *sock, struct sockaddr *addr) { - return sock->ops->getname(sock, addr, 2); + sock->ops->getname(sock, addr, 2); + return 0; } ++++++ fix-resync-finished-with-syncs-have-bits-set.patch ++++++ diff -Naur drbd-9.0.7rc1+git.093821cd.orig/drbd/drbd_receiver.c drbd-9.0.7rc1+git.093821cd/drbd/drbd_receiver.c --- drbd-9.0.7rc1+git.093821cd.orig/drbd/drbd_receiver.c 2017-03-24 16:55:42.169376092 +0800 +++ drbd-9.0.7rc1+git.093821cd/drbd/drbd_receiver.c 2017-03-24 16:56:51.137239174 +0800 @@ -6240,7 +6240,8 @@ /* if peer_state changes to connected at the same time, * it explicitly notifies us that it finished resync. * Maybe we should finish it up, too? */ - else if (peer_state.conn == L_ESTABLISHED) { + else if (peer_state.conn == L_ESTABLISHED && + peer_disk_state > D_NEGOTIATING) { bool finish_now = false; if (old_peer_state.conn == L_WF_BITMAP_S) { ++++++ preamble ++++++ Requires: kernel-%1 Supplements: packageand(kernel-%1:%name) Recommends: drbd ++++++ rely-on-sb-handlers.patch ++++++ diff -Naur drbd-9.0.11+git.1e2bccdc.orig/drbd/drbd_state.c drbd-9.0.11+git.1e2bccdc/drbd/drbd_state.c --- drbd-9.0.11+git.1e2bccdc.orig/drbd/drbd_state.c 2019-08-27 13:34:08.462567903 +0800 +++ drbd-9.0.11+git.1e2bccdc/drbd/drbd_state.c 2019-08-30 12:56:37.664186710 +0800 @@ -1398,8 +1398,13 @@ nc = rcu_dereference(connection->transport.net_conf); two_primaries = nc ? nc->two_primaries : false; if (peer_role[NEW] == R_PRIMARY && peer_role[OLD] != R_PRIMARY && !two_primaries) { - if (role[NOW] == R_PRIMARY) - return SS_TWO_PRIMARIES; + if (role[NOW] == R_PRIMARY) { + if (role[OLD] == R_PRIMARY && connection->cstate[OLD] < C_CONNECTED) { + drbd_info(connection, "Two primaries but not allowed. Rely on split brain handler or to disconnect.\n"); + } else { + return SS_TWO_PRIMARIES; + } + } idr_for_each_entry(&resource->devices, device, vnr) { if (device->open_ro_cnt) return SS_PRIMARY_READER; @@ -3665,7 +3670,11 @@ mask = NODE_MASK(connection->peer_node_id); if ((resource->twopc_reply.primary_nodes & mask) && !(connection->transport.net_conf->two_primaries)) { - rv = SS_TWO_PRIMARIES; + if (connection->cstate[OLD] < C_CONNECTED && connection->cstate[NEW] == C_CONNECTED) { + drbd_info(connection, "Two primaries but not allowed after reconnected. Rely on split brain handler or to disconnect.\n"); + } else { + rv = SS_TWO_PRIMARIES; + } break; } } @@ -3739,7 +3748,11 @@ nc = rcu_dereference(connection->transport.net_conf); if (!nc->two_primaries && NODE_MASK(connection->peer_node_id) & reply->primary_nodes) { - rv = SS_PRIMARY_READER; + if (connection->cstate[OLD] < C_CONNECTED && connection->cstate[NEW] == C_CONNECTED) { + drbd_info(connection, "Two primaries and device is opened as read only. Rely on split brain handler or to disconnect.\n"); + } else { + rv = SS_PRIMARY_READER; + } break; } } ++++++ suse-coccinelle.patch ++++++ diff -Naur drbd-9.0.21~1+git.449d6bf2.orig/drbd/drbd-kernel-compat/gen_compat_patch.sh drbd-9.0.21~1+git.449d6bf2/drbd/drbd-kernel-compat/gen_compat_patch.sh --- drbd-9.0.21~1+git.449d6bf2.orig/drbd/drbd-kernel-compat/gen_compat_patch.sh 2019-12-16 14:42:10.832866579 +0800 +++ drbd-9.0.21~1+git.449d6bf2/drbd/drbd-kernel-compat/gen_compat_patch.sh 2019-12-16 15:11:08.209750606 +0800 @@ -56,29 +56,49 @@ < drbd-kernel-compat/cocci/debugfs_compat_template.cocci.in \ >> $incdir/.compat.cocci done + + echo " APPLIED_COCCI_FILES "; + cat $incdir/applied_cocci_files.txt; + + coccilibpath=$(rpm -ql coccinelle|grep standard.h|xargs dirname); + echo " SPATCH_SOURCES: "$*; + echo " COCCI_LIBPATH: "$coccilibpath; + if [ -e $incdir/.compat.cocci ]; then - echo " SPATCH $chksum "$K - # Note: $* (or $@) is NOT make magic variable now, this is a shell script - # make $@, the target file, was passed as $1, and is now $compat_patch - # make $^, the source (and header) files spatch should operate on, - # are "the rest of the shell argument array", so after shifting the first - # argument away this is shell $@ respectively $* now. - # we know we don't have white-space in the argument list - - command="spatch --sp-file $incdir/.compat.cocci $* --macro-file drbd-kernel-compat/cocci_macros.h --very-quiet > $compat_patch.tmp 2> $incdir/.spatch.stderr;" - - if test -t 0; then - $SHELL -c "$command" - else - # spatch is broken in a way: it "requires" a tty. - # provide a tty using "script", so I can have several spatch in parallel. - # They may ignore INT and TERM; if you have to, use HUP. - </dev/null &> /dev/null script --append $incdir/.spatch.tty.out --return --quiet --command "$command" - fi + echo " GENCOCCIRULES .compat.cocci"; + cat $incdir/.compat.cocci; + + echo " SPATCH $chksum "$K + # Note: $* (or $@) is NOT make magic variable now, this is a shell script + # make $@, the target file, was passed as $1, and is now $compat_patch + # make $^, the source (and header) files spatch should operate on, + # are "the rest of the shell argument array", so after shifting the first + # argument away this is shell $@ respectively $* now. + # we know we don't have white-space in the argument list + + command="spatch --sp-file $incdir/.compat.cocci $* --macro-file drbd-kernel-compat/cocci_macros.h --macro-file-builtins $coccilibpath/standard.h --iso-file $coccilibpath/standard.iso --very-quiet > $compat_patch.tmp 2> $incdir/.spatch.stderr;" + echo " SPATCH COMMAND $command "; + + if test -t 0; then + $SHELL -c "$command" + else + # spatch is broken in a way: it "requires" a tty. + # provide a tty using "script", so I can have several spatch in parallel. + # They may ignore INT and TERM; if you have to, use HUP. + </dev/null &> /dev/null script --append $incdir/.spatch.tty.out --return --quiet --command "$command" + fi else - echo " SPATCH $chksum "$K" - nothing to do" - touch $compat_patch.tmp + echo " SPATCH $chksum "$K" - nothing to do" + touch $compat_patch.tmp + fi + + echo " GENSPATCHFILE $compat_patch.tmp "; + cat $compat_patch.tmp; + if [ -e $incdir/.spatch.stderr ]; then + echo " GENSPATCHERR .spatch.stderr"; + cat $incdir/.spatch.stderr; fi + if [ -e $incdir/.compat.patch ]; then cat $incdir/.compat.patch >> $compat_patch.tmp fi ++++++ without_pr_warning.patch ++++++ diff -Naur drbd-9.0.20~1+git.7dce3c8b.orig/drbd/drbd-kernel-compat/cocci/suse_pr_warning__no_present.cocci drbd-9.0.20~1+git.7dce3c8b/drbd/drbd-kernel-compat/cocci/suse_pr_warning__no_present.cocci --- drbd-9.0.20~1+git.7dce3c8b.orig/drbd/drbd-kernel-compat/cocci/suse_pr_warning__no_present.cocci 1970-01-01 08:00:00.000000000 +0800 +++ drbd-9.0.20~1+git.7dce3c8b/drbd/drbd-kernel-compat/cocci/suse_pr_warning__no_present.cocci 2020-01-06 14:52:30.740564872 +0800 @@ -0,0 +1,11 @@ +@outdate_pr_waring@ +identifier func; +expression list EL; +@@ +func(...) { +<... +- pr_warning(EL); ++ pr_warn(EL); +...> +} + diff -Naur drbd-9.0.20~1+git.7dce3c8b.orig/drbd/drbd-kernel-compat/gen_patch_names.c drbd-9.0.20~1+git.7dce3c8b/drbd/drbd-kernel-compat/gen_patch_names.c --- drbd-9.0.20~1+git.7dce3c8b.orig/drbd/drbd-kernel-compat/gen_patch_names.c 2020-01-06 14:50:00.827751099 +0800 +++ drbd-9.0.20~1+git.7dce3c8b/drbd/drbd-kernel-compat/gen_patch_names.c 2020-01-06 14:50:41.135969904 +0800 @@ -291,6 +291,9 @@ patch(1, "allow_kernel_signal", true, false, COMPAT_HAVE_ALLOW_KERNEL_SIGNAL, "present"); + patch(1, "suse_pr_warning", true, false, + COMPAT_WITH_PR_WARNING, "present"); + /* #define BLKDEV_ISSUE_ZEROOUT_EXPORTED */ /* #define BLKDEV_ZERO_NOUNMAP */ diff -Naur drbd-9.0.20~1+git.7dce3c8b.orig/drbd/drbd-kernel-compat/tests/with_pr_warning.c drbd-9.0.20~1+git.7dce3c8b/drbd/drbd-kernel-compat/tests/with_pr_warning.c --- drbd-9.0.20~1+git.7dce3c8b.orig/drbd/drbd-kernel-compat/tests/with_pr_warning.c 1970-01-01 08:00:00.000000000 +0800 +++ drbd-9.0.20~1+git.7dce3c8b/drbd/drbd-kernel-compat/tests/with_pr_warning.c 2020-01-06 14:50:41.135969904 +0800 @@ -0,0 +1,8 @@ +#include <linux/printk.h> + +/* pr_waring is dropped since 61ff72f401680 */ + +void foo(void) +{ + pr_warning("pr_warning replaced by pr_warn since 61ff72f401680!"); +} _______________________________________________ openSUSE Commits mailing list -- commit@lists.opensuse.org To unsubscribe, email commit-le...@lists.opensuse.org List Netiquette: https://en.opensuse.org/openSUSE:Mailing_list_netiquette List Archives: https://lists.opensuse.org/archives/list/commit@lists.opensuse.org