diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-08-29 04:20:45 -0400 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2017-08-29 17:34:46 -0400 |
commit | 8ab761e17efa75449db2d71dc6fabf96d110588c (patch) | |
tree | ae88a98bdfd1e2935e9929edc58dfc3811001b4e | |
parent | cde81d99afa4112eecef3f45129b5827f6ac158e (diff) |
drbd: rename "usermode_helper" to "drbd_usermode_helper"
Nothing like having a very generic global variable in a tiny driver
subsystem to make a mess of the global namespace...
Note, there are many other "generic" named global variables in the drbd
subsystem, someone should fix those up one day before they hit a linking
error.
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r-- | drivers/block/drbd/drbd_int.h | 2 | ||||
-rw-r--r-- | drivers/block/drbd/drbd_main.c | 4 | ||||
-rw-r--r-- | drivers/block/drbd/drbd_nl.c | 20 |
3 files changed, 13 insertions, 13 deletions
diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h index 74a7d0b70e2c..61596af86ad8 100644 --- a/drivers/block/drbd/drbd_int.h +++ b/drivers/block/drbd/drbd_int.h | |||
@@ -75,7 +75,7 @@ extern int fault_rate; | |||
75 | extern int fault_devs; | 75 | extern int fault_devs; |
76 | #endif | 76 | #endif |
77 | 77 | ||
78 | extern char usermode_helper[]; | 78 | extern char drbd_usermode_helper[]; |
79 | 79 | ||
80 | 80 | ||
81 | /* This is used to stop/restart our threads. | 81 | /* This is used to stop/restart our threads. |
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c index 8b8dd82da3c4..bdd9ab286a48 100644 --- a/drivers/block/drbd/drbd_main.c +++ b/drivers/block/drbd/drbd_main.c | |||
@@ -109,9 +109,9 @@ int proc_details; /* Detail level in proc drbd*/ | |||
109 | 109 | ||
110 | /* Module parameter for setting the user mode helper program | 110 | /* Module parameter for setting the user mode helper program |
111 | * to run. Default is /sbin/drbdadm */ | 111 | * to run. Default is /sbin/drbdadm */ |
112 | char usermode_helper[80] = "/sbin/drbdadm"; | 112 | char drbd_usermode_helper[80] = "/sbin/drbdadm"; |
113 | 113 | ||
114 | module_param_string(usermode_helper, usermode_helper, sizeof(usermode_helper), 0644); | 114 | module_param_string(usermode_helper, drbd_usermode_helper, sizeof(drbd_usermode_helper), 0644); |
115 | 115 | ||
116 | /* in 2.6.x, our device mapping and config info contains our virtual gendisks | 116 | /* in 2.6.x, our device mapping and config info contains our virtual gendisks |
117 | * as member "struct gendisk *vdisk;" | 117 | * as member "struct gendisk *vdisk;" |
diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c index 6bb58a6836ed..a12f77e6891e 100644 --- a/drivers/block/drbd/drbd_nl.c +++ b/drivers/block/drbd/drbd_nl.c | |||
@@ -344,7 +344,7 @@ int drbd_khelper(struct drbd_device *device, char *cmd) | |||
344 | (char[60]) { }, /* address */ | 344 | (char[60]) { }, /* address */ |
345 | NULL }; | 345 | NULL }; |
346 | char mb[14]; | 346 | char mb[14]; |
347 | char *argv[] = {usermode_helper, cmd, mb, NULL }; | 347 | char *argv[] = {drbd_usermode_helper, cmd, mb, NULL }; |
348 | struct drbd_connection *connection = first_peer_device(device)->connection; | 348 | struct drbd_connection *connection = first_peer_device(device)->connection; |
349 | struct sib_info sib; | 349 | struct sib_info sib; |
350 | int ret; | 350 | int ret; |
@@ -359,19 +359,19 @@ int drbd_khelper(struct drbd_device *device, char *cmd) | |||
359 | * write out any unsynced meta data changes now */ | 359 | * write out any unsynced meta data changes now */ |
360 | drbd_md_sync(device); | 360 | drbd_md_sync(device); |
361 | 361 | ||
362 | drbd_info(device, "helper command: %s %s %s\n", usermode_helper, cmd, mb); | 362 | drbd_info(device, "helper command: %s %s %s\n", drbd_usermode_helper, cmd, mb); |
363 | sib.sib_reason = SIB_HELPER_PRE; | 363 | sib.sib_reason = SIB_HELPER_PRE; |
364 | sib.helper_name = cmd; | 364 | sib.helper_name = cmd; |
365 | drbd_bcast_event(device, &sib); | 365 | drbd_bcast_event(device, &sib); |
366 | notify_helper(NOTIFY_CALL, device, connection, cmd, 0); | 366 | notify_helper(NOTIFY_CALL, device, connection, cmd, 0); |
367 | ret = call_usermodehelper(usermode_helper, argv, envp, UMH_WAIT_PROC); | 367 | ret = call_usermodehelper(drbd_usermode_helper, argv, envp, UMH_WAIT_PROC); |
368 | if (ret) | 368 | if (ret) |
369 | drbd_warn(device, "helper command: %s %s %s exit code %u (0x%x)\n", | 369 | drbd_warn(device, "helper command: %s %s %s exit code %u (0x%x)\n", |
370 | usermode_helper, cmd, mb, | 370 | drbd_usermode_helper, cmd, mb, |
371 | (ret >> 8) & 0xff, ret); | 371 | (ret >> 8) & 0xff, ret); |
372 | else | 372 | else |
373 | drbd_info(device, "helper command: %s %s %s exit code %u (0x%x)\n", | 373 | drbd_info(device, "helper command: %s %s %s exit code %u (0x%x)\n", |
374 | usermode_helper, cmd, mb, | 374 | drbd_usermode_helper, cmd, mb, |
375 | (ret >> 8) & 0xff, ret); | 375 | (ret >> 8) & 0xff, ret); |
376 | sib.sib_reason = SIB_HELPER_POST; | 376 | sib.sib_reason = SIB_HELPER_POST; |
377 | sib.helper_exit_code = ret; | 377 | sib.helper_exit_code = ret; |
@@ -396,24 +396,24 @@ enum drbd_peer_state conn_khelper(struct drbd_connection *connection, char *cmd) | |||
396 | (char[60]) { }, /* address */ | 396 | (char[60]) { }, /* address */ |
397 | NULL }; | 397 | NULL }; |
398 | char *resource_name = connection->resource->name; | 398 | char *resource_name = connection->resource->name; |
399 | char *argv[] = {usermode_helper, cmd, resource_name, NULL }; | 399 | char *argv[] = {drbd_usermode_helper, cmd, resource_name, NULL }; |
400 | int ret; | 400 | int ret; |
401 | 401 | ||
402 | setup_khelper_env(connection, envp); | 402 | setup_khelper_env(connection, envp); |
403 | conn_md_sync(connection); | 403 | conn_md_sync(connection); |
404 | 404 | ||
405 | drbd_info(connection, "helper command: %s %s %s\n", usermode_helper, cmd, resource_name); | 405 | drbd_info(connection, "helper command: %s %s %s\n", drbd_usermode_helper, cmd, resource_name); |
406 | /* TODO: conn_bcast_event() ?? */ | 406 | /* TODO: conn_bcast_event() ?? */ |
407 | notify_helper(NOTIFY_CALL, NULL, connection, cmd, 0); | 407 | notify_helper(NOTIFY_CALL, NULL, connection, cmd, 0); |
408 | 408 | ||
409 | ret = call_usermodehelper(usermode_helper, argv, envp, UMH_WAIT_PROC); | 409 | ret = call_usermodehelper(drbd_usermode_helper, argv, envp, UMH_WAIT_PROC); |
410 | if (ret) | 410 | if (ret) |
411 | drbd_warn(connection, "helper command: %s %s %s exit code %u (0x%x)\n", | 411 | drbd_warn(connection, "helper command: %s %s %s exit code %u (0x%x)\n", |
412 | usermode_helper, cmd, resource_name, | 412 | drbd_usermode_helper, cmd, resource_name, |
413 | (ret >> 8) & 0xff, ret); | 413 | (ret >> 8) & 0xff, ret); |
414 | else | 414 | else |
415 | drbd_info(connection, "helper command: %s %s %s exit code %u (0x%x)\n", | 415 | drbd_info(connection, "helper command: %s %s %s exit code %u (0x%x)\n", |
416 | usermode_helper, cmd, resource_name, | 416 | drbd_usermode_helper, cmd, resource_name, |
417 | (ret >> 8) & 0xff, ret); | 417 | (ret >> 8) & 0xff, ret); |
418 | /* TODO: conn_bcast_event() ?? */ | 418 | /* TODO: conn_bcast_event() ?? */ |
419 | notify_helper(NOTIFY_RESPONSE, NULL, connection, cmd, ret); | 419 | notify_helper(NOTIFY_RESPONSE, NULL, connection, cmd, ret); |