4 Commits

4 changed files with 136 additions and 0 deletions

View File

@@ -0,0 +1,75 @@
diff -Nupr a/drbd/drbd_main.c b/drbd/drbd_main.c
--- a/drbd/drbd_main.c 2025-08-21 14:44:46.984914125 +0800
+++ b/drbd/drbd_main.c 2025-08-21 15:10:06.446017689 +0800
@@ -3448,7 +3448,7 @@ void drbd_flush_peer_acks(struct drbd_re
static void peer_ack_timer_fn(struct timer_list *t)
{
- struct drbd_resource *resource = from_timer(resource, t, peer_ack_timer);
+ struct drbd_resource *resource = timer_container_of(resource, t, peer_ack_timer);
drbd_flush_peer_acks(resource);
}
@@ -5669,7 +5669,7 @@ bool drbd_md_test_peer_flag(struct drbd_
static void md_sync_timer_fn(struct timer_list *t)
{
- struct drbd_device *device = from_timer(device, t, md_sync_timer);
+ struct drbd_device *device = timer_container_of(device, t, md_sync_timer);
drbd_device_post_work(device, MD_SYNC);
}
diff -Nupr a/drbd/drbd_receiver.c b/drbd/drbd_receiver.c
--- a/drbd/drbd_receiver.c 2025-08-21 14:44:46.986561189 +0800
+++ b/drbd/drbd_receiver.c 2025-08-21 15:08:24.900616061 +0800
@@ -862,7 +862,7 @@ void wait_initial_states_received(struct
void connect_timer_fn(struct timer_list *t)
{
- struct drbd_connection *connection = from_timer(connection, t, connect_timer);
+ struct drbd_connection *connection = timer_container_of(connection, t, connect_timer);
drbd_queue_work(&connection->sender_work, &connection->connect_timer_work);
}
@@ -6334,7 +6334,7 @@ static void drbd_abort_twopc(struct drbd
void twopc_timer_fn(struct timer_list *t)
{
- struct drbd_resource *resource = from_timer(resource, t, twopc_timer);
+ struct drbd_resource *resource = timer_container_of(resource, t, twopc_timer);
unsigned long irq_flags;
write_lock_irqsave(&resource->state_rwlock, irq_flags);
diff -Nupr a/drbd/drbd_req.c b/drbd/drbd_req.c
--- a/drbd/drbd_req.c 2024-10-08 16:32:16.022936573 +0800
+++ b/drbd/drbd_req.c 2025-08-21 15:09:04.659773315 +0800
@@ -2588,7 +2588,7 @@ static bool net_timeout_reached(struct d
void request_timer_fn(struct timer_list *t)
{
- struct drbd_device *device = from_timer(device, t, request_timer);
+ struct drbd_device *device = timer_container_of(device, t, request_timer);
struct drbd_resource *resource = device->resource;
struct drbd_connection *connection;
struct drbd_request *req_read, *req_write;
diff -Nupr a/drbd/drbd_sender.c b/drbd/drbd_sender.c
--- a/drbd/drbd_sender.c 2024-10-08 16:32:16.022936573 +0800
+++ b/drbd/drbd_sender.c 2025-08-21 15:06:05.719090321 +0800
@@ -496,7 +496,7 @@ int w_send_uuids(struct drbd_work *w, in
void resync_timer_fn(struct timer_list *t)
{
- struct drbd_peer_device *peer_device = from_timer(peer_device, t, resync_timer);
+ struct drbd_peer_device *peer_device = timer_container_of(peer_device, t, resync_timer);
drbd_queue_work_if_unqueued(
&peer_device->connection->sender_work,
@@ -2067,7 +2067,7 @@ void drbd_rs_controller_reset(struct drb
void start_resync_timer_fn(struct timer_list *t)
{
- struct drbd_peer_device *peer_device = from_timer(peer_device, t, start_resync_timer);
+ struct drbd_peer_device *peer_device = timer_container_of(peer_device, t, start_resync_timer);
drbd_peer_device_post_work(peer_device, RS_START);
}

View File

@@ -0,0 +1,45 @@
For details, check boo#1251834
---
diff -Nupr a/drbd/drbd_dax_pmem.c b/drbd/drbd_dax_pmem.c
--- a/drbd/drbd_dax_pmem.c 2025-10-10 14:08:56.052716428 +0800
+++ b/drbd/drbd_dax_pmem.c 2025-10-10 14:09:30.526227702 +0800
@@ -22,7 +22,6 @@
#include <linux/vmalloc.h>
#include <linux/slab.h>
#include <linux/dax.h>
-#include <linux/pfn_t.h>
#include <linux/libnvdimm.h>
#include <linux/blkdev.h>
#include "drbd_int.h"
@@ -35,7 +34,7 @@ static int map_superblock_for_dax(struct
pgoff_t pgoff = bdev->md.md_offset >> (PAGE_SHIFT - SECTOR_SHIFT);
void *kaddr;
long len;
- pfn_t pfn_unused; /* before 4.18 it is required to pass in non-NULL */
+ unsigned long pfn_unused; /* before 4.18 it is required to pass in non-NULL */
int id;
id = dax_read_lock();
@@ -93,7 +92,7 @@ int drbd_dax_map(struct drbd_backing_dev
long al_offset_byte = (al_sector - first_sector) << SECTOR_SHIFT;
void *kaddr;
long len;
- pfn_t pfn_unused; /* before 4.18 it is required to pass in non-NULL */
+ unsigned long pfn_unused; /* before 4.18 it is required to pass in non-NULL */
int id;
id = dax_read_lock();
diff -Nupr a/drbd/drbd-kernel-compat/tests/dax_direct_access_takes_mode.c b/drbd/drbd-kernel-compat/tests/dax_direct_access_takes_mode.c
--- a/drbd/drbd-kernel-compat/tests/dax_direct_access_takes_mode.c 2025-10-10 14:08:41.597662468 +0800
+++ b/drbd/drbd-kernel-compat/tests/dax_direct_access_takes_mode.c 2025-10-10 14:09:58.190282356 +0800
@@ -3,7 +3,7 @@
#include <linux/dax.h>
long foo(struct dax_device *dax_dev, pgoff_t pgoff, long nr_pages,
- enum dax_access_mode mode, void **kaddr, pfn_t *pfn)
+ enum dax_access_mode mode, void **kaddr, unsigned long *pfn)
{
return dax_direct_access(dax_dev, pgoff, nr_pages, mode, kaddr, pfn);
}

View File

@@ -1,3 +1,17 @@
-------------------------------------------------------------------
Fri Oct 10 06:23:00 UTC 2025 - heming zhao <heming.zhao@suse.com>
- drbd: fix build error against kernel v6.17.0 (boo#1251834)
* add suse special patch
+ boo1251834-fix_build_error_against_kernel_v6.17.0.patch
-------------------------------------------------------------------
Thu Aug 21 07:25:08 UTC 2025 - heming zhao <heming.zhao@suse.com>
- drbd: fix build error against kernel v6.16.1 (boo#1248426)
* add suse special patch
+ boo1248426-fix_build_error_against_kernel_v6.16.1.patch
-------------------------------------------------------------------
Tue Jun 17 05:54:23 UTC 2025 - Glass Su <glass.su@suse.com>

View File

@@ -44,6 +44,8 @@ Patch0003: 0001-compat-follow-Linux-6.14-debugfs_change_name.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
Patch1004: boo1248426-fix_build_error_against_kernel_v6.16.1.patch
Patch1005: boo1251834-fix_build_error_against_kernel_v6.17.0.patch
########################
#https://github.com/openSUSE/rpmlint-checks/blob/master/KMPPolicyCheck.py