SHA256
1
0
forked from pool/drbd

203 Commits

Author SHA256 Message Date
f611d07ac7 Accepting request 1286367 from network:ha-clustering:Factory
OBS-URL: https://build.opensuse.org/request/show/1286367
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=118
2025-06-17 16:24:20 +00:00
e6b9fc6e91 Accepting request 1286295 from home:gsu:branches:network:ha-clustering:Factory
- drbd: fix build error against kernel v6.15 (boo#1244669)
  * add upstream patch
    + 0001-compat-follow-Linux-6.14-debugfs_change_name.patch
  * add suse special patch
    + boo1244669-fix_build_error_against_kernel_v6.15.patch
  * remove patch which is replaced by the upstream patch
    - boo1240916-fix_build_error_against_kernel_v6.14.patch

OBS-URL: https://build.opensuse.org/request/show/1286295
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=159
2025-06-17 11:56:00 +00:00
2061b98543 Accepting request 1268259 from network:ha-clustering:Factory
OBS-URL: https://build.opensuse.org/request/show/1268259
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=117
2025-04-10 19:59:18 +00:00
88bb58b9c9 - drbd: fix build error against kernel v6.14 (boo#1240916)
* add patch
    + boo1240916-fix_build_error_against_kernel_v6.14.patch
  * replace suse special patch with drbd upstream fix
    - boo1236927-fix-build_error_against_v6.13.patch
    + 0001-drbd-build-deal-with-potentially-relative-paths-in-p.patch
  * remove patch, the issue is already fixed in v6.14 kernel
    - boo1235399-fix_the_warning_of_blk_validate_limits.patch

OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=158
2025-04-10 02:20:11 +00:00
5c0c22743c Accepting request 1244633 from network:ha-clustering:Factory
OBS-URL: https://build.opensuse.org/request/show/1244633
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=116
2025-02-10 16:27:59 +00:00
145060f1ca drbd: fix build error against kernel v6.13 (boo#1236927)
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=157
2025-02-10 01:14:21 +00:00
67e828e1bd Accepting request 1235800 from network:ha-clustering:Factory
OBS-URL: https://build.opensuse.org/request/show/1235800
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=115
2025-01-09 14:07:32 +00:00
ecda894264 - fix the warning of blk_validate_limits when running drbdadm down (boo#1235399)
* add patch
    boo1235399-fix_the_warning_of_blk_validate_limits.patch

OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=156
2025-01-08 07:34:16 +00:00
06370a1980 Accepting request 1233480 from network:ha-clustering:Factory
OBS-URL: https://build.opensuse.org/request/show/1233480
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=114
2024-12-29 10:56:44 +00:00
6ee9ba5898 - Update DRBD version from 9.1.22 to 9.1.23 (boo#1234849)
* Changelog from Linbit:
    9.1.23 (api:genl2/proto:86-101,118-121/transport:18)
    --------
     * Fix a corner case that can happen when DRBD establishes multiple
       connections in parallel, which could lead one connection to end up in
       an inconsistent replication state of WFBitMapT/Established
     * Fix a corner case in which a reconciliation resync ends up in
       WFBitMapT/Established
     * Restrict protocol compatibility to the most recent 8.4 and 9.0 releases
     * Fix a corner case causing a module ref leak on drbd_transport_tcp;
       if it hits, you can not rmmod it
     * rate-limit resync progress while resync is paused
     * resync-target inherits history UUIDs when resync finishes,
       this can prevent unexpected "unrelared data" events later
     * Updated compatibility code for Linux 6.11 and 6.12
  * remove patches which already included in the new version:
     0001-drbd-properly-rate-limit-resync-progress-reports.patch
     0002-drbd-inherit-history-UUIDs-from-sync-source-when-res.patch
     0003-build-compat-fix-line-offset-in-annotation-pragmas-p.patch
     0004-drbd-fix-exposed_uuid-going-backward.patch
     0005-drbd-Proper-locking-around-new_current_uuid-on-a-dis.patch
     0006-build-CycloneDX-fix-bom-ref-add-purl.patch
     0007-build-Another-update-to-the-spdx-files.patch
     0008-build-generate-spdx.json-not-tag-value-format.patch
     0009-compat-fix-gen_patch_names-for-bdev_file_open_by_pat.patch
     0010-compat-fix-nla_nest_start_noflag-test.patch
     0011-compat-fix-blk_alloc_disk-rule.patch
     0012-drbd-remove-const-from-function-return-type.patch
     0013-drbd-don-t-set-max_write_zeroes_sectors-in-decide_on.patch
     0014-drbd-split-out-a-drbd_discard_supported-helper.patch
     0015-drbd-atomically-update-queue-limits-in-drbd_reconsid.patch
     0016-compat-test-and-patch-for-queue_limits_start_update.patch
     0017-compat-specify-which-essential-change-was-not-made.patch
     0018-gen_patch_names-reorder-blk_mode_t.patch
     0019-compat-fix-blk_queue_update_readahead-patch.patch
     0020-compat-test-and-patch-for-que_limits-max_hw_discard_.patch
     0021-compat-fixup-write_zeroes__no_capable.patch
     0022-compat-fixup-queue_flag_discard__yes_present.patch
     0023-drbd-move-flags-to-queue_limits.patch
     0024-compat-test-and-patch-for-queue_limits.features.patch
     0025-drbd-Annotate-struct-fifo_buffer-with-__counted_by.patch
     0026-compat-test-and-patch-for-__counted_by.patch
     0027-drbd-fix-function-cast-warnings-in-state-machine.patch
     0028-Add-missing-documentation-of-peer_device-parameter-t.patch
     0030-drbd-kref_put-path-when-kernel_accept-fails.patch
     0031-build-fix-typo-in-Makefile.spatch.patch
     0032-drbd-open-do-not-delay-open-if-already-Primary.patch
  * removed patch which is not needed anymore:
     boo1231290_fix_drbd_build_error_against_kernel_v6.11.0.patch
     boo1233222_fix_drbd_build_error_against_kernel_v6.11.6.patch
  * update:
     drbd_git_revision
     drbd.spec
  * add upstream patches to align commit d64ebe7eb7df:
     0001-drbd-Fix-memory-leak.patch

OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=155
2024-12-27 03:43:25 +00:00
2bae9bc8c5 Accepting request 1223497 from network:ha-clustering:Factory
OBS-URL: https://build.opensuse.org/request/show/1223497
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=113
2024-11-12 18:22:08 +00:00
0eb684eb1f - drbd: fix build error against kernel v6.11.6 (boo#1233222)
* add patch
    + boo1233222_fix_drbd_build_error_against_kernel_v6.11.6.patch

OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=154
2024-11-12 04:37:25 +00:00
38a24befea Accepting request 1207029 from network:ha-clustering:Factory
OBS-URL: https://build.opensuse.org/request/show/1207029
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=112
2024-10-11 15:02:35 +00:00
d377bc2ee5 - Update DRBD version from 9.1.16 to 9.1.22
* Changelog from Linbit:
    9.1.22 (api:genl2/proto:86-121/transport:18)
    --------
     * Upgrade from partial resync to a full resync if necessary when the
       user manually resolves a split-brain situation
     * Fix a potential NULL deref when a disk fails while doing a
       forget-peer operation.
     * Fix a rcu_read_lock()/rcu_read_unlock() imbalance
     * Restart the open() syscall when a process auto promoting a drbd device gets
       interrupted by a signal
     * Remove a deadlock that caused DRBD to connect sometimes
       exceptionally slow
     * Make detach operations interruptible
     * Added dev_is_open to events2 status information
     * Improve log readability for 2PC state changes and drbd-threads
     * Updated compability code for Linux 6.9
    
    9.1.21 (api:genl2/proto:86-121/transport:18)
    --------
     * fix a deadlock that can trigger when deleting a connection and
       another connection going down in parallel. This is a regression of
       9.1.20
     * Fix an out-of-bounds access when scanning the bitmap. It leads to a
       crash when the bitmap ends on a page boundary, and this is also a
       regression in 9.1.20.
    
    9.1.20 (api:genl2/proto:86-121/transport:18)
    --------
     * Fix a kernel crash that is sometimes triggered when downing drbd
       resources in a specific, unusual order (was triggered by the
       Kubernetes CSI driver)
     * Fix a rarely triggering kernel crash upon adding paths to a
       connection by rehauling the path lists' locking
     * Fix the continuation of an interrupted initial resync
     * Fix the state engine so that an incapable primary does not outdate
       indirectly reachable secondary nodes
     * Fix a logic bug that caused drbd to pretend that a peer's disk is
       outdated when doing a manual disconnect on a down connection; with
       that cured impact on fencing and quorum.
     * Fix forceful demotion of suspended devices
     * Rehaul of the build system to apply compatibility patches out of
       place that allows one to build for different target kernels from a
       single drbd source tree
     * Updated compability code for Linux 6.8
    
    9.1.19 (api:genl2/proto:86-121/transport:18)
    --------
     * Fix a resync decision case where drbd wrongly decided to do a full
       resync, where a partial resync was sufficient; that happened in a
       specific connect order when all nodes were on the same data
       generation (UUID)
     * Fix the online resize code to obey cached size information about
       temporal unreachable nodes
     * Fix a rare corner case in which DRBD on a diskless primary node
       failed to re-issue a read request to another node with a backing
       disk upon connection loss on the connection where it shipped the
       read request initially
     * Make timeout during promotion attempts interruptible
     * No longer write activity-log updates on the secondary node in a
       cluster with precisely two nodes with backing disk; this is a
       performance optimization
     * Reduce CPU usage of acknowledgment processing
    
    9.1.18 (api:genl2/proto:86-121/transport:18)
    --------
     * Fixed connecting nodes with differently sized backing disks,
       specifically when the smaller node is primary, before establishing
       the connections
     * Fixed thawing a device that has I/O frozen after loss of quorum
       when a configuration change eases its quorum requirements
     * Properly fail TLS if requested (only available in drbd-9.2)
     * Fixed a race condition that can cause auto-demote to trigger right
       after an explicit promote
     * Fixed a rare race condition that could mess up the handshake result
       before it is committed to the replication state.
     * Preserve "tiebreaker quorum" over a reboot of the last node (3-node
       clusters only)
     * Update compatibility code for Linux 6.6
    
    9.1.17 (api:genl2/proto:86-121/transport:18)
    --------
     * fix a potential crash when configuring drbd to bind to a
       non-existent local IP address (this is a regression of drbd-9.1.8)
     * Cure a very seldom triggering race condition bug during
       establishing connections; when you triggered it, you got an OOPS
       hinting to list corruption
     * fix a race condition regarding operations on the bitmap while
       forgetting a bitmap slot and a pointless warning
     * Fix handling of unexpected (on a resource in secondary role) write
       requests
     * Fix a corner case that can cause a process to hang when closing the
       DRBD device, while a connection gets re-established
     * Correctly block signal delivery during auto-demote
     * Improve the reliability of establishing connections
     * Do not clear the transport with `net-options --set-defaults`. This
       fix avoids unexpected disconnect/connect cycles upon an `adjust`
       when using the 'lb-tcp' or 'rdma' transports in drbd-9.2.
     * New netlink packet to report path status to drbdsetup
     * Improvements to the content and rate-limiting of many log messages
     * Update compatibility code and follow Linux upstream development
       until Linux 6.5
  * remove patches which already included in the new version:
     0001-drbd-allow-transports-to-take-additional-krefs-on-a-.patch
     0002-drbd-improve-decision-about-marking-a-failed-disk-Ou.patch
     0003-drbd-fix-error-path-in-drbd_get_listener.patch
     0004-drbd-build-fix-spurious-re-build-attempt-of-compat.p.patch
     0005-drbd-log-error-code-when-thread-fails-to-start.patch
     0006-drbd-log-numeric-value-of-drbd_state_rv-as-well-as-s.patch
     0007-drbd-stop-defining-__KERNEL_SYSCALLS__.patch
     0008-compat-block-introduce-holder-ops.patch
     0009-drbd-reduce-net_ee-not-empty-info-to-a-dynamic-debug.patch
     0010-drbd-do-not-send-P_CURRENT_UUID-to-DRBD-8-peer-when-.patch
     0011-compat-block-pass-a-gendisk-to-open.patch
     0012-drbd-Restore-DATA_CORKED-and-CONTROL_CORKED-bits.patch
     0013-drbd-remove-unused-extern-for-conn_try_outdate_peer.patch
     0014-drbd-include-source-of-state-change-in-log.patch
     0015-compat-block-use-the-holder-as-indication-for-exclus.patch
     0016-drbd-Fix-net-options-set-defaults-to-not-clear-the-t.patch
     0017-drbd-propagate-exposed-UUIDs-only-into-established-c.patch
     0018-drbd-rework-autopromote.patch
     0019-compat-block-remove-the-unused-mode-argument-to-rele.patch
     0020-drbd-do-not-allow-auto-demote-to-be-interrupted-by-s.patch
     0021-compat-sock-Remove-sendpage-in-favour-of-sendmsg-MSG.patch
     0022-compat-block-replace-fmode_t-with-a-block-specific-t.patch
     0023-compat-genetlink-remove-userhdr-from-struct-genl_inf.patch
     0024-compat-fixup-FMODE_READ-FMODE_WRITE-usage.patch
     0025-compat-drdb-Convert-to-use-bdev_open_by_path.patch
     0026-compat-gate-blkdev_-patches-behind-bdev_open_by_path.patch
     boo1230635_01-compat-fix-nla_nest_start_noflag-test.patch
     boo1230635_02-drbd-port-block-device-access-to-file.patch
   
  * removed patches which are not needed anymore:
     boo1229062-re-enable-blk_queue_max_hw_sectors.patch
     bsc1226510-fix-build-err-against-6.9.3.patch
   
  * update:
     drbd_git_revision
     suse-coccinelle.patch
     drbd.spec
   
  * add upstream patches to align commit 13ada1be201e:
     0001-drbd-properly-rate-limit-resync-progress-reports.patch
     0002-drbd-inherit-history-UUIDs-from-sync-source-when-res.patch
     0003-build-compat-fix-line-offset-in-annotation-pragmas-p.patch
     0004-drbd-fix-exposed_uuid-going-backward.patch
     0005-drbd-Proper-locking-around-new_current_uuid-on-a-dis.patch
     0006-build-CycloneDX-fix-bom-ref-add-purl.patch
     0007-build-Another-update-to-the-spdx-files.patch
     0008-build-generate-spdx.json-not-tag-value-format.patch
     0009-compat-fix-gen_patch_names-for-bdev_file_open_by_pat.patch
     0010-compat-fix-nla_nest_start_noflag-test.patch
     0011-compat-fix-blk_alloc_disk-rule.patch
     0012-drbd-remove-const-from-function-return-type.patch
     0013-drbd-don-t-set-max_write_zeroes_sectors-in-decide_on.patch
     0014-drbd-split-out-a-drbd_discard_supported-helper.patch
     0015-drbd-atomically-update-queue-limits-in-drbd_reconsid.patch
     0016-compat-test-and-patch-for-queue_limits_start_update.patch
     0017-compat-specify-which-essential-change-was-not-made.patch
     0018-gen_patch_names-reorder-blk_mode_t.patch
     0019-compat-fix-blk_queue_update_readahead-patch.patch
     0020-compat-test-and-patch-for-que_limits-max_hw_discard_.patch
     0021-compat-fixup-write_zeroes__no_capable.patch
     0022-compat-fixup-queue_flag_discard__yes_present.patch
     0023-drbd-move-flags-to-queue_limits.patch
     0024-compat-test-and-patch-for-queue_limits.features.patch
     0025-drbd-Annotate-struct-fifo_buffer-with-__counted_by.patch
     0026-compat-test-and-patch-for-__counted_by.patch
     0027-drbd-fix-function-cast-warnings-in-state-machine.patch
     0028-Add-missing-documentation-of-peer_device-parameter-t.patch
     0030-drbd-kref_put-path-when-kernel_accept-fails.patch
     0031-build-fix-typo-in-Makefile.spatch.patch
     0032-drbd-open-do-not-delay-open-if-already-Primary.patch
   
  * add patch to fix kernel imcompatibility issue (boo#1231290):
     boo1231290_fix_drbd_build_error_against_kernel_v6.11.0.patch

OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=153
2024-10-11 04:45:18 +00:00
6c06a89906 Accepting request 1201602 from network:ha-clustering:Factory
OBS-URL: https://build.opensuse.org/request/show/1201602
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=111
2024-09-17 16:19:33 +00:00
bd99eea891 - drbdadm down fails to remove sysfs holder file (boo#1230635)
* add patch
    + boo1230635_01-compat-fix-nla_nest_start_noflag-test.patch
    + boo1230635_02-drbd-port-block-device-access-to-file.patch
  * update patch
    + bsc1226510-fix-build-err-against-6.9.3.patch

OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=152
2024-09-17 11:55:19 +00:00
a156897b31 Accepting request 1193357 from network:ha-clustering:Factory
OBS-URL: https://build.opensuse.org/request/show/1193357
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=110
2024-08-12 10:32:09 +00:00
3351498905 Accepting request 1181698 from network:ha-clustering:Factory
OBS-URL: https://build.opensuse.org/request/show/1181698
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=109
2024-06-19 14:40:43 +00:00
4a4a040191 - drbd: fix build error against kernel v6.9.3 (boo#1226510)
* add patch
    + bsc1226510-fix-build-err-against-6.9.3.patch

OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=150
2024-06-19 08:04:26 +00:00
7e221f084c Accepting request 1167951 from network:ha-clustering:Factory
OBS-URL: https://build.opensuse.org/request/show/1167951
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=108
2024-04-16 18:05:05 +00:00
60ef287345 Accepting request 1167777 from home:gsu:branches:network:ha-clustering:Factory
------------------------------------------------------------------
- drbd: fix build error against kernel v6.8.2 (boo#1222397)
  * add upstream patches
    + 0024-compat-fixup-FMODE_READ-FMODE_WRITE-usage.patch
    + 0025-compat-drdb-Convert-to-use-bdev_open_by_path.patch
    + 0026-compat-gate-blkdev_-patches-behind-bdev_open_by_path.patch

OBS-URL: https://build.opensuse.org/request/show/1167777
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=149
2024-04-16 08:01:44 +00:00
f87dc60bd9 Accepting request 1150590 from network:ha-clustering:Factory
OBS-URL: https://build.opensuse.org/request/show/1150590
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=107
2024-02-27 21:45:38 +00:00
3e11cfbc83 Accepting request 1150586 from home:dimstar:rpm4.20:d
Prepare for RPM 4.20

OBS-URL: https://build.opensuse.org/request/show/1150586
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=148
2024-02-26 07:49:41 +00:00
0259244ea7 Accepting request 1127681 from network:ha-clustering:Factory
OBS-URL: https://build.opensuse.org/request/show/1127681
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=106
2023-11-20 20:20:10 +00:00
172292f7b4 Accepting request 1127654 from home:gsu:branches:network:ha-clustering:Factory
- drbd: fix build error against kernel v6.6.1 (boo#1217078)
  * add upstream patches
    + 0021-compat-sock-Remove-sendpage-in-favour-of-sendmsg-MSG.patch
    + 0022-compat-block-replace-fmode_t-with-a-block-specific-t.patch
    + 0023-compat-genetlink-remove-userhdr-from-struct-genl_inf.patch
  * remove patch which are already included in upstream patches:
    - bsc-1215699_fix-build-error-against-kernel-v6.5.4.patch

OBS-URL: https://build.opensuse.org/request/show/1127654
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=147
2023-11-20 11:51:25 +00:00
d09a2c7cea Accepting request 1113587 from network:ha-clustering:Factory
OBS-URL: https://build.opensuse.org/request/show/1113587
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=105
2023-09-26 20:02:19 +00:00
e7b40eeaea Accepting request 1113586 from home:hmzhao:branches:network:ha-clustering:Factory
drbd: fix build error against kernel v6.5.4 (boo#1215699)

OBS-URL: https://build.opensuse.org/request/show/1113586
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=146
2023-09-26 05:51:01 +00:00
cadc9519cc Accepting request 1109379 from network:ha-clustering:Factory
OBS-URL: https://build.opensuse.org/request/show/1109379
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=104
2023-09-07 19:13:08 +00:00
90d03da070 Accepting request 1109377 from home:hmzhao:branches:network:ha-clustering:Factory
- Update DRBD version from 9.0.30+ to 9.1.16 (PED-6362)

OBS-URL: https://build.opensuse.org/request/show/1109377
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=145
2023-09-07 01:17:08 +00:00
b04dc19e5e Accepting request 1070828 from network:ha-clustering:Factory
OBS-URL: https://build.opensuse.org/request/show/1070828
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=103
2023-03-11 17:24:04 +00:00
d4c87ee5c1 Accepting request 1070827 from home:hmzhao:branches:network:ha-clustering:Factory
drbd: fix build error against kernel v6.2.1 (bsc#1209168)
  * update patch
    + bsc-1206791-05-prandom_u32_max.patch

OBS-URL: https://build.opensuse.org/request/show/1070827
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=144
2023-03-11 06:36:46 +00:00
1ec504acc4 Accepting request 1056343 from network:ha-clustering:Factory
OBS-URL: https://build.opensuse.org/request/show/1056343
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=102
2023-01-06 16:06:01 +00:00
44b98926cd Accepting request 1056342 from home:hmzhao:branches:network:ha-clustering:Factory
- remove useless patch, dax_get_by_host() was replaced by fs_dax_get_by_bdev()
  * bsc-1192929_06-dax_support.patch

OBS-URL: https://build.opensuse.org/request/show/1056342
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=143
2023-01-06 08:38:53 +00:00
f809287682 Accepting request 1056193 from network:ha-clustering:Factory
OBS-URL: https://build.opensuse.org/request/show/1056193
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=101
2023-01-05 14:55:02 +00:00
4e5f7cbf78 Accepting request 1056192 from home:hmzhao:branches:network:ha-clustering:Factory
- drbd: fix build error against kernel v6.1.1 (bsc#1206791)
  * update bsc-1201335_06-bdi.patch commit log (no code change)
    + bsc-1201335_06-bdi.patch
  * update bsc-1202600_02-dax-introduce-DAX_RECOVERY_WRITE-dax-access-mode.patch (no code change)
    + bsc-1202600_02-dax-introduce-DAX_RECOVERY_WRITE-dax-access-mode.patch
  * using upstream patch to replace exist patch
    - bsc-1204596_02-drbd-stop-using-bdevname-in-drbd_report_io_error.patch
    + bsc-1204596_02-drbd-remove-usage-of-bdevname.patch
  * add new patches
    + bsc-1206791-01-drbd-add-comments-explaining-removal-of-bdi-congesti.patch
    + bsc-1206791-02-drbd-fix-static-analysis-warnings.patch
    + bsc-1206791-03-drbd-fix-warning-about-initializing-multiple-struct-.patch
    + bsc-1206791-04-blk_queue_split__no_present.patch
    + bsc-1206791-05-prandom_u32_max.patch
    + bsc-1206791-06-write_zeroes__no_capable.patch
    + bsc-1206791-07-drbd-fix-use-after-free-bugs-in-get_initial_state.patch
    + bsc-1206791-08-lib-lru_cache-Fixed-array-overflow-caused-by-incorre.patch
    + bsc-1206791-09-pmem-use-fs_dax_get_by_bdev-instead-of-dax_get_by_ho.patch

OBS-URL: https://build.opensuse.org/request/show/1056192
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=142
2023-01-05 13:24:33 +00:00
160fe7f38c Accepting request 1040468 from network:ha-clustering:Factory
OBS-URL: https://build.opensuse.org/request/show/1040468
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=100
2022-12-06 13:23:59 +00:00
039faa1c60 Accepting request 1040304 from home:lnussel:branches:network
- BuildRequire %kernel_module_package_buildreqs (boo#1205149)

OBS-URL: https://build.opensuse.org/request/show/1040304
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=141
2022-12-05 23:39:53 +00:00
94ea40b926 Accepting request 1030531 from network:ha-clustering:Factory
OBS-URL: https://build.opensuse.org/request/show/1030531
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=99
2022-10-22 14:33:15 +00:00
fb29c7bf26 Accepting request 1030530 from home:hmzhao:branches:network:ha-clustering:Factory
- drbd: build error against kernel v6.0.2 (bsc#1204596)
  - add patch:
    + bsc-1204596_01-block-remove-blk_cleanup_disk.patch
    + bsc-1204596_02-drbd-stop-using-bdevname-in-drbd_report_io_error.patch

OBS-URL: https://build.opensuse.org/request/show/1030530
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=140
2022-10-22 13:07:59 +00:00
93a0dc4712 Accepting request 998746 from network:ha-clustering:Factory
OBS-URL: https://build.opensuse.org/request/show/998746
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=98
2022-08-23 12:29:53 +00:00
8cb897e5f9 Accepting request 998745 from home:hmzhao:branches:network:ha-clustering:Factory
- drbd: build error against kernel v5.19 (bsc#1202600)
  - add patch:
    + bsc-1202600_01-remove-QUEUE_FLAG_DISCARD.patch
    + bsc-1202600_02-dax-introduce-DAX_RECOVERY_WRITE-dax-access-mode.patch
    + bsc-1202600_03-block-decouple-REQ_OP_SECURE_ERASE-from-REQ_OP_DISCA.patch
    + bsc-1202600_04-remove-assign_p_sizes_qlim.patch
  - For rpmbuild warning, modify symlink /usr/sbin/rcdrbd to relative path
    + drbd.spec

OBS-URL: https://build.opensuse.org/request/show/998745
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=139
2022-08-23 01:12:22 +00:00
7846ec924a Accepting request 989813 from network:ha-clustering:Factory
OBS-URL: https://build.opensuse.org/request/show/989813
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=97
2022-07-18 16:34:27 +00:00
a1185e0865 Accepting request 989810 from home:hmzhao:branches:network:ha-clustering:Factory
fix drbd.changes mistakes, which made before request 'declined' when pushing to opensuse:factory.

OBS-URL: https://build.opensuse.org/request/show/989810
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=138
2022-07-18 08:07:39 +00:00
Roger Zhou
1eb6b25c2a Accepting request 987977 from home:hmzhao:branches:network:ha-clustering:Factory
- drbd: build error against kernel v5.18 (bsc#1201335)
  - remove patch: move_bdi_from_request_queue_to_gendisk
  - change exist patches name from bsc#1192929:
    old name:
      make_block_holder_optional.patch
      move_kvmalloc_related_to_slab.patch
      polling_to_bio_base.patch
      pass_gend_to_blk_queue_update_readahead.patch
      dax_support.patch
      add_disk_error_handle.patch
      have_void_drbd_submit_bio.patch
      remove_bdgrab.patch
    new name:
      bsc-1192929_01-make_block_holder_optional.patch
      bsc-1192929_02-move_kvmalloc_related_to_slab.patch
      bsc-1192929_03-polling_to_bio_base.patch
      bsc-1192929_04-pass_gend_to_blk_queue_update_readahead.patch
      bsc-1192929_06-dax_support.patch
      bsc-1192929_07-add_disk_error_handle.patch
      bsc-1192929_08-have_void_drbd_submit_bio.patch
      bsc-1192929_09-remove_bdgrab.patch
  - add patch:
    + bsc-1201335_01-compat-test-and-cocci-patch-for-bdi-in-gendisk.patch
    + bsc-1201335_02-0001-compat-only-apply-bdi-pointer-patch-if-bdi-is-in-req.patch
    + bsc-1201335_03-genhd.patch
    + bsc-1201335_04-bio_alloc_bioset.patch
    + bsc-1201335_05-bio_alloc.patch
    + bsc-1201335_06-bdi.patch
    + bsc-1201335_07-write-same.patch
    + bsc-1201335_08-bio_clone_fast.patch

OBS-URL: https://build.opensuse.org/request/show/987977
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=137
2022-07-09 00:28:28 +00:00
9b83b250ff Accepting request 932872 from network:ha-clustering:Factory
OBS-URL: https://build.opensuse.org/request/show/932872
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=96
2021-11-22 22:04:03 +00:00
nick wang
43a00e1438 Accepting request 932870 from home:wanghaisu:branches:network:ha-clustering:Factory
bsc#1192929, compat to kernel v5.15

OBS-URL: https://build.opensuse.org/request/show/932870
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=136
2021-11-22 06:59:49 +00:00
f23e374dc5 Accepting request 909674 from network:ha-clustering:Factory
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/909674
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=95
2021-08-02 10:05:11 +00:00
nick wang
132c70a03d Accepting request 908344 from home:wanghaisu:branches:network:ha-clustering:Factory
Recommit 9.0.30 with patch for kernel 5.14rc1

OBS-URL: https://build.opensuse.org/request/show/908344
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=135
2021-07-26 06:16:08 +00:00
3a50233a65 Accepting request 907426 from network:ha-clustering:Factory
OBS-URL: https://build.opensuse.org/request/show/907426
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=94
2021-07-21 17:06:33 +00:00
nick wang
b04b5ff4a3 Accepting request 907423 from home:wanghaisu:branches:network:ha-clustering:Factory
Update to 9.0.30~1

OBS-URL: https://build.opensuse.org/request/show/907423
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=133
2021-07-21 07:09:53 +00:00
fd35c13bdf Accepting request 900786 from network:ha-clustering:Factory
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/900786
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=93
2021-06-19 21:04:14 +00:00
nick wang
c4415b9ea2 Accepting request 899518 from home:wanghaisu:branches:network:ha-clustering:Factory
Revert the version to 9.0.29

OBS-URL: https://build.opensuse.org/request/show/899518
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=131
2021-06-11 15:50:45 +00:00
Peter Varkoly
8d622e7b70 - Update to version 9.1.2
* drbd: fix termination of verify with stop sector
  * drbd: Fix locking for the drbd_devices idr
  * drbd: use DEFINE_MUTEX insteadm of mutex_init()
  * drbd: remove device_to_minor()
  * drbd: fix race condition resetting resync_next_bit
  * build: fix make; make clean; make; with pre-packaged compat.patch
  * compat: fix compat implementation of CRYPTO_TFM_NEED_KEY
  * drbd: remove non-existant argument from kerneldoc
  * drbd: kernel-doc and related fixes from upstream
  * drbd: Avoid comma separated statements

OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=130
2021-06-04 13:30:12 +00:00
84e35e06ef Accepting request 891196 from network:ha-clustering:Factory
OBS-URL: https://build.opensuse.org/request/show/891196
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=92
2021-05-07 14:45:44 +00:00
nick wang
0ea57caa91 Accepting request 891195 from home:wanghaisu:branches:network:ha-clustering:Factory
Update to 9.0.29 compat to kernel 5.12

OBS-URL: https://build.opensuse.org/request/show/891195
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=128
2021-05-07 06:33:06 +00:00
d772d01cc7 Accepting request 878476 from network:ha-clustering:Factory
OBS-URL: https://build.opensuse.org/request/show/878476
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=91
2021-03-12 12:33:31 +00:00
nick wang
7cbf74c985 Accepting request 878475 from home:wanghaisu:branches:network:ha-clustering:Factory
bsc#1183429, compat to kernel v5.11

OBS-URL: https://build.opensuse.org/request/show/878475
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=126
2021-03-12 07:49:59 +00:00
a670e5fa44 Accepting request 854413 from network:ha-clustering:Factory
OBS-URL: https://build.opensuse.org/request/show/854413
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=90
2020-12-10 14:58:47 +00:00
nick wang
c42d1c5129 Accepting request 854412 from home:wanghaisu:branches:network:ha-clustering:Factory
bsc#1179708, compat to kernel v5.10. version 9.0.26

OBS-URL: https://build.opensuse.org/request/show/854412
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=124
2020-12-10 03:34:38 +00:00
nick wang
8a631cf560 Accepting request 846101 from home:wanghaisu:branches:network:ha-clustering:Factory
Update fix-err-of-wrong-return-type.patch

OBS-URL: https://build.opensuse.org/request/show/846101
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=123
2020-11-05 04:19:35 +00:00
9994a59163 Accepting request 845860 from network:ha-clustering:Factory
OBS-URL: https://build.opensuse.org/request/show/845860
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=89
2020-11-04 17:27:30 +00:00
nick wang
e26ad2500c Accepting request 845859 from home:wanghaisu:branches:network:ha-clustering:Factory
bsc#1178388, build error with -Wreturn-type

OBS-URL: https://build.opensuse.org/request/show/845859
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=121
2020-11-04 05:22:39 +00:00
9bc1fec7f4 Accepting request 842703 from network:ha-clustering:Factory
OBS-URL: https://build.opensuse.org/request/show/842703
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=88
2020-10-20 14:15:21 +00:00
nick wang
eea075f12a Accepting request 842702 from home:wanghaisu:branches:network:ha-clustering:Factory
bsc#1177910, compat to kernel v5.9

OBS-URL: https://build.opensuse.org/request/show/842702
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=119
2020-10-20 07:36:25 +00:00
nick wang
466f0dcd56 osc copypac from project:home:wanghaisu:branches:Kernel:HEAD:KMP package:drbd revision:11
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=118
2020-10-20 03:18:21 +00:00
nick wang
86d3ab9e4c Accepting request 841110 from home:wanghaisu:branches:network:ha-clustering:Factory
Update suse-coccinelle patch

OBS-URL: https://build.opensuse.org/request/show/841110
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=117
2020-10-12 05:30:03 +00:00
58761eddfc Accepting request 835378 from network:ha-clustering:Factory
OBS-URL: https://build.opensuse.org/request/show/835378
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=87
2020-09-21 15:27:05 +00:00
nick wang
856d411622 Accepting request 835377 from home:wanghaisu:branches:network:ha-clustering:Factory
bsc#1175257, Update to 9.0.25~rc1

OBS-URL: https://build.opensuse.org/request/show/835377
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=115
2020-09-18 09:29:11 +00:00
nick wang
29fb152658 Accepting request 826569 from home:wanghaisu:branches:network:ha-clustering:Factory
bsc#1175257, compat to v5.8.0

OBS-URL: https://build.opensuse.org/request/show/826569
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=114
2020-08-14 03:04:57 +00:00
1ff640cbd6 Accepting request 813082 from network:ha-clustering:Factory
OBS-URL: https://build.opensuse.org/request/show/813082
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=86
2020-06-11 08:04:57 +00:00
nick wang
72ad06bdad Accepting request 813081 from home:wanghaisu:branches:network:ha-clustering:Factory
bsc#1172761, update to 9.0.23-1

OBS-URL: https://build.opensuse.org/request/show/813081
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=112
2020-06-10 04:15:17 +00:00
nick wang
9c489f3ad3 Accepting request 813078 from home:wanghaisu:branches:network:ha-clustering:Factory
Enable buildrt for Leap15.2 but TW.

OBS-URL: https://build.opensuse.org/request/show/813078
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=111
2020-06-10 03:27:13 +00:00
f105a5ae38 Accepting request 785806 from network:ha-clustering:Factory
OBS-URL: https://build.opensuse.org/request/show/785806
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=85
2020-03-17 12:11:18 +00:00
nick wang
7e21277260 Accepting request 785805 from home:wanghaisu:branches:network:ha-clustering:Factory
Remove useless patch.

OBS-URL: https://build.opensuse.org/request/show/785805
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=109
2020-03-17 06:14:48 +00:00
nick wang
8ae83885b1 Accepting request 783588 from network:ha-clustering:Unstable
bsc#1166298

OBS-URL: https://build.opensuse.org/request/show/783588
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=108
2020-03-11 03:00:26 +00:00
nick wang
5c20ec9cab Accepting request 778999 from network:ha-clustering:Unstable
Update to 9.0.21

OBS-URL: https://build.opensuse.org/request/show/778999
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=107
2020-02-25 09:53:38 +00:00
d8f747e343 Accepting request 762058 from network:ha-clustering:Factory
OBS-URL: https://build.opensuse.org/request/show/762058
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=84
2020-01-09 21:51:02 +00:00
nick wang
4fdf38b6cd Accepting request 762057 from home:wanghaisu:branches:network:ha-clustering:Factory
Update suse-coccinelle.patch

OBS-URL: https://build.opensuse.org/request/show/762057
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=105
2020-01-09 06:05:38 +00:00
nick wang
789c220c0e Accepting request 761065 from home:wanghaisu:branches:network:ha-clustering:Factory
Update the without_pr_warning.patch patch

OBS-URL: https://build.opensuse.org/request/show/761065
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=104
2020-01-06 07:05:08 +00:00
nick wang
285a9425d5 Accepting request 760597 from home:wanghaisu:branches:network:ha-clustering:Factory
bsc#1159786, fix build issue of v5.5

OBS-URL: https://build.opensuse.org/request/show/760597
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=103
2020-01-03 09:09:09 +00:00
034035f261 Accepting request 759283 from network:ha-clustering:Factory
OBS-URL: https://build.opensuse.org/request/show/759283
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=83
2019-12-27 12:49:19 +00:00
nick wang
d3e71354f1 Accepting request 759282 from home:wanghaisu:branches:network:ha-clustering:Factory
bsc#1159333, back port patch for duplicate resync.

OBS-URL: https://build.opensuse.org/request/show/759282
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=101
2019-12-26 08:02:23 +00:00
f89793bafe Accepting request 757253 from network:ha-clustering:Factory
OBS-URL: https://build.opensuse.org/request/show/757253
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=82
2019-12-16 14:20:31 +00:00
nick wang
a2b450528a Accepting request 757251 from network:ha-clustering:Unstable
bsc#1158446, fix metadata limit due to 64k page size of ppc64le.

OBS-URL: https://build.opensuse.org/request/show/757251
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=99
2019-12-16 06:39:41 +00:00
nick wang
0498b863bb Accepting request 740700 from home:RBrownSUSE:branches:network:ha-clustering:Factory
Remove obsolete Groups tag (fate#326485)

OBS-URL: https://build.opensuse.org/request/show/740700
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=98
2019-10-18 01:23:38 +00:00
76c68b5619 Accepting request 737345 from network:ha-clustering:Factory
OBS-URL: https://build.opensuse.org/request/show/737345
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=81
2019-10-11 13:20:10 +00:00
nick wang
48e7e51612 Accepting request 737344 from network:ha-clustering:Unstable
Update to 9.0.20-1

OBS-URL: https://build.opensuse.org/request/show/737344
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=96
2019-10-11 03:26:45 +00:00
841aa96012 Accepting request 732597 from network:ha-clustering:Factory
OBS-URL: https://build.opensuse.org/request/show/732597
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=80
2019-09-23 10:46:32 +00:00
nick wang
94234e2412 Accepting request 732557 from home:wanghaisu:branches:network:ha-clustering:Factory
bsc#1151579, fix coccinelle default path and obs service issue.

OBS-URL: https://build.opensuse.org/request/show/732557
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=94
2019-09-23 06:02:25 +00:00
8c3fc622bb Accepting request 729692 from network:ha-clustering:Factory
OBS-URL: https://build.opensuse.org/request/show/729692
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=79
2019-09-11 08:33:58 +00:00
nick wang
6ef3f2b5b0 Accepting request 729689 from home:jengelh:branches:network:ha-clustering:Factory
- Restore higher summary specifity.
- Drop old-age %clean, %defattr.

OBS-URL: https://build.opensuse.org/request/show/729689
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=92
2019-09-10 07:54:08 +00:00
e77111e87e Accepting request 729354 from network:ha-clustering:Factory
bsc#1149945, use drbd-9.0 for kernel 5.2+ support.

OBS-URL: https://build.opensuse.org/request/show/729354
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=78
2019-09-09 10:38:34 +00:00
nick wang
6e60e2a4f7 Accepting request 729346 from network:ha-clustering:Stable
bsc#1149945, use drbd-9.0 for kernel 5.2+ support.

OBS-URL: https://build.opensuse.org/request/show/729346
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=90
2019-09-09 08:04:57 +00:00
50f1945649 Accepting request 716725 from network:ha-clustering:Factory
OBS-URL: https://build.opensuse.org/request/show/716725
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=77
2019-07-21 09:33:58 +00:00
nick wang
4ac2a13ce4 Accepting request 716724 from network:ha-clustering:Unstable
9.0.19-1

OBS-URL: https://build.opensuse.org/request/show/716724
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=88
2019-07-19 06:51:58 +00:00
7ac1c13843 Accepting request 706974 from network:ha-clustering:Factory
OBS-URL: https://build.opensuse.org/request/show/706974
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=76
2019-06-03 16:51:09 +00:00
nick wang
b5889d912c Accepting request 706971 from network:ha-clustering:Stable
Update to 9.0.18

OBS-URL: https://build.opensuse.org/request/show/706971
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=86
2019-06-03 02:23:04 +00:00
f1ad3894c8 Accepting request 691396 from network:ha-clustering:Factory
OBS-URL: https://build.opensuse.org/request/show/691396
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=75
2019-04-04 10:08:55 +00:00
nick wang
db253bee42 Accepting request 691395 from network:ha-clustering:Unstable
Update to 9.0.17-1.

OBS-URL: https://build.opensuse.org/request/show/691395
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=84
2019-04-04 07:09:30 +00:00
b9487d99fe Accepting request 684507 from network:ha-clustering:Factory
OBS-URL: https://build.opensuse.org/request/show/684507
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=74
2019-03-13 08:16:36 +00:00
nick wang
2120f01a81 Accepting request 684506 from network:ha-clustering:Unstable
bsc#1118732, split brain handles malfunction when 2 primaries.

OBS-URL: https://build.opensuse.org/request/show/684506
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=82
2019-03-13 02:17:02 +00:00
70bd7e2f0c Accepting request 656770 from network:ha-clustering:Factory
OBS-URL: https://build.opensuse.org/request/show/656770
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=73
2018-12-11 14:47:56 +00:00
nick wang
912bc9ed41 Accepting request 656768 from network:ha-clustering:Stable
bsc#1118841, kernel compatible issue.

OBS-URL: https://build.opensuse.org/request/show/656768
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=80
2018-12-10 09:54:12 +00:00
b893dd4bdf Accepting request 650583 from network:ha-clustering:Factory
OBS-URL: https://build.opensuse.org/request/show/650583
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=72
2018-11-22 12:25:19 +00:00
nick wang
5c71beace2 Accepting request 650582 from home:wanghaisu:branches:network:ha-clustering:Factory
fix kernel compatible of sle15sp1, bsc#1116820.

OBS-URL: https://build.opensuse.org/request/show/650582
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=78
2018-11-21 08:55:22 +00:00
901b9fce17 Accepting request 648426 from network:ha-clustering:Factory
OBS-URL: https://build.opensuse.org/request/show/648426
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=71
2018-11-13 15:59:10 +00:00
nick wang
4cafd9f9e4 Accepting request 648425 from home:wanghaisu:branches:network:ha-clustering:Factory
Update with a bugid.

OBS-URL: https://build.opensuse.org/request/show/648425
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=76
2018-11-12 10:42:30 +00:00
26b9fe3ec9 Accepting request 644759 from network:ha-clustering:Factory
OBS-URL: https://build.opensuse.org/request/show/644759
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=70
2018-10-29 13:21:30 +00:00
nick wang
50c4f7c809 Accepting request 644758 from home:wanghaisu:branches:network:ha-clustering:Factory
Update to 9.0.16-1.

OBS-URL: https://build.opensuse.org/request/show/644758
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=74
2018-10-26 03:13:50 +00:00
68a5ac4522 Accepting request 629363 from network:ha-clustering:Factory
OBS-URL: https://build.opensuse.org/request/show/629363
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=69
2018-08-17 22:02:17 +00:00
nick wang
31a5d6a79d Accepting request 629335 from network:ha-clustering:Unstable
Update to 9.0.15

OBS-URL: https://build.opensuse.org/request/show/629335
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=72
2018-08-15 08:54:42 +00:00
f578ce008b Accepting request 603419 from network:ha-clustering:Factory
OBS-URL: https://build.opensuse.org/request/show/603419
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=68
2018-05-03 10:34:44 +00:00
nick wang
2da0b071cc Accepting request 603346 from network:ha-clustering:Unstable
Update to 9.0.14-1

OBS-URL: https://build.opensuse.org/request/show/603346
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=70
2018-05-03 05:55:03 +00:00
79847ac9e4 Accepting request 598069 from network:ha-clustering:Factory
OBS-URL: https://build.opensuse.org/request/show/598069
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=67
2018-04-19 13:32:50 +00:00
nick wang
2dedcb784d Accepting request 598065 from network:ha-clustering:Unstable
Update to 9.0.13 with bugID referenced.

OBS-URL: https://build.opensuse.org/request/show/598065
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=68
2018-04-19 08:26:43 +00:00
nick wang
201d6f194e Accepting request 597913 from network:ha-clustering:Unstable
Update to 9.0.13.

OBS-URL: https://build.opensuse.org/request/show/597913
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=67
2018-04-19 01:17:35 +00:00
fdb9bee090 Accepting request 575375 from network:ha-clustering:Factory
OBS-URL: https://build.opensuse.org/request/show/575375
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=66
2018-02-12 09:15:40 +00:00
nick wang
d6faf29d73 Accepting request 575374 from home:wanghaisu:branches:network:ha-clustering:Factory
bsc#1080458 and bsc#1080459, build with kernel-rt and support kernel 4.15.0

OBS-URL: https://build.opensuse.org/request/show/575374
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=65
2018-02-11 10:03:24 +00:00
2e332ac2b6 Accepting request 569415 from network:ha-clustering:Factory
OBS-URL: https://build.opensuse.org/request/show/569415
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=65
2018-01-25 11:41:29 +00:00
nick wang
2f644f3dcc Accepting request 569413 from network:ha-clustering:Unstable
Update to 9.0.12

OBS-URL: https://build.opensuse.org/request/show/569413
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=63
2018-01-25 02:44:48 +00:00
6ede445195 Accepting request 561048 from network:ha-clustering:Factory
OBS-URL: https://build.opensuse.org/request/show/561048
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=64
2018-01-02 15:35:04 +00:00
nick wang
4663d95645 Accepting request 561047 from home:wanghaisu:branches:network:ha-clustering:Factory
Change changelog

OBS-URL: https://build.opensuse.org/request/show/561047
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=61
2018-01-02 02:38:32 +00:00
nick wang
26cfd8f798 Accepting request 560267 from network:ha-clustering:Stable
Update the bug number.

OBS-URL: https://build.opensuse.org/request/show/560267
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=60
2017-12-28 09:53:16 +00:00
7723960b4f Accepting request 542525 from network:ha-clustering:Factory
OBS-URL: https://build.opensuse.org/request/show/542525
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=63
2017-11-17 09:57:34 +00:00
nick wang
dc163d72b4 Accepting request 542522 from network:ha-clustering:Unstable
bsc#1068587, add build request libelf-devel to build.

OBS-URL: https://build.opensuse.org/request/show/542522
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=58
2017-11-17 03:55:51 +00:00
2a365161c3 Accepting request 533374 from network:ha-clustering:Factory
1

OBS-URL: https://build.opensuse.org/request/show/533374
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=62
2017-10-13 12:18:27 +00:00
nick wang
563be55218 Accepting request 533373 from home:wanghaisu:branches:network:ha-clustering:Factory
bsc#1062749, disable buildrt against SLE15 x86_64 temporarily.

OBS-URL: https://build.opensuse.org/request/show/533373
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=56
2017-10-11 10:53:39 +00:00
4f01e647ba Accepting request 532109 from network:ha-clustering:Factory
1

OBS-URL: https://build.opensuse.org/request/show/532109
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=61
2017-10-07 15:50:44 +00:00
nick wang
760895e2d0 Accepting request 532108 from home:wanghaisu:branches:network:ha-clustering:Factory
bsc#1061981, update to 9.0.9

OBS-URL: https://build.opensuse.org/request/show/532108
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=54
2017-10-06 07:59:30 +00:00
bd45d7ba45 Accepting request 511431 from network:ha-clustering:Factory
1

OBS-URL: https://build.opensuse.org/request/show/511431
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=60
2017-07-21 20:49:43 +00:00
nick wang
984d8f8306 Accepting request 511366 from home:wanghaisu:branches:network:ha-clustering:Factory
Add missing reproducible.patch based on Bernhard's patch in mailing list.

OBS-URL: https://build.opensuse.org/request/show/511366
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=52
2017-07-19 14:13:03 +00:00
Lars Marowsky-Bree
c3b1cc4105 Accepting request 511346 from home:bmwiedemann:branches:network:ha-clustering:Factory
Add reproducible.patch to sort file lists (boo#1041090)
  and to override build date (boo#1047218) to fix build-compare

OBS-URL: https://build.opensuse.org/request/show/511346
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=51
2017-07-19 07:00:23 +00:00
ce85cb0ff7 Accepting request 505630 from network:ha-clustering:Factory
1

OBS-URL: https://build.opensuse.org/request/show/505630
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=59
2017-06-23 07:18:17 +00:00
nick wang
5d7f6b839f Accepting request 505625 from network:ha-clustering:Unstable
bsc#1045473, update to 9.0.8

OBS-URL: https://build.opensuse.org/request/show/505625
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=49
2017-06-22 08:38:38 +00:00
7ff6cdb1ce Accepting request 498239 from network:ha-clustering:Factory
1

OBS-URL: https://build.opensuse.org/request/show/498239
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=58
2017-05-29 20:19:22 +00:00
nick wang
283d692841 Accepting request 498238 from home:wanghaisu:branches:network:ha-clustering:Factory
fix bsc#1038852, initial sync not triggered.

OBS-URL: https://build.opensuse.org/request/show/498238
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=47
2017-05-25 08:04:01 +00:00
72f62bf326 Accepting request 491392 from network:ha-clustering:Factory
1

OBS-URL: https://build.opensuse.org/request/show/491392
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=57
2017-04-28 07:14:08 +00:00
nick wang
143b09ce28 Accepting request 491391 from home:wanghaisu:branches:network:ha-clustering:Factory
Update to 9.0.7(rc2) and change drbd-utils requirement to 8.9.11. bsc#1028124

OBS-URL: https://build.opensuse.org/request/show/491391
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=45
2017-04-27 05:49:48 +00:00
nick wang
97165c6dae Accepting request 491389 from home:wanghaisu:branches:network:ha-clustering:Factory
Update to 9.0.7(rc2) and change drbd-utils requirement to 8.9.11. bsc#1028124

OBS-URL: https://build.opensuse.org/request/show/491389
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=44
2017-04-27 05:42:21 +00:00
c59849f504 Accepting request 483268 from network:ha-clustering:Factory
1

OBS-URL: https://build.opensuse.org/request/show/483268
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=56
2017-04-12 15:33:42 +00:00
nick wang
9459466ff0 Accepting request 483262 from network:ha-clustering:Unstable
Upgrade to 9.0.7 for ra support and kernel compatible of bsc#1031299.

OBS-URL: https://build.opensuse.org/request/show/483262
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=42
2017-03-29 08:55:06 +00:00
nick wang
8d94f3de52 Accepting request 459400 from home:wanghaisu:branches:network:ha-clustering:Factory
Leave buildrt as for 1 for the non opensuse x86_64 case.

OBS-URL: https://build.opensuse.org/request/show/459400
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=41
2017-02-21 03:05:43 +00:00
nick wang
e712a12b7e Accepting request 457612 from home:wanghaisu:branches:network:ha-clustering:Factory
Upgrade to upstream 9.0.6

OBS-URL: https://build.opensuse.org/request/show/457612
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=40
2017-02-16 07:27:47 +00:00
453d3ebd86 Accepting request 444094 from network:ha-clustering:Factory
1

OBS-URL: https://build.opensuse.org/request/show/444094
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=55
2016-12-07 23:31:06 +00:00
nick wang
cc3b3800d1 Accepting request 444093 from home:wanghaisu:branches:network:ha-clustering:Factory
bsc#1013844, RT KMP build must be restricted to SLE.

OBS-URL: https://build.opensuse.org/request/show/444093
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=38
2016-12-06 10:22:12 +00:00
40e122744f Accepting request 437368 from network:ha-clustering:Factory
1

OBS-URL: https://build.opensuse.org/request/show/437368
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=54
2016-10-26 11:29:47 +00:00
nick wang
73a7d7f261 Accepting request 437365 from home:wanghaisu:branches:network:ha-clustering:Factory
bsc#1006176, compat with kernel 4.8 with 9.0.5

OBS-URL: https://build.opensuse.org/request/show/437365
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=36
2016-10-26 03:56:30 +00:00
583bb11686 Accepting request 401796 from network:ha-clustering:Factory
Failed to build drbd 9.0.1 against kernel 4.6/4.7-rc2, bsc#983633.

OBS-URL: https://build.opensuse.org/request/show/401796
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=53
2016-06-14 21:08:52 +00:00
nick wang
524400d0e7 Accepting request 401378 from home:wanghaisu:branches:network:ha-clustering:Factory
bsc#983633, upgrade to ver9.0.2 to build against kernel 4.6/4.7-rc2

OBS-URL: https://build.opensuse.org/request/show/401378
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=34
2016-06-12 08:21:48 +00:00
f5a3400700 Accepting request 389508 from network:ha-clustering:Factory
1

OBS-URL: https://build.opensuse.org/request/show/389508
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=52
2016-04-22 14:24:35 +00:00
nick wang
18bba12a8c Accepting request 389505 from home:wanghaisu:branches:network:ha-clustering:Factory
Add drbd-buildcompare and using specific version number.

OBS-URL: https://build.opensuse.org/request/show/389505
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=32
2016-04-13 13:59:10 +00:00
nick wang
f9dc362b8e Accepting request 389406 from home:wanghaisu:branches:network:ha-clustering:Factory
Update to drbd9.

OBS-URL: https://build.opensuse.org/request/show/389406
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=31
2016-04-13 12:42:42 +00:00
efc1155223 Accepting request 369891 from network:ha-clustering:Factory
1

OBS-URL: https://build.opensuse.org/request/show/369891
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=51
2016-03-16 09:35:30 +00:00
nick wang
6a9bae1c9e Accepting request 369888 from home:wanghaisu:branches:network:ha-clustering:Factory
Modify the patch name in changelog.

OBS-URL: https://build.opensuse.org/request/show/369888
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=29
2016-03-11 09:09:49 +00:00
nick wang
46b07bd4dc Accepting request 367632 from home:olh:branches:network:ha-clustering:Factory
- Remove timstamp from binaries
  ddd-buildcompare.patch

OBS-URL: https://build.opensuse.org/request/show/367632
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=28
2016-03-11 03:14:17 +00:00
6b5e46704b Accepting request 345344 from network:ha-clustering:Factory
1

OBS-URL: https://build.opensuse.org/request/show/345344
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=50
2015-11-26 16:01:28 +00:00
nick wang
b91e658262 Accepting request 345343 from home:wanghaisu:branches:network:ha-clustering:Factory
BSC#955968, support GFP_RECLAIM in kernel4.4

OBS-URL: https://build.opensuse.org/request/show/345343
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=26
2015-11-20 07:02:54 +00:00
543d9db109 Accepting request 340343 from network:ha-clustering:Factory
1

OBS-URL: https://build.opensuse.org/request/show/340343
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=49
2015-10-30 12:43:03 +00:00
nick wang
bc955caa4a Accepting request 340342 from home:wanghaisu:branches:network:ha-clustering:Factory
BSC#950477, support new bio struct in kernel4.3

OBS-URL: https://build.opensuse.org/request/show/340342
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=24
2015-10-22 08:01:29 +00:00
0e028f6e19 Accepting request 339249 from network:ha-clustering:Factory
1

OBS-URL: https://build.opensuse.org/request/show/339249
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=48
2015-10-19 20:51:52 +00:00
nick wang
c6df818c4c Accepting request 339247 from home:wanghaisu:branches:network:ha-clustering:Factory
Update original patch name to changelog.

OBS-URL: https://build.opensuse.org/request/show/339247
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=22
2015-10-16 09:43:46 +00:00
nick wang
c59288e1c5 Accepting request 339242 from home:wanghaisu:branches:network:ha-clustering:Factory
BSC#950477, update to 8.4.6-5 to fix bdi congested.

OBS-URL: https://build.opensuse.org/request/show/339242
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=21
2015-10-16 09:34:13 +00:00
Stephan Kulow
f489baa90f Accepting request 334152 from network:ha-clustering:Factory
1

OBS-URL: https://build.opensuse.org/request/show/334152
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=47
2015-09-30 03:52:48 +00:00
nick wang
b91458c9bb Accepting request 333548 from home:wanghaisu:branches:network:ha-clustering:Factory
BSC#947460, add rcdrbd symlink.

OBS-URL: https://build.opensuse.org/request/show/333548
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=19
2015-09-28 02:50:59 +00:00
bcdfb8b628 Accepting request 324253 from network:ha-clustering:Factory
1

OBS-URL: https://build.opensuse.org/request/show/324253
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=46
2015-08-21 05:41:18 +00:00
nick wang
428f2cbe4b Accepting request 324251 from home:wanghaisu:branches:network:ha-clustering:Factory
Fate#317940. Merge into one patch. Support zeroout/discard instead of zap-devices.

OBS-URL: https://build.opensuse.org/request/show/324251
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=17
2015-08-19 09:34:13 +00:00
cffb3f96c9 Accepting request 319182 from network:ha-clustering:Factory
1

OBS-URL: https://build.opensuse.org/request/show/319182
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=45
2015-08-01 09:37:54 +00:00
nick wang
e327903f6c Accepting request 319181 from home:wanghaisu:branches:network:ha-clustering:Factory
BSC#939778. Add obsoletes and a description for kmp package.

OBS-URL: https://build.opensuse.org/request/show/319181
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=15
2015-07-29 01:10:03 +00:00
Stephan Kulow
7e1e97ef29 Accepting request 318290 from network:ha-clustering:Factory
1

OBS-URL: https://build.opensuse.org/request/show/318290
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=44
2015-07-25 05:44:30 +00:00
Stephan Kulow
7e4c01e0c9 Accepting request 175254 from Base:System
Fix for https://build.opensuse.org/request/show/174892 

- Make /etc/xen mode 0700 to protect vnc passwords. (forwarded request 175231 from olh)

OBS-URL: https://build.opensuse.org/request/show/175254
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=41
2013-05-13 15:03:54 +00:00
Stephan Kulow
66ad1cdeb8 Accepting request 127449 from Base:System
(forwarded request 127448 from tserong)

OBS-URL: https://build.opensuse.org/request/show/127449
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=39
2012-07-10 11:41:01 +00:00
Stephan Kulow
8b1ddb6695 Accepting request 96973 from Base:System
- update to 8.3.11 (bnc#734432) (forwarded request 96823 from tserong)

OBS-URL: https://build.opensuse.org/request/show/96973
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=37
2011-12-21 08:59:54 +00:00
Stephan Kulow
4bb004e99c replace license with spdx.org variant
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=36
2011-12-06 17:07:06 +00:00
Sascha Peilicke
07c0802440 Accepting request 83741 from Base:System
- Remove redundant tags/sections from specfile
  (cf. packaging guidelines) (forwarded request 83298 from jengelh)

OBS-URL: https://build.opensuse.org/request/show/83741
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=34
2011-09-20 10:52:27 +00:00
Sascha Peilicke
ba6eb8da46 Autobuild autoformatter for 63750
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=33
2011-03-10 11:48:22 +00:00
Sascha Peilicke
4d5f3d6227 Accepting request 63750 from Base:System
Accepted submit request 63750 from user coolo

OBS-URL: https://build.opensuse.org/request/show/63750
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=32
2011-03-10 11:48:15 +00:00
OBS User autobuild
b090ba1522 Autobuild autoformatter for 51252
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=30
2010-10-22 14:29:05 +00:00
Ruediger Oertel
f4cdf5fa08 Accepting request 51252 from Base:System
Accepted submit request 51252 from user elvigia

OBS-URL: https://build.opensuse.org/request/show/51252
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=29
2010-10-22 14:28:59 +00:00
OBS User autobuild
1e0191cb11 Accepting request 42070 from Base:System
Copy from Base:System/drbd based on submit request 42070 from user prusnak

OBS-URL: https://build.opensuse.org/request/show/42070
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=26
2010-06-28 10:17:10 +00:00
OBS User autobuild
267ac243e6 Accepting request 37680 from Base:System
Copy from Base:System/drbd based on submit request 37680 from user dirkmueller

OBS-URL: https://build.opensuse.org/request/show/37680
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=25
2010-04-15 22:07:17 +00:00
OBS User autobuild
cb631d75e5 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=24 2010-03-18 14:43:20 +00:00
OBS User autobuild
e9a533f199 Accepting request 28925 from Base:System
Copy from Base:System/drbd based on submit request 28925 from user coolo

OBS-URL: https://build.opensuse.org/request/show/28925
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=23
2010-01-12 14:49:32 +00:00
OBS User autobuild
e6120ecd85 Accepting request 22102 from Base:System
Copy from Base:System/drbd based on submit request 22102 from user coolo

OBS-URL: https://build.opensuse.org/request/show/22102
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=21
2009-10-08 16:11:31 +00:00
OBS User unknown
84b91368c6 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=20 2009-07-27 22:07:02 +00:00
OBS User unknown
f611f503ea OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=19 2009-07-16 23:54:43 +00:00
OBS User unknown
36ca4a242f OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=18 2009-04-19 23:50:05 +00:00
OBS User unknown
48cd784266 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=17 2009-01-13 17:43:34 +00:00
OBS User unknown
8a0ee48501 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=16 2008-12-15 11:27:19 +00:00
OBS User unknown
2071e3b20c OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=15 2008-11-21 14:15:51 +00:00
OBS User unknown
1db16c94d5 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=14 2008-10-27 15:44:50 +00:00
OBS User unknown
26278b6a17 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=13 2008-09-04 22:35:51 +00:00
OBS User unknown
e81599df6b OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=12 2008-08-18 16:28:48 +00:00
OBS User unknown
076660183a OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=11 2008-07-15 19:29:07 +00:00
OBS User unknown
33c0e4de42 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=10 2008-06-04 11:07:09 +00:00
OBS User unknown
e276857a62 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=9 2008-06-03 20:04:53 +00:00
OBS User unknown
cb75e831ed OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=8 2008-04-15 13:34:25 +00:00
OBS User unknown
baae30a30d OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=7 2007-12-05 23:03:37 +00:00
OBS User unknown
3e4cc222d1 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=6 2007-09-18 10:08:16 +00:00
OBS User unknown
44c2da2968 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=5 2007-09-17 15:10:20 +00:00
OBS User unknown
8b947bef08 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=4 2007-04-04 20:13:40 +00:00
OBS User unknown
ce5c551480 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=3 2007-03-30 14:29:03 +00:00
OBS User unknown
ab7625a8b0 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=2 2007-03-30 00:32:51 +00:00
OBS User unknown
2650be5163 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd?expand=0&rev=1 2007-01-15 09:53:19 +00:00
38 changed files with 752 additions and 4103 deletions

View File

@@ -0,0 +1,122 @@
From a74b9bf08912945c1548c1ba675952bd97c9f84b Mon Sep 17 00:00:00 2001
From: Philipp Reisner <philipp.reisner@linbit.com>
Date: Wed, 9 Apr 2025 17:49:38 +0200
Subject: [PATCH] compat: follow Linux-6.14 (debugfs_change_name())
Apart from following the obvious name change from debugfs_rename() to
debugfs_change_name(), the fallthrough compat test showed an
unintentional compilation error since there was no second case label
after the fallthrough statement.
---
.../debugfs_change_name__no_present.cocci | 18 ++++++++++++++++++
drbd/drbd-kernel-compat/gen_patch_names.c | 3 +++
.../tests/have_debugfs_change_name.c | 9 +++++++++
.../tests/have_fallthrough.c | 11 +++++++++--
drbd/drbd_debugfs.c | 10 +++-------
5 files changed, 42 insertions(+), 9 deletions(-)
create mode 100644 drbd/drbd-kernel-compat/cocci/debugfs_change_name__no_present.cocci
create mode 100644 drbd/drbd-kernel-compat/tests/have_debugfs_change_name.c
diff --git a/drbd/drbd-kernel-compat/cocci/debugfs_change_name__no_present.cocci b/drbd/drbd-kernel-compat/cocci/debugfs_change_name__no_present.cocci
new file mode 100644
index 000000000000..1f40061b71a4
--- /dev/null
+++ b/drbd/drbd-kernel-compat/cocci/debugfs_change_name__no_present.cocci
@@ -0,0 +1,18 @@
+@@
+identifier err, resource, new_name;
+@@
+void drbd_debugfs_resource_rename(struct drbd_resource *resource, const char *new_name)
+{
+- int err;
++ struct dentry *new_d;
+
+- err = debugfs_change_name(resource->debugfs_res, "%s", new_name);
+- if (err)
++ new_d = debugfs_rename(drbd_debugfs_resources, resource->debugfs_res,
++ drbd_debugfs_resources, new_name);
++ if (IS_ERR(new_d)) {
+ drbd_err(resource, ... );
++ } else {
++ resource->debugfs_res = new_d;
++ }
+}
diff --git a/drbd/drbd-kernel-compat/gen_patch_names.c b/drbd/drbd-kernel-compat/gen_patch_names.c
index 199ce0845f4d..3e9493527b13 100644
--- a/drbd/drbd-kernel-compat/gen_patch_names.c
+++ b/drbd/drbd-kernel-compat/gen_patch_names.c
@@ -632,6 +632,9 @@ int main(int argc, char **argv)
patch(1, "genlmsg_multicast_allns", true, false,
COMPAT_GENLMSG_MULTICAST_ALLNS_HAS_4_PARAMS, "has_4_params");
+ patch(1, "debugfs_change_name", true, false,
+ COMPAT_HAVE_DEBUGFS_CHANGE_NAME, "present");
+
/* #define BLKDEV_ISSUE_ZEROOUT_EXPORTED */
/* #define BLKDEV_ZERO_NOUNMAP */
diff --git a/drbd/drbd-kernel-compat/tests/have_debugfs_change_name.c b/drbd/drbd-kernel-compat/tests/have_debugfs_change_name.c
new file mode 100644
index 000000000000..5fb1ae2da636
--- /dev/null
+++ b/drbd/drbd-kernel-compat/tests/have_debugfs_change_name.c
@@ -0,0 +1,9 @@
+/* { "version": "v6.13-rc7", "commit": "f7862dfef6612b87b2ad8352c4d73886f09456d6", "comment": "debugfs_chnage_name() replaces debugfs_rename()", "author": "Al Viro <viro@zeniv.linux.org.uk>", "date": "Sun Jan 12 08:07:05 2025 +0000" } */
+
+#include <linux/debugfs.h>
+
+int foo(const char *s);
+int foo(const char *s)
+{
+ return debugfs_change_name(NULL, "%s", s);
+}
diff --git a/drbd/drbd-kernel-compat/tests/have_fallthrough.c b/drbd/drbd-kernel-compat/tests/have_fallthrough.c
index a5299a0fc8ff..e44dd353e469 100644
--- a/drbd/drbd-kernel-compat/tests/have_fallthrough.c
+++ b/drbd/drbd-kernel-compat/tests/have_fallthrough.c
@@ -2,10 +2,17 @@
#include <linux/compiler_attributes.h>
-void foo(void)
+int foo(int i); /* Avoid warning about missing function prototype */
+int foo(int i)
{
- switch(0) {
+ int y = 0;
+
+ switch(i) {
case 0:
fallthrough;
+ case 1:
+ y = i;
}
+
+ return y;
}
diff --git a/drbd/drbd_debugfs.c b/drbd/drbd_debugfs.c
index 3f48dbee4e9a..6809d097bf52 100644
--- a/drbd/drbd_debugfs.c
+++ b/drbd/drbd_debugfs.c
@@ -771,15 +771,11 @@ void drbd_debugfs_resource_cleanup(struct drbd_resource *resource)
void drbd_debugfs_resource_rename(struct drbd_resource *resource, const char *new_name)
{
- struct dentry *new_d;
+ int err;
- new_d = debugfs_rename(drbd_debugfs_resources, resource->debugfs_res,
- drbd_debugfs_resources, new_name);
- if (IS_ERR(new_d)) {
+ err = debugfs_change_name(resource->debugfs_res, "%s", new_name);
+ if (err)
drbd_err(resource, "failed to rename debugfs entry for resource\n");
- } else {
- resource->debugfs_res = new_d;
- }
}
static void seq_print_one_timing_detail(struct seq_file *m,
--
2.39.5 (Apple Git-154)

View File

@@ -0,0 +1,81 @@
From d64ebe7eb7df8c622b20bca38f3d7f4c7bb033c9 Mon Sep 17 00:00:00 2001
From: "zhengbing.huang" <zhengbing.huang@easystack.cn>
Date: Sun, 15 Dec 2024 14:50:56 +0800
Subject: [PATCH] drbd: Fix memory leak
In the output of kmemleak, we have the followe backtrace:
unreferenced object 0xffff8885b57cda80 (size 64):
comm "drbd_r_testimg4", pid 37104, jiffies 4494192827 (age 127162.843s)
hex dump (first 32 bytes):
31 20 6f 66 20 32 20 6e 6f 64 65 73 20 76 69 73 1 of 2 nodes vis
69 62 6c 65 2c 20 6e 65 65 64 20 32 20 66 6f 72 ible, need 2 for
backtrace:
[<000000006d641d68>] __kmalloc_track_caller+0x15c/0x270
[<000000006a7ffbcf>] kvasprintf+0xa7/0x120
[<000000002d2f15b3>] drbd_state_err+0xa9/0x190 [drbd]
[<000000006aa2f3df>] __is_valid_soft_transition+0xe99/0xec0 [drbd]
[<0000000009d68cc7>] try_state_change+0x4f0/0x840 [drbd]
[<00000000d5640f06>] ___end_state_change+0x140/0x12a0 [drbd]
[<000000009f4b8d71>] __end_state_change+0xa1/0x130 [drbd]
[<000000001c6de1a7>] change_connection_state+0x5ee/0xbd0 [drbd]
[<00000000ce4408d6>] process_twopc+0x1d3e/0x2ce0 [drbd]
[<00000000df3af6e8>] receive_twopc+0x17b/0x2b0 [drbd]
[<000000009701f919>] drbd_receiver+0x311/0x6e0 [drbd]
[<0000000092c4aeb1>] drbd_thread_setup+0x19d/0x430 [drbd]
[<0000000098e316ab>] kthread+0x19c/0x1c0
[<000000004c72b3a8>] ret_from_fork+0x1f/0x40
This is a memory leak.
In drbd_state_err() function, if resource->state_change_err_str is a null pointer,
the err_str will not be free.
And _drbd_state_err() has same issues.
So, if err_str has not put to up layer, free it in current function.
Signed-off-by: zhengbing.huang <zhengbing.huang@easystack.cn>
Signed-off-by: Joel Colledge <joel.colledge@linbit.com>
---
drbd/drbd_state.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/drbd/drbd_state.c b/drbd/drbd_state.c
index f498eaa60396..0e693c8e3af0 100644
--- a/drbd/drbd_state.c
+++ b/drbd/drbd_state.c
@@ -1557,10 +1557,13 @@ static __printf(2, 3) void _drbd_state_err(struct change_context *context, const
va_end(args);
if (!err_str)
return;
- if (context->err_str)
- *context->err_str = err_str;
if (context->flags & CS_VERBOSE)
drbd_err(resource, "%s\n", err_str);
+
+ if (context->err_str)
+ *context->err_str = err_str;
+ else
+ kfree(err_str);
}
static __printf(2, 3) void drbd_state_err(struct drbd_resource *resource, const char *fmt, ...)
@@ -1573,10 +1576,13 @@ static __printf(2, 3) void drbd_state_err(struct drbd_resource *resource, const
va_end(args);
if (!err_str)
return;
- if (resource->state_change_err_str)
- *resource->state_change_err_str = err_str;
if (resource->state_change_flags & CS_VERBOSE)
drbd_err(resource, "%s\n", err_str);
+
+ if (resource->state_change_err_str)
+ *resource->state_change_err_str = err_str;
+ else
+ kfree(err_str);
}
static enum drbd_state_rv __is_valid_soft_transition(struct drbd_resource *resource)
--
2.43.0

View File

@@ -1,37 +0,0 @@
From 0dda200877d1b801fba948a5948f321bee1a75a9 Mon Sep 17 00:00:00 2001
From: Philipp Reisner <philipp.reisner@linbit.com>
Date: Fri, 1 Sep 2023 08:03:01 +0200
Subject: [PATCH 01/20] drbd: allow transports to take additional krefs on a
listener
by making the drbd_listener_destroy() available to the transports.
heming.zhao@suse.com
- For compiling drbd, I modified this patch. please differ with upstream
to find changes.
---
drbd/drbd_transport.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drbd/drbd_transport.c b/drbd/drbd_transport.c
index d1ec5724dec6..416a50499046 100644
--- a/drbd/drbd_transport.c
+++ b/drbd/drbd_transport.c
@@ -223,7 +223,7 @@ int drbd_get_listener(struct drbd_transport *transport, struct drbd_path *path,
return err;
}
-static void drbd_listener_destroy(struct kref *kref)
+void drbd_listener_destroy(struct kref *kref)
{
struct drbd_listener *listener = container_of(kref, struct drbd_listener, kref);
struct drbd_resource *resource = listener->resource;
@@ -331,3 +331,4 @@ EXPORT_SYMBOL_GPL(drbd_find_path_by_addr);
EXPORT_SYMBOL_GPL(drbd_stream_send_timed_out);
EXPORT_SYMBOL_GPL(drbd_should_abort_listening);
EXPORT_SYMBOL_GPL(drbd_path_event);
+EXPORT_SYMBOL_GPL(drbd_listener_destroy);
--
2.35.3

View File

@@ -0,0 +1,50 @@
From e9d033122c939a3a522624a78bae9e4ee032c85b Mon Sep 17 00:00:00 2001
From: Lars Ellenberg <lars.ellenberg@linbit.com>
Date: Thu, 27 Feb 2025 14:07:44 +0100
Subject: [PATCH] drbd: build: deal with potentially relative paths in prep
step
since linux 13b25489b6f8b (kbuild: change working directory to external module directory with M=, 2024-11-10)
some Kbuild make variables may be relative paths.
Wrap them in $(abspath) as necessary.
---
drbd/Kbuild | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/drbd/Kbuild b/drbd/Kbuild
index ade25d4ee70a..80ec69dcce79 100644
--- a/drbd/Kbuild
+++ b/drbd/Kbuild
@@ -164,7 +164,7 @@ quiet_cmd_splitdiff = SPLIT $<
cmd_splitdiff = \
mkdir -p $(patches-dir) \
&& cd $(patches-dir) \
- && $(PERL) $(src)/drbd-kernel-compat/splitdiff.pl < $<
+ && $(PERL) $(abspath $(src))/drbd-kernel-compat/splitdiff.pl < $(abspath $<)
annotate-orig-pos := \
$(src)/drbd-kernel-compat/annotate-diff-with-original-file-position-pragmas.pl
@@ -188,13 +188,14 @@ quiet_cmd_apply_compat_patch = PATCH $@
if test -s $$patch ; then \
$(PATCH) --output $$out.tmp $$orig $$patch ; \
diff -u $$orig $$out.tmp | \
- DRBDSRC=$(src) \
- OUTDIR=$(obj.build) \
- PATCHES_DIR=$(patches-dir) \
- $(PERL) $(annotate-orig-pos) \
- | $(PATCH) --output $$out $$orig ; \
+ DRBDSRC=$(abspath $(src)) \
+ OUTDIR=$(abspath $(obj.build)) \
+ PATCHES_DIR=$(abspath $(patches-dir)) \
+ $(PERL) $(annotate-orig-pos) > $$out.annotated; \
+ $(PATCH) --output $$out $$orig < $$out.annotated; \
chmod --reference $$orig $$out ; \
: rm -f $$out.tmp; \
+ : rm -f $$out.annotated; \
else { echo "\# 1 \"$$orig\""; cat $$orig; } > $$out; fi
orig-source = $(src)/$(s)
--
2.48.1

View File

@@ -1,65 +0,0 @@
From f2cd05b8d60d27f43b07175b92ef4c2a69b8e3a2 Mon Sep 17 00:00:00 2001
From: Joel Colledge <joel.colledge@linbit.com>
Date: Wed, 6 Sep 2023 15:49:44 +0200
Subject: [PATCH 02/20] drbd: improve decision about marking a failed disk
Outdated
Sometimes it is possible to update the metadata even after our disk has
failed. We were too eager to remove the MDF_WAS_UP_TO_DATE flag in this
case.
Firstly, we used the "NOW" states, so would mark our metadata Outdated
if we were a Primary with UpToDate data and no peers, and our disk
failed. Use the "NEW" states instead.
Secondly, do not consider peers that are disconnecting, because they
will not see that our disk state is Failed, and so will outdate
themselves. We do not want to outdate both nodes in this situation.
---
drbd/drbd_state.c | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/drbd/drbd_state.c b/drbd/drbd_state.c
index 7e6e3477893d..8b60afeb097b 100644
--- a/drbd/drbd_state.c
+++ b/drbd/drbd_state.c
@@ -2489,15 +2489,24 @@ static void initialize_resync(struct drbd_peer_device *peer_device)
/* Is there a primary with access to up to date data known */
static bool primary_and_data_present(struct drbd_device *device)
{
- bool up_to_date_data = device->disk_state[NOW] == D_UP_TO_DATE;
- bool primary = device->resource->role[NOW] == R_PRIMARY;
+ bool up_to_date_data = device->disk_state[NEW] == D_UP_TO_DATE;
+ struct drbd_resource *resource = device->resource;
+ bool primary = resource->role[NEW] == R_PRIMARY;
struct drbd_peer_device *peer_device;
for_each_peer_device(peer_device, device) {
- if (peer_device->connection->peer_role[NOW] == R_PRIMARY)
+ struct drbd_connection *connection = peer_device->connection;
+
+ /* Do not consider the peer if we are disconnecting. */
+ if (resource->remote_state_change &&
+ drbd_twopc_between_peer_and_me(connection) &&
+ resource->twopc_reply.is_disconnect)
+ continue;
+
+ if (connection->peer_role[NEW] == R_PRIMARY)
primary = true;
- if (peer_device->disk_state[NOW] == D_UP_TO_DATE)
+ if (peer_device->disk_state[NEW] == D_UP_TO_DATE)
up_to_date_data = true;
}
@@ -4808,6 +4817,7 @@ change_cluster_wide_state(bool (*change)(struct change_context *, enum change_ph
} else if (context->mask.conn == conn_MASK && context->val.conn == C_DISCONNECTING) {
reply->target_reachable_nodes = NODE_MASK(context->target_node_id);
reply->reachable_nodes &= ~reply->target_reachable_nodes;
+ reply->is_disconnect = 1;
} else {
reply->target_reachable_nodes = reply->reachable_nodes;
}
--
2.35.3

View File

@@ -1,32 +0,0 @@
From fbfb92d11e64daec167b24521c715ceab505b55d Mon Sep 17 00:00:00 2001
From: Philipp Reisner <philipp.reisner@linbit.com>
Date: Thu, 7 Sep 2023 10:36:29 +0200
Subject: [PATCH 03/20] drbd: fix error path in drbd_get_listener()
When initializing a listener fails do not access the fields of the
listener struct after giving up the reference.
---
drbd/drbd_transport.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drbd/drbd_transport.c b/drbd/drbd_transport.c
index 416a50499046..2aefd71ee395 100644
--- a/drbd/drbd_transport.c
+++ b/drbd/drbd_transport.c
@@ -207,11 +207,11 @@ int drbd_get_listener(struct drbd_transport *transport, struct drbd_path *path,
if (needs_init) {
err = init_listener(transport, addr, &init_net, listener);
+ listener->err = err;
+ complete_all(&listener->ready);
if (err)
drbd_put_listener(path);
- listener->err = err;
- complete_all(&listener->ready);
return err;
}
--
2.35.3

View File

@@ -1,47 +0,0 @@
From 67ac093d6dc176fd6a3bf0c7f5a3ad046d48f558 Mon Sep 17 00:00:00 2001
From: Lars Ellenberg <lars.ellenberg@linbit.com>
Date: Wed, 6 Sep 2023 14:38:32 +0200
Subject: [PATCH 04/20] drbd: build: fix spurious re-build attempt of
compat.patch
Patching changed the timestamp of the patched files,
which are pre-requisites for generating the patch.
The second build after extracting the tarball
would try to regenerate the patch file.
Exclude generated *.mod.c from "to-be-patched" files for spatch.
Reset timestamp of patched files to that of the patch file, instead of current time.
---
drbd/Kbuild | 1 +
drbd/Makefile | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/drbd/Kbuild b/drbd/Kbuild
index 1576dc19e1da..073469ae4191 100644
--- a/drbd/Kbuild
+++ b/drbd/Kbuild
@@ -110,6 +110,7 @@ filechk_compat.h = cat $(obj)/compat.$(KERNELVERSION).h
$(src)/.compat_patches_applied: $(src)/drbd-kernel-compat/compat.patch
@$(kecho) ' PATCH'
@patch -d $(src) -p0 --batch --forward --reject-file=- < $(src)/drbd-kernel-compat/compat.patch
+ @cd $(src) && p=drbd-kernel-compat/compat.patch && sed -ne 's/^--- //p' < $$p | xargs -r -- touch -r $$p
@cp -d $(src)/drbd-kernel-compat/compat.patch $(src)/.compat_patches_applied
$(src)/drbd-kernel-compat/compat.patch: $(obj)/compat.h
diff --git a/drbd/Makefile b/drbd/Makefile
index 09a1efbf7fe1..ecdff04b9808 100644
--- a/drbd/Makefile
+++ b/drbd/Makefile
@@ -170,7 +170,7 @@ else
compat_headers := $(wildcard drbd-kernel-compat/cocci_cache/*/compat.h)
compat_patches := $(patsubst %.h,%.patch,$(compat_headers))
- sources := $(filter-out drbd_strings.c drbd_buildtag.c,$(wildcard *.c))
+ sources := $(filter-out drbd_strings.c drbd_buildtag.c drbd%.mod.c,$(wildcard *.c))
sources += $(wildcard drbd-headers/linux/*.h)
$(compat_patches): $(sources)
--
2.35.3

View File

@@ -1,28 +0,0 @@
From a98c818bd33920fd5189cdd8f5d81850ad4a945b Mon Sep 17 00:00:00 2001
From: Joel Colledge <joel.colledge@linbit.com>
Date: Thu, 7 Sep 2023 17:32:56 +0200
Subject: [PATCH 05/20] drbd: log error code when thread fails to start
---
drbd/drbd_main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drbd/drbd_main.c b/drbd/drbd_main.c
index 38f728f3da73..810df864f60b 100644
--- a/drbd/drbd_main.c
+++ b/drbd/drbd_main.c
@@ -642,9 +642,9 @@ int drbd_thread_start(struct drbd_thread *thi)
if (IS_ERR(nt)) {
if (connection)
- drbd_err(connection, "Couldn't start thread\n");
+ drbd_err(connection, "Couldn't start thread: %ld\n", PTR_ERR(nt));
else
- drbd_err(resource, "Couldn't start thread\n");
+ drbd_err(resource, "Couldn't start thread: %ld\n", PTR_ERR(nt));
return false;
}
--
2.35.3

View File

@@ -1,82 +0,0 @@
From 8c2c783a09d81f0a725e7a3ae48be4ceb2d79a63 Mon Sep 17 00:00:00 2001
From: Joel Colledge <joel.colledge@linbit.com>
Date: Fri, 8 Sep 2023 11:26:01 +0200
Subject: [PATCH 06/20] drbd: log numeric value of drbd_state_rv as well as
string form
"Auto-promote failed: ?" was seen in a log. Logging the numeric value of
the state change return value gives us more information about what
happened in such a case.
---
drbd/drbd_main.c | 8 ++++----
drbd/drbd_receiver.c | 6 +++---
drbd/drbd_state.c | 3 ++-
3 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/drbd/drbd_main.c b/drbd/drbd_main.c
index 810df864f60b..e26cf7e2b008 100644
--- a/drbd/drbd_main.c
+++ b/drbd/drbd_main.c
@@ -2698,8 +2698,8 @@ static int drbd_open(struct block_device *bdev, fmode_t mode)
if (resource->role[NOW] == R_SECONDARY) {
rv = try_to_promote(device, timeout, (mode & FMODE_NDELAY));
if (rv < SS_SUCCESS)
- drbd_info(resource, "Auto-promote failed: %s\n",
- drbd_set_st_err_str(rv));
+ drbd_info(resource, "Auto-promote failed: %s (%d)\n",
+ drbd_set_st_err_str(rv), rv);
}
} else if ((mode & FMODE_NDELAY) == 0) {
/* Double check peers
@@ -2856,8 +2856,8 @@ static void drbd_release(struct gendisk *gd, fmode_t mode)
!test_bit(EXPLICIT_PRIMARY, &resource->flags)) {
rv = drbd_set_role(resource, R_SECONDARY, false, NULL);
if (rv < SS_SUCCESS)
- drbd_warn(resource, "Auto-demote failed: %s\n",
- drbd_set_st_err_str(rv));
+ drbd_warn(resource, "Auto-demote failed: %s (%d)\n",
+ drbd_set_st_err_str(rv), rv);
}
}
diff --git a/drbd/drbd_receiver.c b/drbd/drbd_receiver.c
index 95cf7ac36762..2162d13cb25e 100644
--- a/drbd/drbd_receiver.c
+++ b/drbd/drbd_receiver.c
@@ -983,8 +983,8 @@ static int connect_work(struct drbd_work *work, int cancel)
drbd_send_disconnect(connection);
apply_local_state_change(connection, OUTDATE_DISKS_AND_DISCONNECT, force_demote);
} else {
- drbd_info(connection, "Failure to connect %d %s; retrying\n",
- rv, drbd_set_st_err_str(rv));
+ drbd_info(connection, "Failure to connect: %s (%d); retrying\n",
+ drbd_set_st_err_str(rv), rv);
change_cstate(connection, C_NETWORK_FAILURE, CS_HARD);
}
@@ -6107,7 +6107,7 @@ out:
}
if (rv < SS_SUCCESS) {
- drbd_err(resource, "State change failed: %s\n", drbd_set_st_err_str(rv));
+ drbd_err(resource, "State change failed: %s (%d)\n", drbd_set_st_err_str(rv), rv);
if (rv == SS_PRIMARY_READER)
log_openers(resource);
}
diff --git a/drbd/drbd_state.c b/drbd/drbd_state.c
index 8b60afeb097b..23eab7f867aa 100644
--- a/drbd/drbd_state.c
+++ b/drbd/drbd_state.c
@@ -791,7 +791,8 @@ static enum drbd_state_rv ___end_state_change(struct drbd_resource *resource, st
rv = try_state_change(resource);
if (rv < SS_SUCCESS) {
if (flags & CS_VERBOSE) {
- drbd_err(resource, "State change failed: %s\n", drbd_set_st_err_str(rv));
+ drbd_err(resource, "State change failed: %s (%d)\n",
+ drbd_set_st_err_str(rv), rv);
print_state_change(resource, "Failed: ");
}
goto out;
--
2.35.3

View File

@@ -1,45 +0,0 @@
From 15cf257c277020e1ba76eff7aa99ed08d44f7d3c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Moritz=20=22WanzenBug=22=20Wanzenb=C3=B6ck?=
<moritz.wanzenboeck@linbit.com>
Date: Fri, 8 Sep 2023 11:45:48 +0200
Subject: [PATCH 07/20] drbd: stop defining __KERNEL_SYSCALLS__
See also upstream Linux kernel commit
d519df00938e ("drbd: stop defining __KERNEL_SYSCALLS__")
Original message:
__KERNEL_SYSCALLS__ hasn't been needed since Linux 2.6.19 so stop
defining it.
---
drbd/drbd_main.c | 1 -
drbd/drbd_receiver.c | 1 -
2 files changed, 2 deletions(-)
diff --git a/drbd/drbd_main.c b/drbd/drbd_main.c
index e26cf7e2b008..ccf0f72829db 100644
--- a/drbd/drbd_main.c
+++ b/drbd/drbd_main.c
@@ -36,7 +36,6 @@
#include <linux/notifier.h>
#include <linux/workqueue.h>
#include <linux/kthread.h>
-#define __KERNEL_SYSCALLS__
#include <linux/unistd.h>
#include <linux/vmalloc.h>
#include <linux/device.h>
diff --git a/drbd/drbd_receiver.c b/drbd/drbd_receiver.c
index 2162d13cb25e..2e2ed4699a94 100644
--- a/drbd/drbd_receiver.c
+++ b/drbd/drbd_receiver.c
@@ -26,7 +26,6 @@
#include <linux/slab.h>
#include <linux/pkt_sched.h>
#include <uapi/linux/sched/types.h>
-#define __KERNEL_SYSCALLS__
#include <linux/unistd.h>
#include <linux/vmalloc.h>
#include <linux/random.h>
--
2.35.3

View File

@@ -1,80 +0,0 @@
From c34a13c3df85352124e94456f81e3d4ba4f52440 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Moritz=20=22WanzenBug=22=20Wanzenb=C3=B6ck?=
<moritz.wanzenboeck@linbit.com>
Date: Fri, 8 Sep 2023 12:20:10 +0200
Subject: [PATCH 08/20] compat: block: introduce holder ops
See also upstream Linux kernel commit
0718afd47f70 ("block: introduce holder ops")
Original message:
Add a new blk_holder_ops structure, which is passed to blkdev_get_by_* and
installed in the block_device for exclusive claims. It will be used to
allow the block layer to call back into the user of the block device for
thing like notification of a removed device or a device resize.
---
.../cocci/blkdev_get_by_path__no_has_holder_ops.cocci | 6 ++++++
drbd/drbd-kernel-compat/gen_patch_names.c | 3 +++
.../tests/blkdev_get_by_path_has_holder_ops.c | 7 +++++++
drbd/drbd_nl.c | 3 ++-
4 files changed, 18 insertions(+), 1 deletion(-)
create mode 100644 drbd/drbd-kernel-compat/cocci/blkdev_get_by_path__no_has_holder_ops.cocci
create mode 100644 drbd/drbd-kernel-compat/tests/blkdev_get_by_path_has_holder_ops.c
diff --git a/drbd/drbd-kernel-compat/cocci/blkdev_get_by_path__no_has_holder_ops.cocci b/drbd/drbd-kernel-compat/cocci/blkdev_get_by_path__no_has_holder_ops.cocci
new file mode 100644
index 000000000000..050d89e6fe0d
--- /dev/null
+++ b/drbd/drbd-kernel-compat/cocci/blkdev_get_by_path__no_has_holder_ops.cocci
@@ -0,0 +1,6 @@
+@@
+expression path, mode, holder, ops;
+@@
+ blkdev_get_by_path(path, mode, holder
+- , ops
+ )
diff --git a/drbd/drbd-kernel-compat/gen_patch_names.c b/drbd/drbd-kernel-compat/gen_patch_names.c
index 959bbc351e1b..7071a0a4c5ec 100644
--- a/drbd/drbd-kernel-compat/gen_patch_names.c
+++ b/drbd/drbd-kernel-compat/gen_patch_names.c
@@ -556,6 +556,9 @@ int main(int argc, char **argv)
patch(1, "__bio_add_page", true, false,
COMPAT_HAVE___BIO_ADD_PAGE, "present");
+ patch(1, "blkdev_get_by_path", true, false,
+ COMPAT_BLKDEV_GET_BY_PATH_HAS_HOLDER_OPS, "has_holder_ops");
+
/* #define BLKDEV_ISSUE_ZEROOUT_EXPORTED */
/* #define BLKDEV_ZERO_NOUNMAP */
diff --git a/drbd/drbd-kernel-compat/tests/blkdev_get_by_path_has_holder_ops.c b/drbd/drbd-kernel-compat/tests/blkdev_get_by_path_has_holder_ops.c
new file mode 100644
index 000000000000..02a560782f37
--- /dev/null
+++ b/drbd/drbd-kernel-compat/tests/blkdev_get_by_path_has_holder_ops.c
@@ -0,0 +1,7 @@
+/* { "version": "v6.5-rc1", "commit": "0718afd47f70cf46877c39c25d06b786e1a3f36c", "comment": "block: introduce holder ops", "author": "Christoph Hellwig <hch@lst.de>", "date": "Thu Jun 1 11:44:52 2023 +0200" } */
+#include <linux/blkdev.h>
+
+struct block_device *foo(const char *bdev_path, struct blk_holder_ops *ops)
+{
+ return blkdev_get_by_path(bdev_path, 0, NULL, ops);
+}
diff --git a/drbd/drbd_nl.c b/drbd/drbd_nl.c
index 0fc1d84a996f..0a67bfa4ca52 100644
--- a/drbd/drbd_nl.c
+++ b/drbd/drbd_nl.c
@@ -2560,7 +2560,8 @@ static struct block_device *open_backing_dev(struct drbd_device *device,
const char *bdev_path, void *claim_ptr)
{
struct block_device *bdev = blkdev_get_by_path(bdev_path,
- FMODE_READ | FMODE_WRITE | FMODE_EXCL, claim_ptr);
+ FMODE_READ | FMODE_WRITE | FMODE_EXCL,
+ claim_ptr, NULL);
if (IS_ERR(bdev)) {
drbd_err(device, "open(\"%s\") failed with %ld\n",
bdev_path, PTR_ERR(bdev));
--
2.35.3

View File

@@ -1,45 +0,0 @@
From fc7b1ad2c422e4148d6419f1eec56189a7a578ac Mon Sep 17 00:00:00 2001
From: Joel Colledge <joel.colledge@linbit.com>
Date: Fri, 1 Sep 2023 11:04:49 +0200
Subject: [PATCH 09/20] drbd: reduce "net_ee not empty" info to a dynamic debug
print
This situation is known and harmless. No need to print a worrying
"killed N entries" message when it occurs.
A similar comment explaining that this is harmless was introduced in
commit:
31e0f1250f17 on disconnect, just give up all references on pages from net_ee
But the comment got lost in some refactoring:
0b220db6109e drbd: move {active,read,sync,done}_ee lists from device to connection
Bring the comment back, slightly simplified.
---
drbd/drbd_receiver.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drbd/drbd_receiver.c b/drbd/drbd_receiver.c
index 2e2ed4699a94..223353b1081c 100644
--- a/drbd/drbd_receiver.c
+++ b/drbd/drbd_receiver.c
@@ -8664,9 +8664,15 @@ static void conn_disconnect(struct drbd_connection *connection)
i = drbd_free_peer_reqs(connection, &connection->sync_ee);
if (i)
drbd_info(connection, "sync_ee not empty, killed %u entries\n", i);
+
+ /*
+ * tcp_close and release of sendpage pages can be deferred. We don't
+ * care for exactly when the network stack does its put_page(), but
+ * release our reference on these pages right here.
+ */
i = drbd_free_peer_reqs(connection, &connection->net_ee);
if (i)
- drbd_info(connection, "net_ee not empty, killed %u entries\n", i);
+ dynamic_drbd_dbg(connection, "net_ee not empty, killed %u entries\n", i);
cleanup_unacked_peer_requests(connection);
cleanup_peer_ack_list(connection);
--
2.35.3

View File

@@ -1,37 +0,0 @@
From 1b94c10250c7d37423ba894457c40d9799025a93 Mon Sep 17 00:00:00 2001
From: Joel Colledge <joel.colledge@linbit.com>
Date: Mon, 11 Sep 2023 09:20:24 +0200
Subject: [PATCH 10/20] drbd: do not send P_CURRENT_UUID to DRBD 8 peer when
our disk fails
DRBD 8 does not understand P_CURRENT_UUID. Skip the peer in
diskfull_peers_need_new_cur_uuid() to avoid sending such a packet.
This is valid because the DRBD 8 peer generates a new UUID itself when
our disk fails.
This prevents failures of the form:
drbd res: Unexpected data packet Unknown (0x0044)
drbd res: peer( Primary -> Unknown ) conn( Connected -> ProtocolError ) pdsk( Failed -> DUnknown )
---
drbd/drbd_main.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drbd/drbd_main.c b/drbd/drbd_main.c
index ccf0f72829db..e6ed1185c710 100644
--- a/drbd/drbd_main.c
+++ b/drbd/drbd_main.c
@@ -4614,6 +4614,9 @@ static bool diskfull_peers_need_new_cur_uuid(struct drbd_device *device)
rcu_read_lock();
for_each_peer_device_rcu(peer_device, device) {
+ if (peer_device->connection->agreed_pro_version < 110)
+ continue;
+
/* Only an up-to-date peer persists a new current uuid! */
if (peer_device->disk_state[NOW] < D_UP_TO_DATE)
continue;
--
2.35.3

View File

@@ -1,129 +0,0 @@
From b993152e80676f5b9ce583c9471b630cbd0675d7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Moritz=20=22WanzenBug=22=20Wanzenb=C3=B6ck?=
<moritz.wanzenboeck@linbit.com>
Date: Fri, 8 Sep 2023 15:09:47 +0200
Subject: [PATCH 11/20] compat: block: pass a gendisk to ->open
See also upstream Linux kernel commit
d32e2bf83791 ("block: pass a gendisk to ->open")
Original message:
->open is only called on the whole device. Make that explicit by
passing a gendisk instead of the block_device.
---
...ice_operations_open__no_takes_gendisk.cocci | 18 ++++++++++++++++++
drbd/drbd-kernel-compat/gen_patch_names.c | 3 +++
...lock_device_operations_open_takes_gendisk.c | 17 +++++++++++++++++
drbd/drbd_main.c | 10 +++++-----
4 files changed, 43 insertions(+), 5 deletions(-)
create mode 100644 drbd/drbd-kernel-compat/cocci/block_device_operations_open__no_takes_gendisk.cocci
create mode 100644 drbd/drbd-kernel-compat/tests/block_device_operations_open_takes_gendisk.c
diff --git a/drbd/drbd-kernel-compat/cocci/block_device_operations_open__no_takes_gendisk.cocci b/drbd/drbd-kernel-compat/cocci/block_device_operations_open__no_takes_gendisk.cocci
new file mode 100644
index 000000000000..2ba2856da9db
--- /dev/null
+++ b/drbd/drbd-kernel-compat/cocci/block_device_operations_open__no_takes_gendisk.cocci
@@ -0,0 +1,18 @@
+@ drbd_open_arg @
+identifier gd;
+fresh identifier bdev = "" ## "bdev";
+@@
+ drbd_open(
+- struct gendisk *gd,
++ struct block_device *bdev,
+ ... ) {
+<...
+(
+- gd->part0
++ bdev
+|
+- gd
++ bdev->bd_disk
+)
+...>
+}
diff --git a/drbd/drbd-kernel-compat/gen_patch_names.c b/drbd/drbd-kernel-compat/gen_patch_names.c
index 7071a0a4c5ec..6e4f06d9a3a7 100644
--- a/drbd/drbd-kernel-compat/gen_patch_names.c
+++ b/drbd/drbd-kernel-compat/gen_patch_names.c
@@ -559,6 +559,9 @@ int main(int argc, char **argv)
patch(1, "blkdev_get_by_path", true, false,
COMPAT_BLKDEV_GET_BY_PATH_HAS_HOLDER_OPS, "has_holder_ops");
+ patch(1, "block_device_operations_open", true, false,
+ COMPAT_BLOCK_DEVICE_OPERATIONS_OPEN_TAKES_GENDISK, "takes_gendisk");
+
/* #define BLKDEV_ISSUE_ZEROOUT_EXPORTED */
/* #define BLKDEV_ZERO_NOUNMAP */
diff --git a/drbd/drbd-kernel-compat/tests/block_device_operations_open_takes_gendisk.c b/drbd/drbd-kernel-compat/tests/block_device_operations_open_takes_gendisk.c
new file mode 100644
index 000000000000..d5f20fd569fb
--- /dev/null
+++ b/drbd/drbd-kernel-compat/tests/block_device_operations_open_takes_gendisk.c
@@ -0,0 +1,17 @@
+/* { "version": "v6.5-rc1", "commit": "d32e2bf83791727a84ad5d3e3d713e82f9adbe30", "comment": "block: pass a gendisk to ->open", "author": "Christoph Hellwig <hch@lst.de>", "date": "Thu Jun 8 13:02:36 2023 +0200" } */
+#include <linux/blkdev.h>
+
+#ifndef __same_type
+# define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
+#endif
+
+int foo_open(struct gendisk *disk, unsigned int mode)
+{
+ return 0;
+}
+
+void foo(void)
+{
+ struct block_device_operations ops;
+ BUILD_BUG_ON(!(__same_type(ops.open, &foo_open)));
+}
diff --git a/drbd/drbd_main.c b/drbd/drbd_main.c
index e6ed1185c710..53cb4c9e7db3 100644
--- a/drbd/drbd_main.c
+++ b/drbd/drbd_main.c
@@ -52,7 +52,7 @@
#include "drbd_meta_data.h"
#include "drbd_dax_pmem.h"
-static int drbd_open(struct block_device *bdev, fmode_t mode);
+static int drbd_open(struct gendisk *gd, fmode_t mode);
static void drbd_release(struct gendisk *gd, fmode_t mode);
static void md_sync_timer_fn(struct timer_list *t);
static int w_bitmap_io(struct drbd_work *w, int unused);
@@ -2646,9 +2646,9 @@ out:
spin_unlock(&device->openers_lock);
}
-static int drbd_open(struct block_device *bdev, fmode_t mode)
+static int drbd_open(struct gendisk *gd, fmode_t mode)
{
- struct drbd_device *device = bdev->bd_disk->private_data;
+ struct drbd_device *device = gd->private_data;
struct drbd_resource *resource = device->resource;
long timeout = resource->res_opts.auto_promote_timeout * HZ / 10;
enum ioc_rv r;
@@ -2664,7 +2664,7 @@ static int drbd_open(struct block_device *bdev, fmode_t mode)
/* Fail read-write open early,
* in case someone explicitly set us read-only (blockdev --setro) */
- if (bdev_read_only(bdev) && (mode & FMODE_WRITE))
+ if (bdev_read_only(gd->part0) && (mode & FMODE_WRITE))
return -EACCES;
if (resource->fail_io[NOW])
@@ -2740,7 +2740,7 @@ out:
mutex_unlock(&resource->open_release);
if (err) {
- drbd_release(bdev->bd_disk, mode);
+ drbd_release(gd, mode);
if (err == -EAGAIN && !(mode & FMODE_NDELAY))
err = -EMEDIUMTYPE;
}
--
2.35.3

View File

@@ -1,67 +0,0 @@
From 88bf7f95dc359f4901f08ac8fb8ffc7dfceca9c1 Mon Sep 17 00:00:00 2001
From: Philipp Reisner <philipp.reisner@linbit.com>
Date: Wed, 13 Sep 2023 17:50:37 +0200
Subject: [PATCH 12/20] drbd: Restore DATA_CORKED and CONTROL_CORKED bits
They were removed with 9072e1d1b6b3 in January 2022.
Since then, the CONTROL_CORKED mapped onto C_UNREGISTERED.
I think that had a negligible impact because C_UNREGISTERED indicates
if a connection was deleted before. It is no longer connected when it
is time to delete a connection. Therefore, the corking code can not
set that double-used bit.
The other user of C_UNREGISTERED is when iterating over connections. A
wrongly set C_UNREGISTERED causes another iteration over the
connections list - no further harm.
Still, I am fixing this by allocating dedicated bits for corking in
the flags word.
---
drbd/drbd_debugfs.c | 2 ++
drbd/drbd_int.h | 2 ++
drbd/drbd_main.c | 1 +
3 files changed, 5 insertions(+)
diff --git a/drbd/drbd_debugfs.c b/drbd/drbd_debugfs.c
index 778a995018d7..b8e4f2cde426 100644
--- a/drbd/drbd_debugfs.c
+++ b/drbd/drbd_debugfs.c
@@ -839,6 +839,8 @@ static int connection_debug_show(struct seq_file *m, void *ignored)
pretty_print_bit(CONN_DRY_RUN);
pretty_print_bit(DISCONNECT_EXPECTED);
pretty_print_bit(BARRIER_ACK_PENDING);
+ pretty_print_bit(DATA_CORKED);
+ pretty_print_bit(CONTROL_CORKED);
pretty_print_bit(C_UNREGISTERED);
pretty_print_bit(RECONNECT);
pretty_print_bit(CONN_DISCARD_MY_DATA);
diff --git a/drbd/drbd_int.h b/drbd/drbd_int.h
index 17be90e7d8fa..4f3228d5a4d1 100644
--- a/drbd/drbd_int.h
+++ b/drbd/drbd_int.h
@@ -755,6 +755,8 @@ enum connection_flag {
DISCONNECT_EXPECTED,
BARRIER_ACK_PENDING,
CORKED,
+ DATA_CORKED = CORKED, /* used as computed value CORKED + DATA_STREAM */
+ CONTROL_CORKED, /* used as computed value CORKED + CONTROL_STREAM */
C_UNREGISTERED,
RECONNECT,
CONN_DISCARD_MY_DATA,
diff --git a/drbd/drbd_main.c b/drbd/drbd_main.c
index 53cb4c9e7db3..6bb618909aa0 100644
--- a/drbd/drbd_main.c
+++ b/drbd/drbd_main.c
@@ -1039,6 +1039,7 @@ int __send_command(struct drbd_connection *connection, int vnr,
struct drbd_send_buffer *sbuf = &connection->send_buffer[drbd_stream];
struct drbd_transport *transport = &connection->transport;
struct drbd_transport_ops *tr_ops = transport->ops;
+ /* CORKED + drbd_stream is either DATA_CORKED or CONTROL_CORKED */
bool corked = test_bit(CORKED + drbd_stream, &connection->flags);
bool flush = stream_and_flags & SFLAG_FLUSH;
int err;
--
2.35.3

View File

@@ -1,38 +0,0 @@
From 9e087399533445e3df60a34f26a1e6a285b0504a Mon Sep 17 00:00:00 2001
From: Joel Colledge <joel.colledge@linbit.com>
Date: Tue, 12 Sep 2023 16:36:43 +0200
Subject: [PATCH 13/20] drbd: remove unused extern for conn_try_outdate_peer()
---
drbd/drbd_int.h | 1 -
drbd/drbd_nl.c | 2 +-
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/drbd/drbd_int.h b/drbd/drbd_int.h
index 4f3228d5a4d1..f6e7c3ac2629 100644
--- a/drbd/drbd_int.h
+++ b/drbd/drbd_int.h
@@ -1932,7 +1932,6 @@ extern void drbd_reconsider_queue_parameters(struct drbd_device *device,
struct drbd_backing_dev *bdev);
extern bool barrier_pending(struct drbd_resource *resource);
extern enum drbd_state_rv drbd_set_role(struct drbd_resource *, enum drbd_role, bool, struct sk_buff *);
-extern bool conn_try_outdate_peer(struct drbd_connection *connection);
extern void conn_try_outdate_peer_async(struct drbd_connection *connection);
extern int drbd_maybe_khelper(struct drbd_device *, struct drbd_connection *, char *);
extern int drbd_create_peer_device_default_config(struct drbd_peer_device *peer_device);
diff --git a/drbd/drbd_nl.c b/drbd/drbd_nl.c
index 0a67bfa4ca52..cb5cdb184824 100644
--- a/drbd/drbd_nl.c
+++ b/drbd/drbd_nl.c
@@ -768,7 +768,7 @@ static bool intentional_diskless(struct drbd_resource *resource)
return intentional_diskless;
}
-bool conn_try_outdate_peer(struct drbd_connection *connection)
+static bool conn_try_outdate_peer(struct drbd_connection *connection)
{
struct drbd_resource *resource = connection->resource;
unsigned long last_reconnect_jif;
--
2.35.3

File diff suppressed because it is too large Load Diff

View File

@@ -1,202 +0,0 @@
From 3b9fcc2cfaa32766724f371cc2054e057adbc425 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Moritz=20=22WanzenBug=22=20Wanzenb=C3=B6ck?=
<moritz.wanzenboeck@linbit.com>
Date: Mon, 11 Sep 2023 13:36:07 +0200
Subject: [PATCH 15/20] compat: block: use the holder as indication for
exclusive opens
See also upstream Linux kernel commit
2736e8eeb0cc ("block: use the holder as indication for exclusive opens")
Original message:
The current interface for exclusive opens is rather confusing as it
requires both the FMODE_EXCL flag and a holder. Remove the need to pass
FMODE_EXCL and just key off the exclusive open off a non-NULL holder.
For blkdev_put this requires adding the holder argument, which provides
better debug checking that only the holder actually releases the hold,
but at the same time allows removing the now superfluous mode argument.
---
.../cocci/blkdev_put__no_has_holder.cocci | 38 +++++++++++++++++++
drbd/drbd-kernel-compat/gen_patch_names.c | 3 ++
.../tests/blkdev_put_has_holder.c | 17 +++++++++
drbd/drbd_nl.c | 28 ++++++++------
4 files changed, 75 insertions(+), 11 deletions(-)
create mode 100644 drbd/drbd-kernel-compat/cocci/blkdev_put__no_has_holder.cocci
create mode 100644 drbd/drbd-kernel-compat/tests/blkdev_put_has_holder.c
diff --git a/drbd/drbd-kernel-compat/cocci/blkdev_put__no_has_holder.cocci b/drbd/drbd-kernel-compat/cocci/blkdev_put__no_has_holder.cocci
new file mode 100644
index 000000000000..c903bc2d529c
--- /dev/null
+++ b/drbd/drbd-kernel-compat/cocci/blkdev_put__no_has_holder.cocci
@@ -0,0 +1,38 @@
+@@
+expression path, mode;
+@@
+ blkdev_get_by_path(
+ path,
+- mode,
++ mode | FMODE_EXCL,
+ ...
+ )
+
+@@
+expression bdev, holder;
+@@
+ blkdev_put(
+ bdev,
+- holder
++ FMODE_READ | FMODE_WRITE | FMODE_EXCL
+ )
+
+@@
+identifier device, bdev, holder, do_bd_unlink;
+@@
+ void close_backing_dev(
+ struct drbd_device *device,
+ struct block_device *bdev,
+- void *holder,
+ bool do_bd_unlink
+ ) { ... }
+
+@@
+expression device, bdev, holder, do_bd_unlink;
+@@
+ close_backing_dev(
+ device,
+ bdev,
+- holder,
+ do_bd_unlink
+ )
diff --git a/drbd/drbd-kernel-compat/gen_patch_names.c b/drbd/drbd-kernel-compat/gen_patch_names.c
index 6e4f06d9a3a7..4761c1ef7d0c 100644
--- a/drbd/drbd-kernel-compat/gen_patch_names.c
+++ b/drbd/drbd-kernel-compat/gen_patch_names.c
@@ -562,6 +562,9 @@ int main(int argc, char **argv)
patch(1, "block_device_operations_open", true, false,
COMPAT_BLOCK_DEVICE_OPERATIONS_OPEN_TAKES_GENDISK, "takes_gendisk");
+ patch(1, "blkdev_put", true, false,
+ COMPAT_BLKDEV_PUT_HAS_HOLDER, "has_holder");
+
/* #define BLKDEV_ISSUE_ZEROOUT_EXPORTED */
/* #define BLKDEV_ZERO_NOUNMAP */
diff --git a/drbd/drbd-kernel-compat/tests/blkdev_put_has_holder.c b/drbd/drbd-kernel-compat/tests/blkdev_put_has_holder.c
new file mode 100644
index 000000000000..d5f0c5dd0355
--- /dev/null
+++ b/drbd/drbd-kernel-compat/tests/blkdev_put_has_holder.c
@@ -0,0 +1,17 @@
+/* { "version": "v6.5-rc1", "commit": "ae220766d87cd6799dbf918fea10613ae14c0654", "comment": "block: remove the unused mode argument to ->release", "author": "Christoph Hellwig <hch@lst.de>", "date": "Thu Jun 8 13:02:37 2023 +0200" } */
+#include <linux/blkdev.h>
+
+#ifndef __same_type
+# define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
+#endif
+
+void foo_blkdev_put(struct block_device *bdev, void *holder)
+{
+}
+
+
+void foo(void)
+{
+ BUILD_BUG_ON(!(__same_type(&blkdev_put, &foo_blkdev_put)));
+}
+
diff --git a/drbd/drbd_nl.c b/drbd/drbd_nl.c
index b7e9e43312f9..8c968cf252ca 100644
--- a/drbd/drbd_nl.c
+++ b/drbd/drbd_nl.c
@@ -2536,13 +2536,13 @@ bool want_bitmap(struct drbd_peer_device *peer_device)
}
static void close_backing_dev(struct drbd_device *device, struct block_device *bdev,
- bool do_bd_unlink)
+ void *holder, bool do_bd_unlink)
{
if (!bdev)
return;
if (do_bd_unlink)
bd_unlink_disk_holder(bdev, device->vdisk);
- blkdev_put(bdev, FMODE_READ | FMODE_WRITE | FMODE_EXCL);
+ blkdev_put(bdev, holder);
}
void drbd_backing_dev_free(struct drbd_device *device, struct drbd_backing_dev *ldev)
@@ -2552,8 +2552,11 @@ void drbd_backing_dev_free(struct drbd_device *device, struct drbd_backing_dev *
drbd_dax_close(ldev);
- close_backing_dev(device, ldev->md_bdev, ldev->md_bdev != ldev->backing_bdev);
- close_backing_dev(device, ldev->backing_bdev, true);
+ close_backing_dev(device,
+ ldev->md_bdev,
+ ldev->md.meta_dev_idx < 0 ? (void *)device : (void *)drbd_m_holder,
+ ldev->md_bdev != ldev->backing_bdev);
+ close_backing_dev(device, ldev->backing_bdev, device, true);
kfree(ldev->disk_conf);
kfree(ldev);
@@ -2563,7 +2566,7 @@ static struct block_device *open_backing_dev(struct drbd_device *device,
const char *bdev_path, void *claim_ptr)
{
struct block_device *bdev = blkdev_get_by_path(bdev_path,
- FMODE_READ | FMODE_WRITE | FMODE_EXCL,
+ FMODE_READ | FMODE_WRITE,
claim_ptr, NULL);
if (IS_ERR(bdev)) {
drbd_err(device, "open(\"%s\") failed with %ld\n",
@@ -2588,6 +2591,7 @@ static int open_backing_devices(struct drbd_device *device,
struct drbd_backing_dev *nbc)
{
struct block_device *bdev;
+ void *meta_claim_ptr;
int err;
bdev = open_backing_dev(device, new_disk_conf->backing_dev, device);
@@ -2597,12 +2601,17 @@ static int open_backing_devices(struct drbd_device *device,
err = link_backing_dev(device, new_disk_conf->backing_dev, bdev);
if (err) {
/* close without unlinking; otherwise error path will try to unlink */
- close_backing_dev(device, bdev, false);
+ close_backing_dev(device, bdev, device, false);
return ERR_OPEN_DISK;
}
nbc->backing_bdev = bdev;
+ /* meta_claim_ptr: device, if claimed exclusively; shared drbd_m_holder,
+ * if potentially shared with other drbd minors
+ */
+ meta_claim_ptr = (new_disk_conf->meta_dev_idx < 0) ?
+ (void *)device : (void *)drbd_m_holder;
/*
* meta_dev_idx >= 0: external fixed size, possibly multiple
* drbd sharing one meta device. TODO in that case, paranoia
@@ -2611,10 +2620,7 @@ static int open_backing_devices(struct drbd_device *device,
* should check it for you already; but if you don't, or
* someone fooled it, we need to double check here)
*/
- bdev = open_backing_dev(device, new_disk_conf->meta_dev,
- /* claim ptr: device, if claimed exclusively; shared drbd_m_holder,
- * if potentially shared with other drbd minors */
- (new_disk_conf->meta_dev_idx < 0) ? (void*)device : (void*)drbd_m_holder);
+ bdev = open_backing_dev(device, new_disk_conf->meta_dev, meta_claim_ptr);
if (IS_ERR(bdev))
return ERR_OPEN_MD_DISK;
@@ -2624,7 +2630,7 @@ static int open_backing_devices(struct drbd_device *device,
err = link_backing_dev(device, new_disk_conf->meta_dev, bdev);
if (err) {
/* close without unlinking; otherwise error path will try to unlink */
- close_backing_dev(device, bdev, false);
+ close_backing_dev(device, bdev, meta_claim_ptr, false);
return ERR_OPEN_MD_DISK;
}
}
--
2.35.3

View File

@@ -1,33 +0,0 @@
From 69d9286628b730870665cd2c6f05dd9f1813c65e Mon Sep 17 00:00:00 2001
From: Philipp Reisner <philipp.reisner@linbit.com>
Date: Sun, 17 Sep 2023 22:21:11 +0800
Subject: [PATCH 16/20] drbd: Fix `net-options --set-defaults` to not clear the
transport
So far, `drbdsetup net-options --set-defaults` cleared the
transport_name. That is a stupid bug that caused `drbdadm adjust` to
do a disconnect/connect cycle. This affected `lb-tcp` and `rdma`. As
`tcp` is the default, it was not affected by this.
---
drbd/drbd_nl.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drbd/drbd_nl.c b/drbd/drbd_nl.c
index 8c968cf252ca..b0a1e6fa46f1 100644
--- a/drbd/drbd_nl.c
+++ b/drbd/drbd_nl.c
@@ -3729,6 +3729,11 @@ int drbd_adm_net_opts(struct sk_buff *skb, struct genl_info *info)
if (should_set_defaults(info))
set_net_conf_defaults(new_net_conf);
+ /* The transport_name is immutable taking precedence over set_net_conf_defaults() */
+ memcpy(new_net_conf->transport_name, old_net_conf->transport_name,
+ old_net_conf->transport_name_len);
+ new_net_conf->transport_name_len = old_net_conf->transport_name_len;
+
err = net_conf_from_attrs_for_change(new_net_conf, info);
if (err && err != -ENOMSG) {
retcode = ERR_MANDATORY_TAG;
--
2.35.3

View File

@@ -1,35 +0,0 @@
From 0666bc5b014049b6aa184b5a8fdb60481b9c8717 Mon Sep 17 00:00:00 2001
From: Philipp Reisner <philipp.reisner@linbit.com>
Date: Fri, 22 Sep 2023 15:09:07 +0200
Subject: [PATCH 17/20] drbd: propagate exposed UUIDs only into established
connections
Sending into connections in C_CONNECTING state while we exchange the
feature and auth packets might interfere with exchanging those. I also
witnessed that it might block unexpectedly long (2 - 6 seconds),
holding the `connection->mutex[DATA_STREAM]` mutex and again causing
troubles with establishing connections.
This is a fix for commit 772e5b21d from April 2023
"drbd: Consider outdating a disk when more recent data is behind a diskless"
Released with of 9.1.15 and 9.2.4.
---
drbd/drbd_receiver.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drbd/drbd_receiver.c b/drbd/drbd_receiver.c
index 0c3ab0fd486c..bfd265b86b43 100644
--- a/drbd/drbd_receiver.c
+++ b/drbd/drbd_receiver.c
@@ -7206,7 +7206,7 @@ static void propagate_exposed_uuid(struct drbd_device *device)
u64 im;
for_each_peer_device_ref(peer_device, im, device) {
- if (peer_device->connection->cstate[NOW] < C_CONNECTING)
+ if (!test_bit(INITIAL_STATE_SENT, &peer_device->flags))
continue;
drbd_send_current_uuid(peer_device, device->exposed_data_uuid, 0);
}
--
2.35.3

View File

@@ -1,185 +0,0 @@
From e3ef0e229a6ae88346164d1507697ae1b397cdf9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Moritz=20=22WanzenBug=22=20Wanzenb=C3=B6ck?=
<moritz.wanzenboeck@linbit.com>
Date: Tue, 12 Sep 2023 10:17:08 +0200
Subject: [PATCH 18/20] drbd: rework autopromote
With upstream commit ae220766d87c we lost the ability to keep separate
counts for RW and RO openers. Instead, we keep track of openers using a
single count, and a flag indicating if the device was opened RW once.
Once a device was opened RW, it will stay "writable" for DRBD, until all
openers are gone. This should offer a good compromise between keeping
the old auto-promote behaviour, and the changed device interface.
---
drbd/drbd_int.h | 3 ++-
drbd/drbd_main.c | 38 +++++++++++++++++++++-----------------
drbd/drbd_nl.c | 9 +++++----
drbd/drbd_state.c | 7 ++++---
4 files changed, 32 insertions(+), 25 deletions(-)
diff --git a/drbd/drbd_int.h b/drbd/drbd_int.h
index b705f26e71a4..cf593c09cda1 100644
--- a/drbd/drbd_int.h
+++ b/drbd/drbd_int.h
@@ -1399,7 +1399,8 @@ struct drbd_device {
struct drbd_bitmap *bitmap;
- int open_rw_cnt, open_ro_cnt;
+ int open_cnt;
+ bool writable;
/* FIXME clean comments, restructure so it is more obvious which
* members are protected by what */
diff --git a/drbd/drbd_main.c b/drbd/drbd_main.c
index 4b0b967c2c97..bb05b2215dfb 100644
--- a/drbd/drbd_main.c
+++ b/drbd/drbd_main.c
@@ -2579,10 +2579,9 @@ static enum ioc_rv inc_open_count(struct drbd_device *device, fmode_t mode)
r = IOC_ABORT;
else if (!resource->remote_state_change) {
r = IOC_OK;
+ device->open_cnt++;
if (mode & FMODE_WRITE)
- device->open_rw_cnt++;
- else
- device->open_ro_cnt++;
+ device->writable = true;
}
read_unlock_irq(&resource->state_rwlock);
@@ -2756,8 +2755,10 @@ void drbd_open_counts(struct drbd_resource *resource, int *rw_count_ptr, int *ro
rcu_read_lock();
idr_for_each_entry(&resource->devices, device, vnr) {
- rw_count += device->open_rw_cnt;
- ro_count += device->open_ro_cnt;
+ if (device->writable)
+ rw_count += device->open_cnt;
+ else
+ ro_count += device->open_cnt;
}
rcu_read_unlock();
*rw_count_ptr = rw_count;
@@ -2825,33 +2826,35 @@ static void drbd_release(struct gendisk *gd, fmode_t mode)
{
struct drbd_device *device = gd->private_data;
struct drbd_resource *resource = device->resource;
+ bool was_writable = device->writable;
int open_rw_cnt, open_ro_cnt;
mutex_lock(&resource->open_release);
- if (mode & FMODE_WRITE)
- device->open_rw_cnt--;
- else
- device->open_ro_cnt--;
+ device->open_cnt--;
drbd_open_counts(resource, &open_rw_cnt, &open_ro_cnt);
- /* last one to close will be responsible for write-out of all dirty pages */
- if (mode & FMODE_WRITE && device->open_rw_cnt == 0)
+ /* last one to close will be responsible for write-out of all dirty pages.
+ * We also reset the writable flag for this device here: later code may
+ * check if the device is still opened for writes to determine things
+ * like auto-demote.
+ */
+ if (was_writable && device->open_cnt == 0) {
drbd_fsync_device(device);
+ device->writable = false;
+ }
if (open_ro_cnt == 0)
wake_up_all(&resource->state_wait);
- if (test_bit(UNREGISTERED, &device->flags) &&
- device->open_rw_cnt == 0 && device->open_ro_cnt == 0 &&
+ if (test_bit(UNREGISTERED, &device->flags) && device->open_cnt == 0 &&
!test_and_set_bit(DESTROYING_DEV, &device->flags))
call_rcu(&device->rcu, drbd_reclaim_device);
if (resource->res_opts.auto_promote) {
enum drbd_state_rv rv;
- if (mode & FMODE_WRITE &&
- open_rw_cnt == 0 &&
+ if (was_writable && open_rw_cnt == 0 &&
resource->role[NOW] == R_PRIMARY &&
!test_bit(EXPLICIT_PRIMARY, &resource->flags)) {
rv = drbd_set_role(resource, R_SECONDARY, false, "auto-demote", NULL);
@@ -2869,9 +2872,10 @@ static void drbd_release(struct gendisk *gd, fmode_t mode)
end_state_change(resource, &irq_flags, "release");
}
- /* if the open counts are 0, we free the whole list, otherwise we remove the specific pid */
+ /* if the open count is 0, we free the whole list, otherwise we remove the specific pid */
prune_or_free_openers(device,
- (open_ro_cnt == 0 && open_rw_cnt == 0) ? 0 : task_pid_nr(current));
+ (open_ro_cnt == 0 && open_rw_cnt == 0) ?
+ 0 : task_pid_nr(current));
mutex_unlock(&resource->open_release);
diff --git a/drbd/drbd_nl.c b/drbd/drbd_nl.c
index b0a1e6fa46f1..71ed4272614e 100644
--- a/drbd/drbd_nl.c
+++ b/drbd/drbd_nl.c
@@ -4541,8 +4541,10 @@ int drbd_open_ro_count(struct drbd_resource *resource)
int vnr, open_ro_cnt = 0;
read_lock_irq(&resource->state_rwlock);
- idr_for_each_entry(&resource->devices, device, vnr)
- open_ro_cnt += device->open_ro_cnt;
+ idr_for_each_entry(&resource->devices, device, vnr) {
+ if (!device->writable)
+ open_ro_cnt += device->open_cnt;
+ }
read_unlock_irq(&resource->state_rwlock);
return open_ro_cnt;
@@ -6394,8 +6396,7 @@ static enum drbd_ret_code adm_del_minor(struct drbd_device *device)
notify_device_state(NULL, 0, device, NULL, NOTIFY_DESTROY);
mutex_unlock(&notification_mutex);
- if (device->open_ro_cnt == 0 && device->open_rw_cnt == 0 &&
- !test_and_set_bit(DESTROYING_DEV, &device->flags))
+ if (device->open_cnt == 0 && !test_and_set_bit(DESTROYING_DEV, &device->flags))
call_rcu(&device->rcu, drbd_reclaim_device);
return ret;
diff --git a/drbd/drbd_state.c b/drbd/drbd_state.c
index 22cd134be962..fa70507df425 100644
--- a/drbd/drbd_state.c
+++ b/drbd/drbd_state.c
@@ -1634,7 +1634,7 @@ handshake_found:
return SS_TWO_PRIMARIES;
if (!fail_io[NEW]) {
idr_for_each_entry(&resource->devices, device, vnr) {
- if (device->open_ro_cnt)
+ if (!device->writable && device->open_cnt)
return SS_PRIMARY_READER;
/*
* One might be tempted to add "|| open_rw_cont" here.
@@ -1661,7 +1661,7 @@ handshake_found:
(disk_state[OLD] > D_DETACHING && disk_state[NEW] == D_DETACHING)))
return SS_IN_TRANSIENT_STATE;
- if (role[OLD] == R_PRIMARY && role[NEW] == R_SECONDARY && device->open_rw_cnt &&
+ if (role[OLD] == R_PRIMARY && role[NEW] == R_SECONDARY && device->writable &&
!(resource->state_change_flags & CS_FS_IGN_OPENERS))
return SS_DEVICE_IN_USE;
@@ -1693,7 +1693,8 @@ handshake_found:
return SS_NO_UP_TO_DATE_DISK;
/* Prevent detach or disconnect while held open read only */
- if (device->open_ro_cnt && any_disk_up_to_date[OLD] && !any_disk_up_to_date[NEW])
+ if (!device->writable && device->open_cnt &&
+ any_disk_up_to_date[OLD] && !any_disk_up_to_date[NEW])
return SS_NO_UP_TO_DATE_DISK;
if (disk_state[NEW] == D_NEGOTIATING)
--
2.35.3

View File

@@ -1,107 +0,0 @@
From bf287c15359c4495a706ca270e7dcab4c2d6ebcc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Moritz=20=22WanzenBug=22=20Wanzenb=C3=B6ck?=
<moritz.wanzenboeck@linbit.com>
Date: Tue, 12 Sep 2023 15:27:01 +0200
Subject: [PATCH 19/20] compat: block: remove the unused mode argument to
->release
See also upstream Linux kernel commit
ae220766d87c ("block: remove the unused mode argument to ->release")
Original message:
The mode argument to the ->release block_device_operation is never used,
so remove it.
---
...ions_release__no_takes_single_argument.cocci | 17 +++++++++++++++++
drbd/drbd-kernel-compat/gen_patch_names.c | 3 +++
...e_operations_release_takes_single_argument.c | 7 +++++++
drbd/drbd_main.c | 6 +++---
4 files changed, 30 insertions(+), 3 deletions(-)
create mode 100644 drbd/drbd-kernel-compat/cocci/block_device_operations_release__no_takes_single_argument.cocci
create mode 100644 drbd/drbd-kernel-compat/tests/block_device_operations_release_takes_single_argument.c
diff --git a/drbd/drbd-kernel-compat/cocci/block_device_operations_release__no_takes_single_argument.cocci b/drbd/drbd-kernel-compat/cocci/block_device_operations_release__no_takes_single_argument.cocci
new file mode 100644
index 000000000000..b0a0ee9eef39
--- /dev/null
+++ b/drbd/drbd-kernel-compat/cocci/block_device_operations_release__no_takes_single_argument.cocci
@@ -0,0 +1,17 @@
+@@
+identifier gd;
+fresh identifier mode = "" ## "mode";
+@@
+ drbd_release(
+ struct gendisk *gd
++ , fmode_t mode
+ ) { ... }
+
+@@
+symbol drbd_release;
+expression gd;
+@@
+ drbd_release(
+ gd
++ , 0
+ )
diff --git a/drbd/drbd-kernel-compat/gen_patch_names.c b/drbd/drbd-kernel-compat/gen_patch_names.c
index 4761c1ef7d0c..608be8b4f099 100644
--- a/drbd/drbd-kernel-compat/gen_patch_names.c
+++ b/drbd/drbd-kernel-compat/gen_patch_names.c
@@ -565,6 +565,9 @@ int main(int argc, char **argv)
patch(1, "blkdev_put", true, false,
COMPAT_BLKDEV_PUT_HAS_HOLDER, "has_holder");
+ patch(1, "block_device_operations_release", true, false,
+ COMPAT_BLOCK_DEVICE_OPERATIONS_RELEASE_TAKES_SINGLE_ARGUMENT, "takes_single_argument");
+
/* #define BLKDEV_ISSUE_ZEROOUT_EXPORTED */
/* #define BLKDEV_ZERO_NOUNMAP */
diff --git a/drbd/drbd-kernel-compat/tests/block_device_operations_release_takes_single_argument.c b/drbd/drbd-kernel-compat/tests/block_device_operations_release_takes_single_argument.c
new file mode 100644
index 000000000000..d51c863e359a
--- /dev/null
+++ b/drbd/drbd-kernel-compat/tests/block_device_operations_release_takes_single_argument.c
@@ -0,0 +1,7 @@
+/* { "version": "v6.5-rc1", "commit": "ae220766d87cd6799dbf918fea10613ae14c0654", "comment": "block: remove the unused mode argument to ->release", "author": "Christoph Hellwig <hch@lst.de>", "date": "Thu Jun 8 13:02:37 2023 +0200" } */
+#include <linux/blkdev.h>
+
+void foo(struct block_device_operations *ops, struct gendisk *gd)
+{
+ ops->release(gd);
+}
diff --git a/drbd/drbd_main.c b/drbd/drbd_main.c
index bb05b2215dfb..1864861db21d 100644
--- a/drbd/drbd_main.c
+++ b/drbd/drbd_main.c
@@ -53,7 +53,7 @@
#include "drbd_dax_pmem.h"
static int drbd_open(struct gendisk *gd, fmode_t mode);
-static void drbd_release(struct gendisk *gd, fmode_t mode);
+static void drbd_release(struct gendisk *gd);
static void md_sync_timer_fn(struct timer_list *t);
static int w_bitmap_io(struct drbd_work *w, int unused);
static int flush_send_buffer(struct drbd_connection *connection, enum drbd_stream drbd_stream);
@@ -2740,7 +2740,7 @@ out:
mutex_unlock(&resource->open_release);
if (err) {
- drbd_release(gd, mode);
+ drbd_release(gd);
if (err == -EAGAIN && !(mode & FMODE_NDELAY))
err = -EMEDIUMTYPE;
}
@@ -2822,7 +2822,7 @@ void drbd_fsync_device(struct drbd_device *device)
drbd_flush_peer_acks(resource);
}
-static void drbd_release(struct gendisk *gd, fmode_t mode)
+static void drbd_release(struct gendisk *gd)
{
struct drbd_device *device = gd->private_data;
struct drbd_resource *resource = device->resource;
--
2.35.3

View File

@@ -1,66 +0,0 @@
From c8e2a3c4355b4794267cd6e58a074802b4607cb9 Mon Sep 17 00:00:00 2001
From: Joel Colledge <joel.colledge@linbit.com>
Date: Fri, 22 Sep 2023 16:57:24 +0200
Subject: [PATCH 20/20] drbd: do not allow auto-demote to be interrupted by
signal
Pending signals can mess up auto-demote:
drbd res: Preparing cluster-wide state change 671410162 (0->-1 3/2)
drbd res: Aborting cluster-wide state change 671410162 (6ms) rv = -21
drbd res: Auto-demote failed: Interrupted state change
After this state change failure no process has the DRBD device open, but
DRBD remains Primary.
---
drbd/drbd_main.c | 33 +++++++++++++++++++++++----------
1 file changed, 23 insertions(+), 10 deletions(-)
diff --git a/drbd/drbd_main.c b/drbd/drbd_main.c
index 1864861db21d..0719229f210e 100644
--- a/drbd/drbd_main.c
+++ b/drbd/drbd_main.c
@@ -2851,17 +2851,30 @@ static void drbd_release(struct gendisk *gd)
!test_and_set_bit(DESTROYING_DEV, &device->flags))
call_rcu(&device->rcu, drbd_reclaim_device);
- if (resource->res_opts.auto_promote) {
- enum drbd_state_rv rv;
+ if (resource->res_opts.auto_promote &&
+ open_rw_cnt == 0 &&
+ resource->role[NOW] == R_PRIMARY &&
+ !test_bit(EXPLICIT_PRIMARY, &resource->flags)) {
+ sigset_t mask, oldmask;
+ int rv;
+
+ /*
+ * Auto-demote is triggered by the last opener releasing the
+ * DRBD device. However, it is an implicit action, so it should
+ * not be affected by the state of the process. In particular,
+ * it should ignore any pending signals. It may be the case
+ * that the process is releasing DRBD because it is being
+ * terminated using a signal.
+ */
+ sigfillset(&mask);
+ sigprocmask(SIG_BLOCK, &mask, &oldmask);
- if (was_writable && open_rw_cnt == 0 &&
- resource->role[NOW] == R_PRIMARY &&
- !test_bit(EXPLICIT_PRIMARY, &resource->flags)) {
- rv = drbd_set_role(resource, R_SECONDARY, false, "auto-demote", NULL);
- if (rv < SS_SUCCESS)
- drbd_warn(resource, "Auto-demote failed: %s (%d)\n",
- drbd_set_st_err_str(rv), rv);
- }
+ rv = drbd_set_role(resource, R_SECONDARY, false, "auto-demote", NULL);
+ if (rv < SS_SUCCESS)
+ drbd_warn(resource, "Auto-demote failed: %s (%d)\n",
+ drbd_set_st_err_str(rv), rv);
+
+ sigprocmask(SIG_SETMASK, &oldmask, NULL);
}
if (open_ro_cnt == 0 && open_rw_cnt == 0 && resource->fail_io[NOW]) {
--
2.35.3

View File

@@ -1,107 +0,0 @@
From a000a5577210929ca808fe19719186cb7e917f44 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Moritz=20WanzenBug=20Wanzenb=C3=B6ck?=
<moritz.wanzenboeck@linbit.com>
Date: Wed, 13 Sep 2023 13:30:57 +0200
Subject: [PATCH] compat: sock: Remove ->sendpage*() in favour of
sendmsg(MSG_SPLICE_PAGES)
See also upstream Linux kernel commits
dc97391e6610 ("sock: Remove ->sendpage*() in favour of sendmsg(MSG_SPLICE_PAGES)")
eeac7405c735 ("drbd: Use sendmsg(MSG_SPLICE_PAGES) rather than sendpage()")
4b9c2edaf728 ("drbd: swap bvec_set_page len and offset")
Original message:
Remove ->sendpage() and ->sendpage_locked(). sendmsg() with
MSG_SPLICE_PAGES should be used instead. This allows multiple pages and
multipage folios to be passed through.
---
.../cocci/msg_splice_pages__no_present.cocci | 16 ++++++++++++++++
drbd/drbd-kernel-compat/gen_patch_names.c | 3 +++
.../tests/have_msg_splice_pages.c | 7 +++++++
drbd/drbd_transport_tcp.c | 8 ++++++--
4 files changed, 32 insertions(+), 2 deletions(-)
create mode 100644 drbd/drbd-kernel-compat/cocci/msg_splice_pages__no_present.cocci
create mode 100644 drbd/drbd-kernel-compat/tests/have_msg_splice_pages.c
diff --git a/drbd/drbd-kernel-compat/cocci/msg_splice_pages__no_present.cocci b/drbd/drbd-kernel-compat/cocci/msg_splice_pages__no_present.cocci
new file mode 100644
index 000000000000..0fdf77e43737
--- /dev/null
+++ b/drbd/drbd-kernel-compat/cocci/msg_splice_pages__no_present.cocci
@@ -0,0 +1,16 @@
+@@
+expression flags;
+@@
+ flags
+- | MSG_SPLICE_PAGES
+
+@@
+identifier bvec, page, len, offset, msg, socket;
+@@
+- struct bio_vec bvec;
+ ...
+ int sent;
+- bvec_set_page(&bvec, page, len, offset);
+- iov_iter_bvec(&msg.msg_iter, ITER_SOURCE, &bvec, 1, len);
+- sent = sock_sendmsg(socket, &msg);
++ sent = socket->ops->sendpage(socket, page, offset, len, msg.msg_flags);
diff --git a/drbd/drbd-kernel-compat/gen_patch_names.c b/drbd/drbd-kernel-compat/gen_patch_names.c
index 608be8b4f099..6a96c5b89f11 100644
--- a/drbd/drbd-kernel-compat/gen_patch_names.c
+++ b/drbd/drbd-kernel-compat/gen_patch_names.c
@@ -127,6 +127,9 @@ int main(int argc, char **argv)
patch(1, "bvec_kmap_local", true, false,
COMPAT_HAVE_BVEC_KMAP_LOCAL, "present");
+ patch(1, "msg_splice_pages", true, false,
+ COMPAT_HAVE_MSG_SPLICE_PAGES, "present");
+
patch(1, "struct_bvec_iter", true, false,
COMPAT_HAVE_STRUCT_BVEC_ITER, "present");
diff --git a/drbd/drbd-kernel-compat/tests/have_msg_splice_pages.c b/drbd/drbd-kernel-compat/tests/have_msg_splice_pages.c
new file mode 100644
index 000000000000..0bb23ef6d39a
--- /dev/null
+++ b/drbd/drbd-kernel-compat/tests/have_msg_splice_pages.c
@@ -0,0 +1,7 @@
+/* { "version": "v6.5-rc1", "commit": "dc97391e661009eab46783030d2404c9b6e6f2e7", "comment": "sock: Remove ->sendpage*() in favour of sendmsg(MSG_SPLICE_PAGES)", "author": "David Howells <dhowells@redhat.com>", "date": "Fri Jun 23 23:55:12 2023 +0100" } */
+#include <linux/net.h>
+
+int foo(void)
+{
+ return MSG_SPLICE_PAGES;
+}
diff --git a/drbd/drbd_transport_tcp.c b/drbd/drbd_transport_tcp.c
index ca60833f73d7..5dcba50dd0eb 100644
--- a/drbd/drbd_transport_tcp.c
+++ b/drbd/drbd_transport_tcp.c
@@ -1193,18 +1193,22 @@ static int dtt_send_page(struct drbd_transport *transport, enum drbd_stream stre
struct drbd_tcp_transport *tcp_transport =
container_of(transport, struct drbd_tcp_transport, transport);
struct socket *socket = tcp_transport->stream[stream];
+ struct msghdr msg = { .msg_flags = msg_flags | MSG_NOSIGNAL | MSG_SPLICE_PAGES };
+ struct bio_vec bvec;
int len = size;
int err = -EIO;
if (!socket)
return -ENOTCONN;
- msg_flags |= MSG_NOSIGNAL;
dtt_update_congested(tcp_transport);
do {
int sent;
- sent = socket->ops->sendpage(socket, page, offset, len, msg_flags);
+ bvec_set_page(&bvec, page, len, offset);
+ iov_iter_bvec(&msg.msg_iter, ITER_SOURCE, &bvec, 1, len);
+
+ sent = sock_sendmsg(socket, &msg);
if (sent <= 0) {
if (sent == -EAGAIN) {
if (drbd_stream_send_timed_out(transport, stream))
--
2.42.1

View File

@@ -1,183 +0,0 @@
From 2d3c3fd6546174a0452c9bbd64d4f4193c0c39e2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Moritz=20WanzenBug=20Wanzenb=C3=B6ck?=
<moritz.wanzenboeck@linbit.com>
Date: Wed, 13 Sep 2023 11:26:35 +0200
Subject: [PATCH] compat: block: replace fmode_t with a block-specific type for
block open flags
See also upstream Linux kernel commit
05bdb9965305 ("block: replace fmode_t with a block-specific type for block open flags"
Original message:
The only overlap between the block open flags mapped into the fmode_t and
other uses of fmode_t are FMODE_READ and FMODE_WRITE. Define a new
blk_mode_t instead for use in blkdev_get_by_{dev,path}, ->open and
->ioctl and stop abusing fmode_t.
---
.../cocci/blk_mode_t__no_present.cocci | 19 ++++++++++++++
drbd/drbd-kernel-compat/gen_patch_names.c | 3 +++
.../tests/have_blk_mode_t.c | 4 +++
drbd/drbd_main.c | 26 +++++++++----------
4 files changed, 39 insertions(+), 13 deletions(-)
create mode 100644 drbd/drbd-kernel-compat/cocci/blk_mode_t__no_present.cocci
create mode 100644 drbd/drbd-kernel-compat/tests/have_blk_mode_t.c
diff --git a/drbd/drbd-kernel-compat/cocci/blk_mode_t__no_present.cocci b/drbd/drbd-kernel-compat/cocci/blk_mode_t__no_present.cocci
new file mode 100644
index 000000000000..030723c817de
--- /dev/null
+++ b/drbd/drbd-kernel-compat/cocci/blk_mode_t__no_present.cocci
@@ -0,0 +1,19 @@
+@@
+identifier fn;
+identifier mode;
+@@
+ fn (
+ ...,
+- blk_mode_t mode
++ fmode_t mode
+ ) {
+ <...
+(
+- BLK_OPEN_WRITE
++ FMODE_WRITE
+|
+- BLK_OPEN_NDELAY
++ FMODE_NDELAY
+)
+ ...>
+ }
diff --git a/drbd/drbd-kernel-compat/gen_patch_names.c b/drbd/drbd-kernel-compat/gen_patch_names.c
index 6a96c5b89f11..e4a65a3c451e 100644
--- a/drbd/drbd-kernel-compat/gen_patch_names.c
+++ b/drbd/drbd-kernel-compat/gen_patch_names.c
@@ -571,6 +571,9 @@ int main(int argc, char **argv)
patch(1, "block_device_operations_release", true, false,
COMPAT_BLOCK_DEVICE_OPERATIONS_RELEASE_TAKES_SINGLE_ARGUMENT, "takes_single_argument");
+ patch(1, "blk_mode_t", true, false,
+ COMPAT_HAVE_BLK_MODE_T, "present");
+
/* #define BLKDEV_ISSUE_ZEROOUT_EXPORTED */
/* #define BLKDEV_ZERO_NOUNMAP */
diff --git a/drbd/drbd-kernel-compat/tests/have_blk_mode_t.c b/drbd/drbd-kernel-compat/tests/have_blk_mode_t.c
new file mode 100644
index 000000000000..e063bdc30f43
--- /dev/null
+++ b/drbd/drbd-kernel-compat/tests/have_blk_mode_t.c
@@ -0,0 +1,4 @@
+/* { "version": "v6.5-rc1", "commit": "05bdb9965305bbfdae79b31d22df03d1e2cfcb22", "comment": "block: replace fmode_t with a block-specific type for block open flags", "author": "Christoph Hellwig <hch@lst.de>", "date": "Thu Jun 8 13:02:55 2023 +0200" } */
+#include <linux/blkdev.h>
+
+void foo(blk_mode_t mode) {}
diff --git a/drbd/drbd_main.c b/drbd/drbd_main.c
index 0719229f210e..f9560bdff63f 100644
--- a/drbd/drbd_main.c
+++ b/drbd/drbd_main.c
@@ -52,7 +52,7 @@
#include "drbd_meta_data.h"
#include "drbd_dax_pmem.h"
-static int drbd_open(struct gendisk *gd, fmode_t mode);
+static int drbd_open(struct gendisk *gd, blk_mode_t mode);
static void drbd_release(struct gendisk *gd);
static void md_sync_timer_fn(struct timer_list *t);
static int w_bitmap_io(struct drbd_work *w, int unused);
@@ -2566,10 +2566,10 @@ enum ioc_rv {
IOC_ABORT = 2,
};
-static enum ioc_rv inc_open_count(struct drbd_device *device, fmode_t mode)
+static enum ioc_rv inc_open_count(struct drbd_device *device, blk_mode_t mode)
{
struct drbd_resource *resource = device->resource;
- enum ioc_rv r = mode & FMODE_NDELAY ? IOC_ABORT : IOC_SLEEP;
+ enum ioc_rv r = mode & BLK_OPEN_NDELAY ? IOC_ABORT : IOC_SLEEP;
if (test_bit(DOWN_IN_PROGRESS, &resource->flags))
return IOC_ABORT;
@@ -2580,7 +2580,7 @@ static enum ioc_rv inc_open_count(struct drbd_device *device, fmode_t mode)
else if (!resource->remote_state_change) {
r = IOC_OK;
device->open_cnt++;
- if (mode & FMODE_WRITE)
+ if (mode & BLK_OPEN_WRITE)
device->writable = true;
}
read_unlock_irq(&resource->state_rwlock);
@@ -2646,7 +2646,7 @@ out:
spin_unlock(&device->openers_lock);
}
-static int drbd_open(struct gendisk *gd, fmode_t mode)
+static int drbd_open(struct gendisk *gd, blk_mode_t mode)
{
struct drbd_device *device = gd->private_data;
struct drbd_resource *resource = device->resource;
@@ -2655,7 +2655,7 @@ static int drbd_open(struct gendisk *gd, fmode_t mode)
int err = 0;
/* Fail read-only open from systemd-udev (version <= 238) */
- if (!(mode & FMODE_WRITE) && !drbd_allow_oos) {
+ if (!(mode & BLK_OPEN_WRITE) && !drbd_allow_oos) {
char comm[TASK_COMM_LEN];
get_task_comm(comm, current);
if (!strcmp("systemd-udevd", comm))
@@ -2664,7 +2664,7 @@ static int drbd_open(struct gendisk *gd, fmode_t mode)
/* Fail read-write open early,
* in case someone explicitly set us read-only (blockdev --setro) */
- if (bdev_read_only(gd->part0) && (mode & FMODE_WRITE))
+ if (bdev_read_only(gd->part0) && (mode & BLK_OPEN_WRITE))
return -EACCES;
if (resource->fail_io[NOW])
@@ -2693,14 +2693,14 @@ static int drbd_open(struct gendisk *gd, fmode_t mode)
This avoids split brain when the drbd volume gets opened
temporarily by udev while it scans for PV signatures. */
- if (mode & FMODE_WRITE) {
+ if (mode & BLK_OPEN_WRITE) {
if (resource->role[NOW] == R_SECONDARY) {
- rv = try_to_promote(device, timeout, (mode & FMODE_NDELAY));
+ rv = try_to_promote(device, timeout, (mode & BLK_OPEN_NDELAY));
if (rv < SS_SUCCESS)
drbd_info(resource, "Auto-promote failed: %s (%d)\n",
drbd_set_st_err_str(rv), rv);
}
- } else if ((mode & FMODE_NDELAY) == 0) {
+ } else if ((mode & BLK_OPEN_NDELAY) == 0) {
/* Double check peers
*
* Some services may try to first open ro, and only if that
@@ -2720,14 +2720,14 @@ static int drbd_open(struct gendisk *gd, fmode_t mode)
}
}
} else if (resource->role[NOW] != R_PRIMARY &&
- !(mode & FMODE_WRITE) && !drbd_allow_oos) {
+ !(mode & BLK_OPEN_WRITE) && !drbd_allow_oos) {
err = -EMEDIUMTYPE;
goto out;
}
if (test_bit(UNREGISTERED, &device->flags)) {
err = -ENODEV;
- } else if (mode & FMODE_WRITE) {
+ } else if (mode & BLK_OPEN_WRITE) {
if (resource->role[NOW] != R_PRIMARY)
err = -EROFS;
} else /* READ access only */ {
@@ -2741,7 +2741,7 @@ out:
mutex_unlock(&resource->open_release);
if (err) {
drbd_release(gd);
- if (err == -EAGAIN && !(mode & FMODE_NDELAY))
+ if (err == -EAGAIN && !(mode & BLK_OPEN_NDELAY))
err = -EMEDIUMTYPE;
}
--
2.42.1

View File

@@ -1,96 +0,0 @@
From 1412792a443ddc696fd1c8981a6cc544272f54bf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Moritz=20WanzenBug=20Wanzenb=C3=B6ck?=
<moritz.wanzenboeck@linbit.com>
Date: Wed, 13 Sep 2023 15:46:12 +0200
Subject: [PATCH] compat: genetlink: remove userhdr from struct genl_info
See also upstream Linux kernel commit
bffcc6882a1b ("genetlink: remove userhdr from struct genl_info")
Original message:
Only three families use info->userhdr today and going forward
we discourage using fixed headers in new families.
So having the pointer to user header in struct genl_info
is an overkill. Compute the header pointer at runtime.
---
.../cocci/genl_info_userhdr__no_present.cocci | 5 +++++
drbd/drbd-kernel-compat/gen_patch_names.c | 3 +++
drbd/drbd-kernel-compat/tests/have_genl_info_userhdr.c | 7 +++++++
drbd/drbd_nl.c | 6 +++---
4 files changed, 18 insertions(+), 3 deletions(-)
create mode 100644 drbd/drbd-kernel-compat/cocci/genl_info_userhdr__no_present.cocci
create mode 100644 drbd/drbd-kernel-compat/tests/have_genl_info_userhdr.c
diff --git a/drbd/drbd-kernel-compat/cocci/genl_info_userhdr__no_present.cocci b/drbd/drbd-kernel-compat/cocci/genl_info_userhdr__no_present.cocci
new file mode 100644
index 000000000000..75e787797068
--- /dev/null
+++ b/drbd/drbd-kernel-compat/cocci/genl_info_userhdr__no_present.cocci
@@ -0,0 +1,5 @@
+@@
+expression info;
+@@
+- genl_info_userhdr(info)
++ info->userhdr
diff --git a/drbd/drbd-kernel-compat/gen_patch_names.c b/drbd/drbd-kernel-compat/gen_patch_names.c
index e4a65a3c451e..b136acf3148a 100644
--- a/drbd/drbd-kernel-compat/gen_patch_names.c
+++ b/drbd/drbd-kernel-compat/gen_patch_names.c
@@ -574,6 +574,9 @@ int main(int argc, char **argv)
patch(1, "blk_mode_t", true, false,
COMPAT_HAVE_BLK_MODE_T, "present");
+ patch(1, "genl_info_userhdr", true, false,
+ COMPAT_HAVE_GENL_INFO_USERHDR, "present");
+
/* #define BLKDEV_ISSUE_ZEROOUT_EXPORTED */
/* #define BLKDEV_ZERO_NOUNMAP */
diff --git a/drbd/drbd-kernel-compat/tests/have_genl_info_userhdr.c b/drbd/drbd-kernel-compat/tests/have_genl_info_userhdr.c
new file mode 100644
index 000000000000..3c69dacce244
--- /dev/null
+++ b/drbd/drbd-kernel-compat/tests/have_genl_info_userhdr.c
@@ -0,0 +1,7 @@
+/* { "version": "v6.6-rc1", "commit": "bffcc6882a1bb2be8c9420184966f4c2c822078e", "comment": "genetlink: remove userhdr from struct genl_info", "author": "Jakub Kicinski <kuba@kernel.org>", "date": "Mon Aug 14 14:47:16 2023 -0700" } */
+#include <net/genetlink.h>
+
+void *foo(struct genl_info *info)
+{
+ return genl_info_userhdr(info);
+}
diff --git a/drbd/drbd_nl.c b/drbd/drbd_nl.c
index 71ed4272614e..538c31202e4b 100644
--- a/drbd/drbd_nl.c
+++ b/drbd/drbd_nl.c
@@ -203,7 +203,7 @@ static struct drbd_path *first_path(struct drbd_connection *connection)
static int drbd_adm_prepare(struct drbd_config_context *adm_ctx,
struct sk_buff *skb, struct genl_info *info, unsigned flags)
{
- struct drbd_genlmsghdr *d_in = info->userhdr;
+ struct drbd_genlmsghdr *d_in = genl_info_userhdr(info);
const u8 cmd = info->genlhdr->cmd;
int err;
@@ -2106,7 +2106,7 @@ static void drbd_try_suspend_al(struct drbd_device *device)
static bool should_set_defaults(struct genl_info *info)
{
- unsigned flags = ((struct drbd_genlmsghdr*)info->userhdr)->flags;
+ unsigned int flags = ((struct drbd_genlmsghdr *)genl_info_userhdr(info))->flags;
return 0 != (flags & DRBD_GENL_F_SET_DEFAULTS);
}
@@ -6279,7 +6279,7 @@ out_no_unlock:
int drbd_adm_new_minor(struct sk_buff *skb, struct genl_info *info)
{
struct drbd_config_context adm_ctx;
- struct drbd_genlmsghdr *dh = info->userhdr;
+ struct drbd_genlmsghdr *dh = genl_info_userhdr(info);
struct device_conf device_conf;
struct drbd_resource *resource;
struct drbd_device *device;
--
2.42.1

View File

@@ -1,75 +0,0 @@
From 5a09ad97f57eb276dc1e9a84e1c82f11ce1fe1b7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Christoph=20B=C3=B6hmwalder?=
<christoph.boehmwalder@linbit.com>
Date: Thu, 4 Apr 2024 15:53:31 +0200
Subject: [PATCH 1/3] compat: fixup FMODE_READ/FMODE_WRITE usage
Fixes: 4a84d1d0 ("compat: block: replace fmode_t with a block-specific type for block open flags")
---
.../cocci/blk_mode_t__no_present.cocci | 15 +++++++++++++++
drbd/drbd-kernel-compat/gen_patch_names.c | 6 +++---
drbd/drbd_nl.c | 2 +-
3 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/drbd/drbd-kernel-compat/cocci/blk_mode_t__no_present.cocci b/drbd/drbd-kernel-compat/cocci/blk_mode_t__no_present.cocci
index 030723c817de..d1312a093ffe 100644
--- a/drbd/drbd-kernel-compat/cocci/blk_mode_t__no_present.cocci
+++ b/drbd/drbd-kernel-compat/cocci/blk_mode_t__no_present.cocci
@@ -17,3 +17,18 @@ identifier mode;
)
...>
}
+
+@@
+@@
+// special case: bdev_open_by_path takes a blk_mode_t, so convert that too. I can't seem to get
+// coccinelle to match the "READ | WRITE" condition generically, so just hard code it.
+// NOTE: we use blkdev_get_by_path instead of bdev_open_by_path in some compat cases, so support that too.
+(
+bdev_open_by_path
+|
+blkdev_get_by_path
+)
+ (...,
+- BLK_OPEN_READ | BLK_OPEN_WRITE
++ FMODE_READ | FMODE_WRITE
+ , ...)
diff --git a/drbd/drbd-kernel-compat/gen_patch_names.c b/drbd/drbd-kernel-compat/gen_patch_names.c
index b136acf3148a..86a7ce7a93ed 100644
--- a/drbd/drbd-kernel-compat/gen_patch_names.c
+++ b/drbd/drbd-kernel-compat/gen_patch_names.c
@@ -565,15 +565,15 @@ int main(int argc, char **argv)
patch(1, "block_device_operations_open", true, false,
COMPAT_BLOCK_DEVICE_OPERATIONS_OPEN_TAKES_GENDISK, "takes_gendisk");
- patch(1, "blkdev_put", true, false,
- COMPAT_BLKDEV_PUT_HAS_HOLDER, "has_holder");
-
patch(1, "block_device_operations_release", true, false,
COMPAT_BLOCK_DEVICE_OPERATIONS_RELEASE_TAKES_SINGLE_ARGUMENT, "takes_single_argument");
patch(1, "blk_mode_t", true, false,
COMPAT_HAVE_BLK_MODE_T, "present");
+ patch(1, "blkdev_put", true, false,
+ COMPAT_BLKDEV_PUT_HAS_HOLDER, "has_holder");
+
patch(1, "genl_info_userhdr", true, false,
COMPAT_HAVE_GENL_INFO_USERHDR, "present");
diff --git a/drbd/drbd_nl.c b/drbd/drbd_nl.c
index d41ccfcd4bb2..a355f5d5feb1 100644
--- a/drbd/drbd_nl.c
+++ b/drbd/drbd_nl.c
@@ -2566,7 +2566,7 @@ static struct block_device *open_backing_dev(struct drbd_device *device,
const char *bdev_path, void *claim_ptr)
{
struct block_device *bdev = blkdev_get_by_path(bdev_path,
- FMODE_READ | FMODE_WRITE,
+ BLK_OPEN_READ | BLK_OPEN_WRITE,
claim_ptr, NULL);
if (IS_ERR(bdev)) {
drbd_err(device, "open(\"%s\") failed with %ld\n",
--
2.44.0

View File

@@ -1,379 +0,0 @@
From 604f31ab14eeca9eddb42028de93bb89f3ae6515 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Christoph=20B=C3=B6hmwalder?=
<christoph.boehmwalder@linbit.com>
Date: Thu, 4 Apr 2024 16:27:51 +0200
Subject: [PATCH 2/3] compat: drdb: Convert to use bdev_open_by_path()
Equivalent to upstream Linux commit 75e27d373425
("drdb [sic]: Convert to use bdev_open_by_path()"), plus a compat patch.
---
.../cocci/bdev_open_by_path__no_present.cocci | 173 ++++++++++++++++++
drbd/drbd-kernel-compat/gen_patch_names.c | 3 +
.../tests/have_bdev_open_by_path.c | 8 +
drbd/drbd_int.h | 2 +
drbd/drbd_nl.c | 59 +++---
5 files changed, 216 insertions(+), 29 deletions(-)
create mode 100644 drbd/drbd-kernel-compat/cocci/bdev_open_by_path__no_present.cocci
create mode 100644 drbd/drbd-kernel-compat/tests/have_bdev_open_by_path.c
diff --git a/drbd/drbd-kernel-compat/cocci/bdev_open_by_path__no_present.cocci b/drbd/drbd-kernel-compat/cocci/bdev_open_by_path__no_present.cocci
new file mode 100644
index 000000000000..983f05080f79
--- /dev/null
+++ b/drbd/drbd-kernel-compat/cocci/bdev_open_by_path__no_present.cocci
@@ -0,0 +1,173 @@
+@@
+@@
+struct drbd_backing_dev {
+...
+- struct bdev_handle *backing_bdev_handle;
+...
+- struct bdev_handle *md_bdev_handle;
+...
+}
+
+@@
+identifier handle;
+@@
+static void close_backing_dev(...,
+- struct bdev_handle *handle
++ struct block_device *bdev, void *holder
+ , ...
+ )
+{
+<...
+(
+- handle->bdev
++ bdev
+|
+- bdev_release(handle)
++ blkdev_put(bdev, holder)
+|
+- handle
++ bdev
+)
+...>
+}
+
+@@
+identifier device;
+struct bdev_handle *handle;
+identifier err;
+identifier new_disk_conf;
+@@
+// special case: when linking the meta_dev, we want to pass meta_claim_ptr to close instead of device
+err = link_backing_dev(..., new_disk_conf->meta_dev, ...);
+if (err) {
+ ...
+ close_backing_dev(device,
+- handle
++ bdev, meta_claim_ptr
+ , ...);
+ ...
+}
+
+@@
+identifier ldev;
+struct bdev_handle *handle;
+identifier device;
+@@
+// generic close_backing_dev usage
+close_backing_dev(device,
+(
+- ldev->backing_bdev_handle
++ ldev->backing_bdev, device
+|
+- ldev->md_bdev_handle
++ ldev->md_bdev,
++ ldev->md.meta_dev_idx < 0 ? (void *)device : (void *)drbd_m_holder
+|
+- handle
++ bdev, device
+)
+, ...);
+
+@@
+identifier handle;
+@@
+- struct bdev_handle *
++ struct block_device *
+open_backing_dev(...)
+{
+...
+- struct bdev_handle *handle = bdev_open_by_path(
++ struct block_device *bdev = blkdev_get_by_path(
+...);
+<...
+(
+IS_ERR
+|
+PTR_ERR
+)
+ (
+- handle
++ bdev
+ )
+...>
+return
+- handle
++ bdev
+;
+}
+
+@@
+identifier handle;
+identifier err;
+@@
+static int link_backing_dev(...,
+- struct bdev_handle *handle
++ struct block_device *bdev
+ )
+{
+...
+int err = bd_link_disk_holder(
+- handle->bdev
++ bdev
+ , ...);
+if (err) {
+- bdev_release(handle);
+ ...
+}
+...
+}
+
+@@
+identifier device;
+expression bd;
+identifier handle;
+@@
+// generic link_backing_dev usage
+link_backing_dev(device, bd,
+- handle
++ bdev
+ )
+
+@@
+identifier handle;
+@@
+// generic open_backing_dev usage
+{
+...
+- struct bdev_handle *handle;
++ struct block_device *bdev;
+<...
+(
+- handle
++ bdev
+= open_backing_dev(...);
+|
+IS_ERR(
+- handle
++ bdev
+ )
+)
+...>
+}
+
+@@
+struct drbd_backing_dev *nbc;
+identifier handle;
+@@
+(
+- nbc->backing_bdev = handle->bdev;
+- nbc->backing_bdev_handle = handle;
++ nbc->backing_bdev = bdev;
+|
+- nbc->md_bdev = handle->bdev;
+- nbc->md_bdev_handle = handle;
++ nbc->md_bdev = bdev;
+)
+
+@@
+identifier handle;
+identifier nbc;
+@@
+// only this one comparison exists in the code, just special-case it instead of implementing the generic case
+- handle != nbc->backing_bdev_handle
++ bdev != nbc->backing_bdev
diff --git a/drbd/drbd-kernel-compat/gen_patch_names.c b/drbd/drbd-kernel-compat/gen_patch_names.c
index 86a7ce7a93ed..d6fe75a80cf6 100644
--- a/drbd/drbd-kernel-compat/gen_patch_names.c
+++ b/drbd/drbd-kernel-compat/gen_patch_names.c
@@ -559,6 +559,9 @@ int main(int argc, char **argv)
patch(1, "__bio_add_page", true, false,
COMPAT_HAVE___BIO_ADD_PAGE, "present");
+ patch(1, "bdev_open_by_path", true, false,
+ COMPAT_HAVE_BDEV_OPEN_BY_PATH, "present");
+
patch(1, "blkdev_get_by_path", true, false,
COMPAT_BLKDEV_GET_BY_PATH_HAS_HOLDER_OPS, "has_holder_ops");
diff --git a/drbd/drbd-kernel-compat/tests/have_bdev_open_by_path.c b/drbd/drbd-kernel-compat/tests/have_bdev_open_by_path.c
new file mode 100644
index 000000000000..92266de0b15b
--- /dev/null
+++ b/drbd/drbd-kernel-compat/tests/have_bdev_open_by_path.c
@@ -0,0 +1,8 @@
+/* { "version": "v6.7", "commit": "e719b4d156749f02eafed31a3c515f2aa9dcc72a", "comment": "introduce bdev_open_by_* functions", "author": "Jan Kara <jack@suse.cz>", "date": "Wed Sep 27 11:34:07 2023 +0200" } */
+
+#include <linux/blkdev.h>
+
+struct bdev_handle *foo(const char *path, blk_mode_t mode, void *holder,
+ const struct blk_holder_ops *hops) {
+ return bdev_open_by_path(path, mode, holder, hops);
+}
diff --git a/drbd/drbd_int.h b/drbd/drbd_int.h
index cf593c09cda1..a41b228cb13b 100644
--- a/drbd/drbd_int.h
+++ b/drbd/drbd_int.h
@@ -700,7 +700,9 @@ struct drbd_md {
struct drbd_backing_dev {
struct block_device *backing_bdev;
+ struct bdev_handle *backing_bdev_handle;
struct block_device *md_bdev;
+ struct bdev_handle *md_bdev_handle;
struct drbd_md md;
struct disk_conf __rcu *disk_conf; /* RCU, for updates: resource->conf_update */
sector_t known_size; /* last known size of that backing device */
diff --git a/drbd/drbd_nl.c b/drbd/drbd_nl.c
index a355f5d5feb1..6a48287e251e 100644
--- a/drbd/drbd_nl.c
+++ b/drbd/drbd_nl.c
@@ -94,7 +94,7 @@ atomic_t drbd_genl_seq = ATOMIC_INIT(2); /* two. */
DEFINE_MUTEX(notification_mutex);
-/* used blkdev_get_by_path, to claim our meta data device(s) */
+/* used bdev_open_by_path, to claim our meta data device(s) */
static char *drbd_m_holder = "Hands off! this is DRBD's meta data device.";
static void drbd_adm_send_reply(struct sk_buff *skb, struct genl_info *info)
@@ -2535,14 +2535,14 @@ bool want_bitmap(struct drbd_peer_device *peer_device)
return want_bitmap;
}
-static void close_backing_dev(struct drbd_device *device, struct block_device *bdev,
- void *holder, bool do_bd_unlink)
+static void close_backing_dev(struct drbd_device *device,
+ struct bdev_handle *handle, bool do_bd_unlink)
{
- if (!bdev)
+ if (!handle)
return;
if (do_bd_unlink)
- bd_unlink_disk_holder(bdev, device->vdisk);
- blkdev_put(bdev, holder);
+ bd_unlink_disk_holder(handle->bdev, device->vdisk);
+ bdev_release(handle);
}
void drbd_backing_dev_free(struct drbd_device *device, struct drbd_backing_dev *ldev)
@@ -2553,33 +2553,33 @@ void drbd_backing_dev_free(struct drbd_device *device, struct drbd_backing_dev *
drbd_dax_close(ldev);
close_backing_dev(device,
- ldev->md_bdev,
- ldev->md.meta_dev_idx < 0 ? (void *)device : (void *)drbd_m_holder,
+ ldev->md_bdev_handle,
ldev->md_bdev != ldev->backing_bdev);
- close_backing_dev(device, ldev->backing_bdev, device, true);
+ close_backing_dev(device, ldev->backing_bdev_handle, true);
kfree(ldev->disk_conf);
kfree(ldev);
}
-static struct block_device *open_backing_dev(struct drbd_device *device,
+static struct bdev_handle *open_backing_dev(struct drbd_device *device,
const char *bdev_path, void *claim_ptr)
{
- struct block_device *bdev = blkdev_get_by_path(bdev_path,
+ struct bdev_handle *handle = bdev_open_by_path(bdev_path,
BLK_OPEN_READ | BLK_OPEN_WRITE,
claim_ptr, NULL);
- if (IS_ERR(bdev)) {
+ if (IS_ERR(handle)) {
drbd_err(device, "open(\"%s\") failed with %ld\n",
- bdev_path, PTR_ERR(bdev));
+ bdev_path, PTR_ERR(handle));
}
- return bdev;
+ return handle;
}
static int link_backing_dev(struct drbd_device *device,
- const char *bdev_path, struct block_device *bdev)
+ const char *bdev_path, struct bdev_handle *handle)
{
- int err = bd_link_disk_holder(bdev, device->vdisk);
+ int err = bd_link_disk_holder(handle->bdev, device->vdisk);
if (err) {
+ bdev_release(handle);
drbd_err(device, "bd_link_disk_holder(\"%s\", ...) failed with %d\n",
bdev_path, err);
}
@@ -2590,22 +2590,22 @@ static int open_backing_devices(struct drbd_device *device,
struct disk_conf *new_disk_conf,
struct drbd_backing_dev *nbc)
{
- struct block_device *bdev;
+ struct bdev_handle *handle;
void *meta_claim_ptr;
int err;
- bdev = open_backing_dev(device, new_disk_conf->backing_dev, device);
- if (IS_ERR(bdev))
+ handle = open_backing_dev(device, new_disk_conf->backing_dev, device);
+ if (IS_ERR(handle))
return ERR_OPEN_DISK;
- err = link_backing_dev(device, new_disk_conf->backing_dev, bdev);
+ err = link_backing_dev(device, new_disk_conf->backing_dev, handle);
if (err) {
/* close without unlinking; otherwise error path will try to unlink */
- close_backing_dev(device, bdev, device, false);
+ close_backing_dev(device, handle, false);
return ERR_OPEN_DISK;
}
-
- nbc->backing_bdev = bdev;
+ nbc->backing_bdev = handle->bdev;
+ nbc->backing_bdev_handle = handle;
/* meta_claim_ptr: device, if claimed exclusively; shared drbd_m_holder,
* if potentially shared with other drbd minors
@@ -2620,22 +2620,23 @@ static int open_backing_devices(struct drbd_device *device,
* should check it for you already; but if you don't, or
* someone fooled it, we need to double check here)
*/
- bdev = open_backing_dev(device, new_disk_conf->meta_dev, meta_claim_ptr);
- if (IS_ERR(bdev))
+ handle = open_backing_dev(device, new_disk_conf->meta_dev, meta_claim_ptr);
+ if (IS_ERR(handle))
return ERR_OPEN_MD_DISK;
/* avoid double bd_claim_by_disk() for the same (source,target) tuple,
* as would happen with internal metadata. */
- if (bdev != nbc->backing_bdev) {
- err = link_backing_dev(device, new_disk_conf->meta_dev, bdev);
+ if (handle != nbc->backing_bdev_handle) {
+ err = link_backing_dev(device, new_disk_conf->meta_dev, handle);
if (err) {
/* close without unlinking; otherwise error path will try to unlink */
- close_backing_dev(device, bdev, meta_claim_ptr, false);
+ close_backing_dev(device, handle, false);
return ERR_OPEN_MD_DISK;
}
}
- nbc->md_bdev = bdev;
+ nbc->md_bdev = handle->bdev;
+ nbc->md_bdev_handle = handle;
return NO_ERROR;
}
--
2.44.0

View File

@@ -1,41 +0,0 @@
From 6088f29b44fed60d1e631383a9b6f280ff42aaa6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Christoph=20B=C3=B6hmwalder?=
<christoph.boehmwalder@linbit.com>
Date: Thu, 11 Apr 2024 11:59:38 +0200
Subject: [PATCH 3/3] compat: gate blkdev_* patches behind bdev_open_by_path
If we have bdev_open_by_path, there is no need to consider these patches
since they only apply to the (older) blkdev_{get_put}_* functions.
---
drbd/drbd-kernel-compat/gen_patch_names.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drbd/drbd-kernel-compat/gen_patch_names.c b/drbd/drbd-kernel-compat/gen_patch_names.c
index d6fe75a80cf6..8355e723f82c 100644
--- a/drbd/drbd-kernel-compat/gen_patch_names.c
+++ b/drbd/drbd-kernel-compat/gen_patch_names.c
@@ -562,8 +562,10 @@ int main(int argc, char **argv)
patch(1, "bdev_open_by_path", true, false,
COMPAT_HAVE_BDEV_OPEN_BY_PATH, "present");
+#if !defined(COMPAT_HAVE_BDEV_OPEN_BY_PATH)
patch(1, "blkdev_get_by_path", true, false,
COMPAT_BLKDEV_GET_BY_PATH_HAS_HOLDER_OPS, "has_holder_ops");
+#endif
patch(1, "block_device_operations_open", true, false,
COMPAT_BLOCK_DEVICE_OPERATIONS_OPEN_TAKES_GENDISK, "takes_gendisk");
@@ -574,8 +576,10 @@ int main(int argc, char **argv)
patch(1, "blk_mode_t", true, false,
COMPAT_HAVE_BLK_MODE_T, "present");
+#if !defined(COMPAT_HAVE_BDEV_OPEN_BY_PATH)
patch(1, "blkdev_put", true, false,
COMPAT_BLKDEV_PUT_HAS_HOLDER, "has_holder");
+#endif
patch(1, "genl_info_userhdr", true, false,
COMPAT_HAVE_GENL_INFO_USERHDR, "present");
--
2.44.0

View File

@@ -1,59 +0,0 @@
diff -Nupr a/drbd/drbd_nl.c b/drbd/drbd_nl.c
--- a/drbd/drbd_nl.c 2024-08-12 15:03:18.458476462 +0800
+++ b/drbd/drbd_nl.c 2024-08-12 15:05:08.415670056 +0800
@@ -2017,6 +2017,55 @@ static void fixup_discard_support(struct
}
}
+/**
+ * blk_queue_max_hw_sectors - set max sectors for a request for this queue
+ * @q: the request queue for the device
+ * @max_hw_sectors: max hardware sectors in the usual 512b unit
+ *
+ * Description:
+ * Enables a low level driver to set a hard upper limit,
+ * max_hw_sectors, on the size of requests. max_hw_sectors is set by
+ * the device driver based upon the capabilities of the I/O
+ * controller.
+ *
+ * max_dev_sectors is a hard limit imposed by the storage device for
+ * READ/WRITE requests. It is set by the disk driver.
+ *
+ * max_sectors is a soft limit imposed by the block layer for
+ * filesystem type requests. This value can be overridden on a
+ * per-device basis in /sys/block/<device>/queue/max_sectors_kb.
+ * The soft limit can not exceed max_hw_sectors.
+ **/
+static void blk_queue_max_hw_sectors(struct request_queue *q, unsigned int max_hw_sectors)
+{
+ struct queue_limits *limits = &q->limits;
+ unsigned int max_sectors;
+
+ if ((max_hw_sectors << 9) < PAGE_SIZE) {
+ max_hw_sectors = 1 << (PAGE_SHIFT - 9);
+ pr_info("%s: set to minimum %u\n", __func__, max_hw_sectors);
+ }
+
+ max_hw_sectors = round_down(max_hw_sectors,
+ limits->logical_block_size >> SECTOR_SHIFT);
+ limits->max_hw_sectors = max_hw_sectors;
+
+ max_sectors = min_not_zero(max_hw_sectors, limits->max_dev_sectors);
+
+ if (limits->max_user_sectors)
+ max_sectors = min(max_sectors, limits->max_user_sectors);
+ else
+ max_sectors = min(max_sectors, BLK_DEF_MAX_SECTORS_CAP);
+
+ max_sectors = round_down(max_sectors,
+ limits->logical_block_size >> SECTOR_SHIFT);
+ limits->max_sectors = max_sectors;
+
+ if (!q->disk)
+ return;
+ q->disk->bdi->io_pages = max_sectors >> (PAGE_SHIFT - 9);
+}
+
void drbd_reconsider_queue_parameters(struct drbd_device *device, struct drbd_backing_dev *bdev)
{
struct request_queue * const q = device->rq_queue;

View File

@@ -0,0 +1,113 @@
From d084b8c42a167881119e4abb9fdc6dad5509e273 Mon Sep 17 00:00:00 2001
From: Su Yue <glass.su@suse.com>
Date: Tue, 17 Jun 2025 13:38:26 +0800
Subject: [PATCH] drbd: fix build error against kernel v6.15
Upstream commit 8fa7292fee5c ("treewide: Switch/rename to timer_delete[_sync]()")
renamed del_timer[_sync] to timer_delete[_sync]. Convert them all.
Otherwise build fails like:
[ 85s] /home/abuild/rpmbuild/BUILD/drbd-9.1.23-build/drbd-9.1.23/default/./drbd_receiver.c:7128:25: error: implicit declaration of function del_timer; did you mean add_timer? [-Wimplicit-function-declaration]
[ 85s] 7128 | del_timer(&resource->twopc_timer);
[ 85s] | ^~~~~~~~~
[ 85s] | add_timer
[ 85s] /home/abuild/rpmbuild/BUILD/drbd-9.1.23-build/drbd-9.1.23/default/./drbd_receiver.c: In function cleanup_resync_leftovers:
[ 85s] /home/abuild/rpmbuild/BUILD/drbd-9.1.23-build/drbd-9.1.23/default/./drbd_receiver.c:8551:9: error: implicit declaration of function del_timer_sync; did you mean dev_mc_sync? [-Wimplicit-function-declaration]
[ 85s] 8551 | del_timer_sync(&peer_device->resync_timer);
[ 85s] | ^~~~~~~~~~~~~~
[ 85s] | dev_mc_sync
[ 86s] make[3]: *** [/usr/src/linux-6.15.2-1/scripts/Makefile.build:204: drbd_receiver.o] Error 1
Signed-off-by: Su Yue <glass.su@suse.com>
---
drbd/drbd_main.c | 4 ++--
drbd/drbd_nl.c | 2 +-
drbd/drbd_receiver.c | 8 ++++----
drbd/drbd_state.c | 2 +-
4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/drbd/drbd_main.c b/drbd/drbd_main.c
index edb1877074e1..44247e020390 100644
--- a/drbd/drbd_main.c
+++ b/drbd/drbd_main.c
@@ -4198,7 +4198,7 @@ static void shutdown_connect_timer(struct drbd_connection *connection)
void del_connect_timer(struct drbd_connection *connection)
{
- if (del_timer_sync(&connection->connect_timer)) {
+ if (timer_delete_sync(&connection->connect_timer)) {
kref_debug_put(&connection->kref_debug, 11);
kref_put(&connection->kref, drbd_destroy_connection);
}
@@ -4433,7 +4433,7 @@ static int __drbd_md_sync(struct drbd_device *device, bool maybe)
if (!buffer)
goto out;
- del_timer(&device->md_sync_timer);
+ timer_delete(&device->md_sync_timer);
/* timer may be rearmed by drbd_md_mark_dirty() now. */
if (test_and_clear_bit(MD_DIRTY, &device->flags) || !maybe) {
diff --git a/drbd/drbd_nl.c b/drbd/drbd_nl.c
index baa32e4152ab..2b4ef3749867 100644
--- a/drbd/drbd_nl.c
+++ b/drbd/drbd_nl.c
@@ -1715,7 +1715,7 @@ drbd_determine_dev_size(struct drbd_device *device, sector_t peer_current_size,
/* We do some synchronous IO below, which may take some time.
* Clear the timer, to avoid scary "timer expired!" messages,
* "Superblock" is written out at least twice below, anyways. */
- del_timer(&device->md_sync_timer);
+ timer_delete(&device->md_sync_timer);
/* We won't change the "al-extents" setting, we just may need
* to move the on-disk location of the activity log ringbuffer.
diff --git a/drbd/drbd_receiver.c b/drbd/drbd_receiver.c
index 0264adee9014..6604e95054dc 100644
--- a/drbd/drbd_receiver.c
+++ b/drbd/drbd_receiver.c
@@ -7125,7 +7125,7 @@ retry:
drbd_err(resource, "FATAL: Local commit of prepared %u failed! \n",
reply->tid);
- del_timer(&resource->twopc_timer);
+ timer_delete(&resource->twopc_timer);
}
nested_twopc_request(resource, &request);
@@ -8547,9 +8547,9 @@ static void cleanup_resync_leftovers(struct drbd_peer_device *peer_device)
atomic_set(&peer_device->rs_pending_cnt, 0);
wake_up(&peer_device->device->misc_wait);
- del_timer_sync(&peer_device->resync_timer);
+ timer_delete_sync(&peer_device->resync_timer);
resync_timer_fn(&peer_device->resync_timer);
- del_timer_sync(&peer_device->start_resync_timer);
+ timer_delete_sync(&peer_device->start_resync_timer);
}
static void drain_resync_activity(struct drbd_connection *connection)
@@ -8664,7 +8664,7 @@ static void cleanup_remote_state_change(struct drbd_connection *connection)
drbd_info(connection, "Aborting %s state change %u commit not possible\n",
remote ? "remote" : "local", reply->tid);
if (remote) {
- del_timer(&resource->twopc_timer);
+ timer_delete(&resource->twopc_timer);
__clear_remote_state_change(resource);
} else {
enum alt_rv alt_rv = abort_local_transaction(connection, 0);
diff --git a/drbd/drbd_state.c b/drbd/drbd_state.c
index 0e693c8e3af0..9ecc713d5d61 100644
--- a/drbd/drbd_state.c
+++ b/drbd/drbd_state.c
@@ -4171,7 +4171,7 @@ static int w_after_state_change(struct drbd_work *w, int unused)
drbd_disk_str(device->disk_state[NOW]));
/* we may need to cancel the md_sync timer */
- del_timer_sync(&device->md_sync_timer);
+ timer_delete_sync(&device->md_sync_timer);
if (have_ldev)
send_new_state_to_all_peer_devices(state_change, n_device);
--
2.39.5 (Apple Git-154)

View File

@@ -1,216 +0,0 @@
diff -Nupr a/drbd/drbd-kernel-compat/tests/have_bdev_open_by_path.c b/drbd/drbd-kernel-compat/tests/have_bdev_open_by_path.c
--- a/drbd/drbd-kernel-compat/tests/have_bdev_open_by_path.c 2024-06-19 15:02:47.050694378 +0800
+++ b/drbd/drbd-kernel-compat/tests/have_bdev_open_by_path.c 2024-06-19 15:11:39.313298178 +0800
@@ -2,7 +2,7 @@
#include <linux/blkdev.h>
-struct bdev_handle *foo(const char *path, blk_mode_t mode, void *holder,
- const struct blk_holder_ops *hops) {
- return bdev_open_by_path(path, mode, holder, hops);
+void foo(void)
+{
+ return;
}
diff -Nupr a/drbd/drbd-kernel-compat/tests/have_blk_alloc_disk.c b/drbd/drbd-kernel-compat/tests/have_blk_alloc_disk.c
--- a/drbd/drbd-kernel-compat/tests/have_blk_alloc_disk.c 2024-06-19 11:35:39.957400039 +0800
+++ b/drbd/drbd-kernel-compat/tests/have_blk_alloc_disk.c 2024-06-19 11:36:43.594396686 +0800
@@ -2,7 +2,17 @@
#include <linux/blkdev.h>
+#define DRBD_MAX_BIO_SIZE_SAFE (1U << 12) /* Works always = 4k */
+
struct gendisk *foo(int node)
{
- return blk_alloc_disk(node);
+ struct queue_limits lim = {
+ /*
+ * Setting the max_hw_sectors to an odd value of 8kibyte here.
+ * This triggers a max_bio_size message upon first attach or
+ * connect.
+ */
+ .max_hw_sectors = DRBD_MAX_BIO_SIZE_SAFE >> 8,
+ };
+ return blk_alloc_disk(&lim, node);
}
diff -Nupr a/drbd/drbd_int.h b/drbd/drbd_int.h
--- a/drbd/drbd_int.h 2024-06-19 15:33:16.756027168 +0800
+++ b/drbd/drbd_int.h 2024-06-19 15:32:58.459276389 +0800
@@ -700,9 +700,9 @@ struct drbd_md {
struct drbd_backing_dev {
struct block_device *backing_bdev;
- struct bdev_handle *backing_bdev_handle;
+ struct file *backing_bdev_file;
struct block_device *md_bdev;
- struct bdev_handle *md_bdev_handle;
+ struct file *md_bdev_file;
struct drbd_md md;
struct disk_conf __rcu *disk_conf; /* RCU, for updates: resource->conf_update */
sector_t known_size; /* last known size of that backing device */
diff -Nupr a/drbd/drbd_main.c b/drbd/drbd_main.c
--- a/drbd/drbd_main.c 2024-06-19 11:41:59.409367593 +0800
+++ b/drbd/drbd_main.c 2024-06-19 11:41:40.052600574 +0800
@@ -3752,6 +3752,7 @@ static int init_submitter(struct drbd_de
return 0;
}
+#define DRBD_MAX_BIO_SIZE_SAFE (1U << 12) /* Works always = 4k */
enum drbd_ret_code drbd_create_device(struct drbd_config_context *adm_ctx, unsigned int minor,
struct device_conf *device_conf, struct drbd_device **p_device)
{
@@ -3767,6 +3768,15 @@ enum drbd_ret_code drbd_create_device(st
enum drbd_ret_code err = ERR_NOMEM;
bool locked = false;
+ struct queue_limits lim = {
+ /*
+ * Setting the max_hw_sectors to an odd value of 8kibyte here.
+ * This triggers a max_bio_size message upon first attach or
+ * connect.
+ */
+ .max_hw_sectors = DRBD_MAX_BIO_SIZE_SAFE >> 8,
+ };
+
lockdep_assert_held(&resource->conf_update);
device = minor_to_device(minor);
@@ -3824,7 +3834,7 @@ enum drbd_ret_code drbd_create_device(st
init_rwsem(&device->uuid_sem);
- disk = blk_alloc_disk(NUMA_NO_NODE);
+ disk = blk_alloc_disk(&lim, NUMA_NO_NODE);
if (!disk)
goto out_no_disk;
diff -Nupr a/drbd/drbd_nl.c b/drbd/drbd_nl.c
--- a/drbd/drbd_nl.c 2024-06-19 15:16:28.118044330 +0800
+++ b/drbd/drbd_nl.c 2024-06-19 15:32:49.535902019 +0800
@@ -2536,13 +2536,13 @@ bool want_bitmap(struct drbd_peer_device
}
static void close_backing_dev(struct drbd_device *device,
- struct bdev_handle *handle, bool do_bd_unlink)
+ struct file *bdev_file, bool do_bd_unlink)
{
- if (!handle)
+ if (!bdev_file)
return;
if (do_bd_unlink)
- bd_unlink_disk_holder(handle->bdev, device->vdisk);
- bdev_release(handle);
+ bd_unlink_disk_holder(file_bdev(bdev_file), device->vdisk);
+ fput(bdev_file);
}
void drbd_backing_dev_free(struct drbd_device *device, struct drbd_backing_dev *ldev)
@@ -2553,33 +2553,34 @@ void drbd_backing_dev_free(struct drbd_d
drbd_dax_close(ldev);
close_backing_dev(device,
- ldev->md_bdev_handle,
+ ldev->md_bdev_file,
ldev->md_bdev != ldev->backing_bdev);
- close_backing_dev(device, ldev->backing_bdev_handle, true);
+ close_backing_dev(device, ldev->backing_bdev_file, true);
kfree(ldev->disk_conf);
kfree(ldev);
}
-static struct bdev_handle *open_backing_dev(struct drbd_device *device,
+static struct file *open_backing_dev(struct drbd_device *device,
const char *bdev_path, void *claim_ptr)
{
- struct bdev_handle *handle = bdev_open_by_path(bdev_path,
- BLK_OPEN_READ | BLK_OPEN_WRITE,
- claim_ptr, NULL);
- if (IS_ERR(handle)) {
+ struct file *file;
+
+ file = bdev_file_open_by_path(bdev_path, BLK_OPEN_READ | BLK_OPEN_WRITE,
+ claim_ptr, NULL);
+ if (IS_ERR(file)) {
drbd_err(device, "open(\"%s\") failed with %ld\n",
- bdev_path, PTR_ERR(handle));
+ bdev_path, PTR_ERR(file));
}
- return handle;
+ return file;
}
static int link_backing_dev(struct drbd_device *device,
- const char *bdev_path, struct bdev_handle *handle)
+ const char *bdev_path, struct file *file)
{
- int err = bd_link_disk_holder(handle->bdev, device->vdisk);
+ int err = bd_link_disk_holder(file_bdev(file), device->vdisk);
if (err) {
- bdev_release(handle);
+ fput(file);
drbd_err(device, "bd_link_disk_holder(\"%s\", ...) failed with %d\n",
bdev_path, err);
}
@@ -2590,22 +2591,22 @@ static int open_backing_devices(struct d
struct disk_conf *new_disk_conf,
struct drbd_backing_dev *nbc)
{
- struct bdev_handle *handle;
+ struct file *file;
void *meta_claim_ptr;
int err;
- handle = open_backing_dev(device, new_disk_conf->backing_dev, device);
- if (IS_ERR(handle))
+ file = open_backing_dev(device, new_disk_conf->backing_dev, device);
+ if (IS_ERR(file))
return ERR_OPEN_DISK;
- err = link_backing_dev(device, new_disk_conf->backing_dev, handle);
+ err = link_backing_dev(device, new_disk_conf->backing_dev, file);
if (err) {
/* close without unlinking; otherwise error path will try to unlink */
- close_backing_dev(device, handle, false);
+ close_backing_dev(device, file, false);
return ERR_OPEN_DISK;
}
- nbc->backing_bdev = handle->bdev;
- nbc->backing_bdev_handle = handle;
+ nbc->backing_bdev = file_bdev(file);
+ nbc->backing_bdev_file = file;
/* meta_claim_ptr: device, if claimed exclusively; shared drbd_m_holder,
* if potentially shared with other drbd minors
@@ -2620,23 +2621,23 @@ static int open_backing_devices(struct d
* should check it for you already; but if you don't, or
* someone fooled it, we need to double check here)
*/
- handle = open_backing_dev(device, new_disk_conf->meta_dev, meta_claim_ptr);
- if (IS_ERR(handle))
+ file = open_backing_dev(device, new_disk_conf->meta_dev, meta_claim_ptr);
+ if (IS_ERR(file))
return ERR_OPEN_MD_DISK;
/* avoid double bd_claim_by_disk() for the same (source,target) tuple,
* as would happen with internal metadata. */
- if (handle != nbc->backing_bdev_handle) {
- err = link_backing_dev(device, new_disk_conf->meta_dev, handle);
+ if (file != nbc->backing_bdev_file) {
+ err = link_backing_dev(device, new_disk_conf->meta_dev, file);
if (err) {
/* close without unlinking; otherwise error path will try to unlink */
- close_backing_dev(device, handle, false);
+ close_backing_dev(device, file, false);
return ERR_OPEN_MD_DISK;
}
}
- nbc->md_bdev = handle->bdev;
- nbc->md_bdev_handle = handle;
+ nbc->md_bdev = file_bdev(file);
+ nbc->md_bdev_file = file;
return NO_ERROR;
}

BIN
drbd-9.1.16.tar.gz (Stored with Git LFS)

Binary file not shown.

BIN
drbd-9.1.23.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@@ -1,3 +1,306 @@
-------------------------------------------------------------------
Tue Jun 17 05:54:23 UTC 2025 - Glass Su <glass.su@suse.com>
- drbd: fix build error against kernel v6.15 (boo#1244669)
* add upstream patch
+ 0001-compat-follow-Linux-6.14-debugfs_change_name.patch
* add suse special patch
+ boo1244669-fix_build_error_against_kernel_v6.15.patch
* remove patch which is replaced by the upstream patch
- boo1240916-fix_build_error_against_kernel_v6.14.patch
-------------------------------------------------------------------
Wed Apr 9 08:38:57 UTC 2025 - Glass Su <glass.su@suse.com>
- drbd: fix build error against kernel v6.14 (boo#1240916)
* add patch
+ boo1240916-fix_build_error_against_kernel_v6.14.patch
* replace suse special patch with drbd upstream fix
- boo1236927-fix-build_error_against_v6.13.patch
+ 0001-drbd-build-deal-with-potentially-relative-paths-in-p.patch
* remove patch, the issue is already fixed in v6.14 kernel
- boo1235399-fix_the_warning_of_blk_validate_limits.patch
-------------------------------------------------------------------
Sun Feb 9 04:00:30 UTC 2025 - Glass Su <glass.su@suse.com>
- drbd: fix build error against kernel v6.13 (boo#1236927)
* add patch
+ boo1236927-fix-build_error_against_v6.13.patch
-------------------------------------------------------------------
Wed Jan 8 07:08:00 UTC 2025 - Heming Zhao <heming.zhao@suse.com>
- fix the warning of blk_validate_limits when running drbdadm down (boo#1235399)
* add patch
boo1235399-fix_the_warning_of_blk_validate_limits.patch
-------------------------------------------------------------------
Fri Dec 11 02:35:00 UTC 2024 - Heming Zhao <heming.zhao@suse.com>
- Update DRBD version from 9.1.22 to 9.1.23 (boo#1234849)
* Changelog from Linbit:
9.1.23 (api:genl2/proto:86-101,118-121/transport:18)
--------
* Fix a corner case that can happen when DRBD establishes multiple
connections in parallel, which could lead one connection to end up in
an inconsistent replication state of WFBitMapT/Established
* Fix a corner case in which a reconciliation resync ends up in
WFBitMapT/Established
* Restrict protocol compatibility to the most recent 8.4 and 9.0 releases
* Fix a corner case causing a module ref leak on drbd_transport_tcp;
if it hits, you can not rmmod it
* rate-limit resync progress while resync is paused
* resync-target inherits history UUIDs when resync finishes,
this can prevent unexpected "unrelared data" events later
* Updated compatibility code for Linux 6.11 and 6.12
* remove patches which already included in the new version:
0001-drbd-properly-rate-limit-resync-progress-reports.patch
0002-drbd-inherit-history-UUIDs-from-sync-source-when-res.patch
0003-build-compat-fix-line-offset-in-annotation-pragmas-p.patch
0004-drbd-fix-exposed_uuid-going-backward.patch
0005-drbd-Proper-locking-around-new_current_uuid-on-a-dis.patch
0006-build-CycloneDX-fix-bom-ref-add-purl.patch
0007-build-Another-update-to-the-spdx-files.patch
0008-build-generate-spdx.json-not-tag-value-format.patch
0009-compat-fix-gen_patch_names-for-bdev_file_open_by_pat.patch
0010-compat-fix-nla_nest_start_noflag-test.patch
0011-compat-fix-blk_alloc_disk-rule.patch
0012-drbd-remove-const-from-function-return-type.patch
0013-drbd-don-t-set-max_write_zeroes_sectors-in-decide_on.patch
0014-drbd-split-out-a-drbd_discard_supported-helper.patch
0015-drbd-atomically-update-queue-limits-in-drbd_reconsid.patch
0016-compat-test-and-patch-for-queue_limits_start_update.patch
0017-compat-specify-which-essential-change-was-not-made.patch
0018-gen_patch_names-reorder-blk_mode_t.patch
0019-compat-fix-blk_queue_update_readahead-patch.patch
0020-compat-test-and-patch-for-que_limits-max_hw_discard_.patch
0021-compat-fixup-write_zeroes__no_capable.patch
0022-compat-fixup-queue_flag_discard__yes_present.patch
0023-drbd-move-flags-to-queue_limits.patch
0024-compat-test-and-patch-for-queue_limits.features.patch
0025-drbd-Annotate-struct-fifo_buffer-with-__counted_by.patch
0026-compat-test-and-patch-for-__counted_by.patch
0027-drbd-fix-function-cast-warnings-in-state-machine.patch
0028-Add-missing-documentation-of-peer_device-parameter-t.patch
0030-drbd-kref_put-path-when-kernel_accept-fails.patch
0031-build-fix-typo-in-Makefile.spatch.patch
0032-drbd-open-do-not-delay-open-if-already-Primary.patch
* removed patch which is not needed anymore:
boo1231290_fix_drbd_build_error_against_kernel_v6.11.0.patch
boo1233222_fix_drbd_build_error_against_kernel_v6.11.6.patch
* update:
drbd_git_revision
drbd.spec
* add upstream patches to align commit d64ebe7eb7df:
0001-drbd-Fix-memory-leak.patch
-------------------------------------------------------------------
Mon Nov 11 12:23:17 UTC 2024 - Glass Su <glass.su@suse.com>
- drbd: fix build error against kernel v6.11.6 (boo#1233222)
* add patch
+ boo1233222_fix_drbd_build_error_against_kernel_v6.11.6.patch
-------------------------------------------------------------------
Fri Oct 11 03:30:00 UTC 2024 - heming zhao <heming.zhao@suse.com>
- Update DRBD version from 9.1.16 to 9.1.22
* Changelog from Linbit:
9.1.22 (api:genl2/proto:86-121/transport:18)
--------
* Upgrade from partial resync to a full resync if necessary when the
user manually resolves a split-brain situation
* Fix a potential NULL deref when a disk fails while doing a
forget-peer operation.
* Fix a rcu_read_lock()/rcu_read_unlock() imbalance
* Restart the open() syscall when a process auto promoting a drbd device gets
interrupted by a signal
* Remove a deadlock that caused DRBD to connect sometimes
exceptionally slow
* Make detach operations interruptible
* Added dev_is_open to events2 status information
* Improve log readability for 2PC state changes and drbd-threads
* Updated compability code for Linux 6.9
9.1.21 (api:genl2/proto:86-121/transport:18)
--------
* fix a deadlock that can trigger when deleting a connection and
another connection going down in parallel. This is a regression of
9.1.20
* Fix an out-of-bounds access when scanning the bitmap. It leads to a
crash when the bitmap ends on a page boundary, and this is also a
regression in 9.1.20.
9.1.20 (api:genl2/proto:86-121/transport:18)
--------
* Fix a kernel crash that is sometimes triggered when downing drbd
resources in a specific, unusual order (was triggered by the
Kubernetes CSI driver)
* Fix a rarely triggering kernel crash upon adding paths to a
connection by rehauling the path lists' locking
* Fix the continuation of an interrupted initial resync
* Fix the state engine so that an incapable primary does not outdate
indirectly reachable secondary nodes
* Fix a logic bug that caused drbd to pretend that a peer's disk is
outdated when doing a manual disconnect on a down connection; with
that cured impact on fencing and quorum.
* Fix forceful demotion of suspended devices
* Rehaul of the build system to apply compatibility patches out of
place that allows one to build for different target kernels from a
single drbd source tree
* Updated compability code for Linux 6.8
9.1.19 (api:genl2/proto:86-121/transport:18)
--------
* Fix a resync decision case where drbd wrongly decided to do a full
resync, where a partial resync was sufficient; that happened in a
specific connect order when all nodes were on the same data
generation (UUID)
* Fix the online resize code to obey cached size information about
temporal unreachable nodes
* Fix a rare corner case in which DRBD on a diskless primary node
failed to re-issue a read request to another node with a backing
disk upon connection loss on the connection where it shipped the
read request initially
* Make timeout during promotion attempts interruptible
* No longer write activity-log updates on the secondary node in a
cluster with precisely two nodes with backing disk; this is a
performance optimization
* Reduce CPU usage of acknowledgment processing
9.1.18 (api:genl2/proto:86-121/transport:18)
--------
* Fixed connecting nodes with differently sized backing disks,
specifically when the smaller node is primary, before establishing
the connections
* Fixed thawing a device that has I/O frozen after loss of quorum
when a configuration change eases its quorum requirements
* Properly fail TLS if requested (only available in drbd-9.2)
* Fixed a race condition that can cause auto-demote to trigger right
after an explicit promote
* Fixed a rare race condition that could mess up the handshake result
before it is committed to the replication state.
* Preserve "tiebreaker quorum" over a reboot of the last node (3-node
clusters only)
* Update compatibility code for Linux 6.6
9.1.17 (api:genl2/proto:86-121/transport:18)
--------
* fix a potential crash when configuring drbd to bind to a
non-existent local IP address (this is a regression of drbd-9.1.8)
* Cure a very seldom triggering race condition bug during
establishing connections; when you triggered it, you got an OOPS
hinting to list corruption
* fix a race condition regarding operations on the bitmap while
forgetting a bitmap slot and a pointless warning
* Fix handling of unexpected (on a resource in secondary role) write
requests
* Fix a corner case that can cause a process to hang when closing the
DRBD device, while a connection gets re-established
* Correctly block signal delivery during auto-demote
* Improve the reliability of establishing connections
* Do not clear the transport with `net-options --set-defaults`. This
fix avoids unexpected disconnect/connect cycles upon an `adjust`
when using the 'lb-tcp' or 'rdma' transports in drbd-9.2.
* New netlink packet to report path status to drbdsetup
* Improvements to the content and rate-limiting of many log messages
* Update compatibility code and follow Linux upstream development
until Linux 6.5
* remove patches which already included in the new version:
0001-drbd-allow-transports-to-take-additional-krefs-on-a-.patch
0002-drbd-improve-decision-about-marking-a-failed-disk-Ou.patch
0003-drbd-fix-error-path-in-drbd_get_listener.patch
0004-drbd-build-fix-spurious-re-build-attempt-of-compat.p.patch
0005-drbd-log-error-code-when-thread-fails-to-start.patch
0006-drbd-log-numeric-value-of-drbd_state_rv-as-well-as-s.patch
0007-drbd-stop-defining-__KERNEL_SYSCALLS__.patch
0008-compat-block-introduce-holder-ops.patch
0009-drbd-reduce-net_ee-not-empty-info-to-a-dynamic-debug.patch
0010-drbd-do-not-send-P_CURRENT_UUID-to-DRBD-8-peer-when-.patch
0011-compat-block-pass-a-gendisk-to-open.patch
0012-drbd-Restore-DATA_CORKED-and-CONTROL_CORKED-bits.patch
0013-drbd-remove-unused-extern-for-conn_try_outdate_peer.patch
0014-drbd-include-source-of-state-change-in-log.patch
0015-compat-block-use-the-holder-as-indication-for-exclus.patch
0016-drbd-Fix-net-options-set-defaults-to-not-clear-the-t.patch
0017-drbd-propagate-exposed-UUIDs-only-into-established-c.patch
0018-drbd-rework-autopromote.patch
0019-compat-block-remove-the-unused-mode-argument-to-rele.patch
0020-drbd-do-not-allow-auto-demote-to-be-interrupted-by-s.patch
0021-compat-sock-Remove-sendpage-in-favour-of-sendmsg-MSG.patch
0022-compat-block-replace-fmode_t-with-a-block-specific-t.patch
0023-compat-genetlink-remove-userhdr-from-struct-genl_inf.patch
0024-compat-fixup-FMODE_READ-FMODE_WRITE-usage.patch
0025-compat-drdb-Convert-to-use-bdev_open_by_path.patch
0026-compat-gate-blkdev_-patches-behind-bdev_open_by_path.patch
boo1230635_01-compat-fix-nla_nest_start_noflag-test.patch
boo1230635_02-drbd-port-block-device-access-to-file.patch
* removed patches which are not needed anymore:
boo1229062-re-enable-blk_queue_max_hw_sectors.patch
bsc1226510-fix-build-err-against-6.9.3.patch
* update:
drbd_git_revision
suse-coccinelle.patch
drbd.spec
* add upstream patches to align commit 13ada1be201e:
0001-drbd-properly-rate-limit-resync-progress-reports.patch
0002-drbd-inherit-history-UUIDs-from-sync-source-when-res.patch
0003-build-compat-fix-line-offset-in-annotation-pragmas-p.patch
0004-drbd-fix-exposed_uuid-going-backward.patch
0005-drbd-Proper-locking-around-new_current_uuid-on-a-dis.patch
0006-build-CycloneDX-fix-bom-ref-add-purl.patch
0007-build-Another-update-to-the-spdx-files.patch
0008-build-generate-spdx.json-not-tag-value-format.patch
0009-compat-fix-gen_patch_names-for-bdev_file_open_by_pat.patch
0010-compat-fix-nla_nest_start_noflag-test.patch
0011-compat-fix-blk_alloc_disk-rule.patch
0012-drbd-remove-const-from-function-return-type.patch
0013-drbd-don-t-set-max_write_zeroes_sectors-in-decide_on.patch
0014-drbd-split-out-a-drbd_discard_supported-helper.patch
0015-drbd-atomically-update-queue-limits-in-drbd_reconsid.patch
0016-compat-test-and-patch-for-queue_limits_start_update.patch
0017-compat-specify-which-essential-change-was-not-made.patch
0018-gen_patch_names-reorder-blk_mode_t.patch
0019-compat-fix-blk_queue_update_readahead-patch.patch
0020-compat-test-and-patch-for-que_limits-max_hw_discard_.patch
0021-compat-fixup-write_zeroes__no_capable.patch
0022-compat-fixup-queue_flag_discard__yes_present.patch
0023-drbd-move-flags-to-queue_limits.patch
0024-compat-test-and-patch-for-queue_limits.features.patch
0025-drbd-Annotate-struct-fifo_buffer-with-__counted_by.patch
0026-compat-test-and-patch-for-__counted_by.patch
0027-drbd-fix-function-cast-warnings-in-state-machine.patch
0028-Add-missing-documentation-of-peer_device-parameter-t.patch
0030-drbd-kref_put-path-when-kernel_accept-fails.patch
0031-build-fix-typo-in-Makefile.spatch.patch
0032-drbd-open-do-not-delay-open-if-already-Primary.patch
* add patch to fix kernel imcompatibility issue (boo#1231290):
boo1231290_fix_drbd_build_error_against_kernel_v6.11.0.patch
-------------------------------------------------------------------
Tue Sep 17 11:38:00 UTC 2024 - heming zhao <heming.zhao@suse.com>
- drbdadm down fails to remove sysfs holder file (boo#1230635)
* add patch
+ boo1230635_01-compat-fix-nla_nest_start_noflag-test.patch
+ boo1230635_02-drbd-port-block-device-access-to-file.patch
* update patch
+ bsc1226510-fix-build-err-against-6.9.3.patch
-------------------------------------------------------------------
Mon Aug 12 07:37:42 UTC 2024 - heming zhao <heming.zhao@suse.com>

View File

@@ -24,11 +24,11 @@
%endif
%endif
Name: drbd
Version: 9.1.16
Version: 9.1.23
Release: 0
Summary: Linux driver for the "Distributed Replicated Block Device"
License: GPL-2.0-or-later
URL: https://drbd.linbit.com/
URL: https://pkg.linbit.com/
Source: %{name}-%{version}.tar.gz
Source1: preamble
Source2: Module.supported
@@ -36,37 +36,14 @@ Source3: drbd_git_revision
########################
# upstream patch
Patch0001: 0001-drbd-allow-transports-to-take-additional-krefs-on-a-.patch
Patch0002: 0002-drbd-improve-decision-about-marking-a-failed-disk-Ou.patch
Patch0003: 0003-drbd-fix-error-path-in-drbd_get_listener.patch
Patch0004: 0004-drbd-build-fix-spurious-re-build-attempt-of-compat.p.patch
Patch0005: 0005-drbd-log-error-code-when-thread-fails-to-start.patch
Patch0006: 0006-drbd-log-numeric-value-of-drbd_state_rv-as-well-as-s.patch
Patch0007: 0007-drbd-stop-defining-__KERNEL_SYSCALLS__.patch
Patch0008: 0008-compat-block-introduce-holder-ops.patch
Patch0009: 0009-drbd-reduce-net_ee-not-empty-info-to-a-dynamic-debug.patch
Patch0010: 0010-drbd-do-not-send-P_CURRENT_UUID-to-DRBD-8-peer-when-.patch
Patch0011: 0011-compat-block-pass-a-gendisk-to-open.patch
Patch0012: 0012-drbd-Restore-DATA_CORKED-and-CONTROL_CORKED-bits.patch
Patch0013: 0013-drbd-remove-unused-extern-for-conn_try_outdate_peer.patch
Patch0014: 0014-drbd-include-source-of-state-change-in-log.patch
Patch0015: 0015-compat-block-use-the-holder-as-indication-for-exclus.patch
Patch0016: 0016-drbd-Fix-net-options-set-defaults-to-not-clear-the-t.patch
Patch0017: 0017-drbd-propagate-exposed-UUIDs-only-into-established-c.patch
Patch0018: 0018-drbd-rework-autopromote.patch
Patch0019: 0019-compat-block-remove-the-unused-mode-argument-to-rele.patch
Patch0020: 0020-drbd-do-not-allow-auto-demote-to-be-interrupted-by-s.patch
Patch0021: 0021-compat-sock-Remove-sendpage-in-favour-of-sendmsg-MSG.patch
Patch0022: 0022-compat-block-replace-fmode_t-with-a-block-specific-t.patch
Patch0023: 0023-compat-genetlink-remove-userhdr-from-struct-genl_inf.patch
Patch0024: 0024-compat-fixup-FMODE_READ-FMODE_WRITE-usage.patch
Patch0025: 0025-compat-drdb-Convert-to-use-bdev_open_by_path.patch
Patch0026: 0026-compat-gate-blkdev_-patches-behind-bdev_open_by_path.patch
Patch0001: 0001-drbd-Fix-memory-leak.patch
Patch0002: 0001-drbd-build-deal-with-potentially-relative-paths-in-p.patch
Patch0003: 0001-compat-follow-Linux-6.14-debugfs_change_name.patch
# suse special patch
Patch1001: bsc-1025089_fix-resync-finished-with-syncs-have-bits-set.patch
Patch1002: suse-coccinelle.patch
Patch1003: bsc1226510-fix-build-err-against-6.9.3.patch
Patch1004: boo1229062-re-enable-blk_queue_max_hw_sectors.patch
Patch1001: bsc-1025089_fix-resync-finished-with-syncs-have-bits-set.patch
Patch1002: suse-coccinelle.patch
Patch1003: boo1244669-fix_build_error_against_kernel_v6.15.patch
########################
#https://github.com/openSUSE/rpmlint-checks/blob/master/KMPPolicyCheck.py
@@ -75,6 +52,7 @@ BuildRequires: kernel-source
BuildRequires: kernel-syms
BuildRequires: libelf-devel
BuildRequires: modutils
BuildRequires: perl
BuildRequires: %kernel_module_package_buildreqs
Requires: drbd-utils >= 9.3.0
Supplements: drbd-utils >= 9.3.0
@@ -103,10 +81,6 @@ installed kernel.
%prep
%autosetup -p1 -n drbd-%{version}
mkdir source
cp -a drbd/. source/. || :
cp $RPM_SOURCE_DIR/drbd_git_revision source/.drbd_git_revision
%build
rm -rf obj
mkdir obj
@@ -121,22 +95,29 @@ export SPAAS='false'
for flavor in %{flavors_to_build}; do
rm -rf $flavor
cp -a -r source $flavor
cp -a %{_sourcedir}/Module.supported $flavor
cp -a -r drbd $flavor
cp $RPM_SOURCE_DIR/drbd_git_revision ${flavor}/.drbd_git_revision
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}
# call make prep to generate drbd build dir
make %{?_smp_mflags} -C $flavor KDIR=%{kernel_source $flavor} prep SPAAS=${SPAAS} KBUILD_ABS_SRCTREE=1
cp -a %{_sourcedir}/Module.supported ${flavor}/build-current
make %{?_smp_mflags} -C %{kernel_source $flavor} modules M=$PWD/$flavor/build-current SPAAS=${SPAAS}
# Check the compat result
cat $PWD/$flavor/compat.h
cat $PWD/${flavor}/build-current/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
make -C %{kernel_source $flavor} modules_install M=$PWD/$flavor/build-current
done
mkdir -p %{buildroot}/%{_sbindir}

View File

@@ -1 +1 @@
GIT-hash: 288abda1fb8c93e385960af01ab28729fefdaa38
GIT-hash: d64ebe7eb7df8c622b20bca38f3d7f4c7bb033c9

View File

@@ -1,76 +1,71 @@
diff -Naur drbd-9.0.29~0+git.9a7bc817.orig/drbd/drbd-kernel-compat/gen_compat_patch.sh drbd-9.0.29~0+git.9a7bc817/drbd/drbd-kernel-compat/gen_compat_patch.sh
--- drbd-9.0.29~0+git.9a7bc817.orig/drbd/drbd-kernel-compat/gen_compat_patch.sh 2021-05-07 11:24:44.877547149 +0800
+++ drbd-9.0.29~0+git.9a7bc817/drbd/drbd-kernel-compat/gen_compat_patch.sh 2021-05-07 12:30:58.385703306 +0800
@@ -44,9 +44,19 @@
diff -Nupr a/drbd/drbd-kernel-compat/gen_compat_patch.sh b/drbd/drbd-kernel-compat/gen_compat_patch.sh
--- a/drbd/drbd-kernel-compat/gen_compat_patch.sh 2024-09-16 10:24:47.044861735 +0800
+++ b/drbd/drbd-kernel-compat/gen_compat_patch.sh 2024-09-16 10:32:03.256040980 +0800
@@ -43,9 +43,19 @@ fi
if hash spatch && spatch_is_recent; then
K=$(cat $incdir/kernelrelease.txt)
K=$(cat $incdir/kernelrelease.txt || echo unknown kernel release)
+
+ echo " compat.h content ";
+ cat $incdir/compat.h;
+ echo " ------------------- ";
+ echo " compat.h content ";
+ cat $incdir/compat.h;
+ echo " ------------------- ";
+
echo " GENPATCHNAMES "$K
gcc -I $incdir -o $incdir/gen_patch_names -std=c99 drbd-kernel-compat/gen_patch_names.c
$incdir/gen_patch_names > $incdir/applied_cocci_files.txt
echo " GENPATCHNAMES "$K
gcc -I $incdir -o $incdir/gen_patch_names -std=c99 drbd-kernel-compat/gen_patch_names.c
$incdir/gen_patch_names > $incdir/applied_cocci_files.txt
+
+ echo " APPLIED_COCCI_FILES ";
+ cat $incdir/applied_cocci_files.txt;
+ echo " ------------------- ";
+ echo " APPLIED_COCCI_FILES ";
+ cat $incdir/applied_cocci_files.txt;
+ echo " ------------------- ";
+
rm $incdir/gen_patch_names
rm -f $incdir/.compat.cocci
rm -f $incdir/.compat.patch
@@ -67,7 +77,15 @@
< drbd-kernel-compat/cocci/debugfs_compat_template.cocci.in \
>> $incdir/.compat.cocci
done
+
+ coccilibpath=$(rpm -ql coccinelle|grep standard.h|xargs dirname);
+ echo " SPATCH_SOURCES: "$*;
+ echo " COCCI_LIBPATH: "$coccilibpath;
+
if [ -e $incdir/.compat.cocci ]; then
+ 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
@@ -77,8 +95,14 @@
# we know we don't have white-space in the argument list
rm $incdir/gen_patch_names
# truncat them all
: > $incdir/.compat.cocci
@@ -72,15 +82,28 @@ if hash spatch && spatch_is_recent; then
>> $incdir/.compat.cocci.tmp
done
set +e
+ coccilibpath=$(rpm -ql coccinelle|grep standard.h|xargs dirname);
+ echo " SPATCH_SOURCES: "$*;
+ echo " COCCI_LIBPATH: "$coccilibpath;
+
+ 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 --all-includes > $compat_patch.tmp 2> $incdir/.spatch.stderr"
+ echo " SPATCH COMMAND $command ";
mv $incdir/.compat.cocci.tmp $incdir/.compat.cocci
mv $incdir/.compat.patch.tmp $incdir/.compat.patch
if [ -s $incdir/.compat.cocci ]; then
+ echo " GENCOCCIRULES .compat.cocci";
+ cat $incdir/.compat.cocci;
+
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 \
--all-includes \
> "$compat_patch.tmp" \
@@ -94,9 +118,21 @@
echo " SPATCH $chksum "$K" - nothing to do"
touch $compat_patch.tmp
fi
# sources=( ... ) passed in via environment
echo " SPATCH $chksum "$K
set +e
+
+ echo " GENSPATCHFILE $compat_patch.tmp ";
+ cat $compat_patch.tmp;
+ 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 --all-includes > $compat_patch.tmp 2> $incdir/.spatch.stderr"
+ echo " SPATCH COMMAND $command ";
+
if [ -e $incdir/.compat.patch ]; then
+ echo " EXIST $incdir/.compat.patch ";
cat $incdir/.compat.patch >> $compat_patch.tmp
spatch --sp-file "$incdir/.compat.cocci" "${sources[@]}" \
--macro-file drbd-kernel-compat/cocci_macros.h \
+ --macro-file-builtins $coccilibpath/standard.h \
+ --iso-file $coccilibpath/standard.iso \
--very-quiet \
--all-includes \
${SPATCH_DEBUG:+ --debug} \
@@ -101,8 +124,18 @@ if hash spatch && spatch_is_recent; then
echo " SPATCH $chksum "$K" - nothing to do"
fi
+ echo " GENSPATCHFILE $compat_patch.tmp ";
+ cat $compat_patch.tmp;
fi
+
+ if [ -e $incdir/.spatch.stderr ]; then
+ echo " GENSPATCHERR .spatch.stderr";
+ cat $incdir/.spatch.stderr;
+ fi
if [ -s $incdir/.compat.patch ]; then
+ echo " EXIST $incdir/.compat.patch ";
cat $incdir/.compat.patch >> $compat_patch.tmp
+ cat $compat_patch.tmp;
+ fi
+
mv $compat_patch.tmp $compat_patch
# keep it around
# to better be able to match the "stderr" warnings to their source files
+ if [ -e $incdir/.spatch.stderr ]; then
+ echo " GENSPATCHERR .spatch.stderr";
+ cat $incdir/.spatch.stderr;
fi
if [ -s $compat_patch.tmp ]; then