summaryrefslogtreecommitdiff
path: root/include/linux/drbd_limits.h
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruen@linbit.com>2011-07-13 13:40:30 +0200
committerPhilipp Reisner <philipp.reisner@linbit.com>2012-11-08 16:57:54 +0100
commit0317d9ecbc9bac43642b4aa70e3e1106f4fd26a1 (patch)
treebdda76814bc45b15e8df433eb461c8f58ead5943 /include/linux/drbd_limits.h
parent32bdb64038ba3127245912dae2cc8a450bb1d705 (diff)
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.h2
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'