Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Step:15-SP4
drbd.24681
drbd-remove-device_to_minor.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File drbd-remove-device_to_minor.patch of Package drbd.24681
From 4e466527e059d20e7ed3e682f3ff808c2ea3120f Mon Sep 17 00:00:00 2001 From: Philipp Reisner <philipp.reisner@linbit.com> Date: Mon, 3 May 2021 10:43:30 +0200 Subject: [PATCH] drbd: remove device_to_minor() it is pointless now --- drbd/drbd_int.h | 5 ----- drbd/drbd_main.c | 4 ++-- drbd/drbd_nl.c | 2 +- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/drbd/drbd_int.h b/drbd/drbd_int.h index d49ce150..a4f4ce80 100644 --- a/drbd/drbd_int.h +++ b/drbd/drbd_int.h @@ -1490,11 +1490,6 @@ static inline unsigned drbd_req_state_by_peer_device(struct drbd_request *req, peer_device; \ peer_device = __drbd_next_peer_device_ref(&m, peer_device, device)) -static inline unsigned int device_to_minor(struct drbd_device *device) -{ - return device->minor; -} - /* * function declarations *************************/ diff --git a/drbd/drbd_main.c b/drbd/drbd_main.c index 7a5aa9b2..4953b14f 100644 --- a/drbd/drbd_main.c +++ b/drbd/drbd_main.c @@ -3888,7 +3888,7 @@ void drbd_unregister_device(struct drbd_device *device) idr_remove(&connection->peer_devices, device->vnr); } idr_remove(&resource->devices, device->vnr); - idr_remove(&drbd_devices, device_to_minor(device)); + idr_remove(&drbd_devices, device->minor); spin_unlock_irq(&resource->req_lock); for_each_peer_device(peer_device, device) @@ -5547,7 +5547,7 @@ _drbd_insert_fault(struct drbd_device *device, unsigned int type) unsigned int ret = ( (drbd_fault_devs == 0 || - ((1 << device_to_minor(device)) & drbd_fault_devs) != 0) && + ((1 << device->minor) & drbd_fault_devs) != 0) && (((_drbd_fault_random(&rrs) % 100) + 1) <= drbd_fault_rate)); if (ret) { diff --git a/drbd/drbd_nl.c b/drbd/drbd_nl.c index a570a77e..80f466f8 100644 --- a/drbd/drbd_nl.c +++ b/drbd/drbd_nl.c @@ -608,7 +608,7 @@ static int drbd_khelper(struct drbd_device *device, struct drbd_connection *conn env_print(&env, "TERM=linux"); env_print(&env, "PATH=/sbin:/usr/sbin:/bin:/usr/bin"); if (device) { - env_print(&env, "DRBD_MINOR=%u", device_to_minor(device)); + env_print(&env, "DRBD_MINOR=%u", device->minor); env_print(&env, "DRBD_VOLUME=%u", device->vnr); if (get_ldev(device)) { struct disk_conf *disk_conf = -- 2.16.4
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor