diff options
author | Andreas Gruenbacher <agruen@linbit.com> | 2011-07-13 13:40:30 +0200 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2012-11-08 16:57:54 +0100 |
commit | 0317d9ecbc9bac43642b4aa70e3e1106f4fd26a1 (patch) | |
tree | bdda76814bc45b15e8df433eb461c8f58ead5943 /include/linux/drbd_limits.h | |
parent | 32bdb64038ba3127245912dae2cc8a450bb1d705 (diff) | |
download | linux-stable-0317d9ecbc9bac43642b4aa70e3e1106f4fd26a1.tar.gz linux-stable-0317d9ecbc9bac43642b4aa70e3e1106f4fd26a1.tar.bz2 linux-stable-0317d9ecbc9bac43642b4aa70e3e1106f4fd26a1.zip |
drbd: Fix the maximum accepted minor device number
The maximum minor device number allowed by the kernel is (1<<20 - 1). Reject
device numbers higher than that to earlier catch possible errors.
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'include/linux/drbd_limits.h')
-rw-r--r-- | include/linux/drbd_limits.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/drbd_limits.h b/include/linux/drbd_limits.h index cd3565cfed44..7d956e91ae7b 100644 --- a/include/linux/drbd_limits.h +++ b/include/linux/drbd_limits.h @@ -137,7 +137,7 @@ #define DRBD_AL_EXTENTS_SCALE '1' #define DRBD_MINOR_NUMBER_MIN -1 -#define DRBD_MINOR_NUMBER_MAX (1<<30) +#define DRBD_MINOR_NUMBER_MAX ((1 << 20) - 1) #define DRBD_MINOR_NUMBER_DEF -1 #define DRBD_MINOR_NUMBER_SCALE '1' |