Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 242887
b: refs/heads/master
c: 2b8a90b
h: refs/heads/master
i:
  242885: 4df52e7
  242883: 7b432f8
  242879: eb8ccdc
v: v3
  • Loading branch information
Philipp Reisner committed Mar 10, 2011
1 parent 54e0418 commit 36090d9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 110a204a354a5a69f99ed0bc8e6d779e6a94d410
refs/heads/master: 2b8a90b55533c66258a1ff0fb27b8cffa95665c4
7 changes: 4 additions & 3 deletions trunk/drivers/block/drbd/drbd_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ MODULE_AUTHOR("Philipp Reisner <phil@linbit.com>, "
MODULE_DESCRIPTION("drbd - Distributed Replicated Block Device v" REL_VERSION);
MODULE_VERSION(REL_VERSION);
MODULE_LICENSE("GPL");
MODULE_PARM_DESC(minor_count, "Maximum number of drbd devices (1-255)");
MODULE_PARM_DESC(minor_count, "Maximum number of drbd devices ("
__stringify(DRBD_MINOR_COUNT_MIN) "-" __stringify(DRBD_MINOR_COUNT_MAX) ")");
MODULE_ALIAS_BLOCKDEV_MAJOR(DRBD_MAJOR);

#include <linux/moduleparam.h>
Expand Down Expand Up @@ -115,7 +116,7 @@ module_param(fault_devs, int, 0644);
#endif

/* module parameter, defined */
unsigned int minor_count = 32;
unsigned int minor_count = DRBD_MINOR_COUNT_DEF;
int disable_sendpage;
int allow_oos;
unsigned int cn_idx = CN_IDX_DRBD;
Expand Down Expand Up @@ -3456,7 +3457,7 @@ int __init drbd_init(void)
return -EINVAL;
}

if (1 > minor_count || minor_count > 255) {
if (minor_count < DRBD_MINOR_COUNT_MIN || minor_count > DRBD_MINOR_COUNT_MAX) {
printk(KERN_ERR
"drbd: invalid minor_count (%d)\n", minor_count);
#ifdef MODULE
Expand Down
3 changes: 2 additions & 1 deletion trunk/include/linux/drbd_limits.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
#define DEBUG_RANGE_CHECK 0

#define DRBD_MINOR_COUNT_MIN 1
#define DRBD_MINOR_COUNT_MAX 255
#define DRBD_MINOR_COUNT_MAX 256
#define DRBD_MINOR_COUNT_DEF 32

#define DRBD_DIALOG_REFRESH_MIN 0
#define DRBD_DIALOG_REFRESH_MAX 600
Expand Down

0 comments on commit 36090d9

Please sign in to comment.