summaryrefslogtreecommitdiff
path: root/include/linux/drbd_limits.h
diff options
context:
space:
mode:
authorPhilipp Reisner <philipp.reisner@linbit.com>2016-06-14 00:26:14 +0200
committerJens Axboe <axboe@fb.com>2016-06-13 21:43:04 -0600
commita5ca66c419410b4a26ab47b120d5424bd1d33700 (patch)
treee8bcf9de1ec9ec9b51f2863c3e1ab9a7286d33ef /include/linux/drbd_limits.h
parent700ca8c04a0f4402f379055eec97351e0d6c0087 (diff)
drbd: Introduce new disk config option rs-discard-granularity
As long as the value is 0 the feature is disabled. With setting it to a positive value, DRBD limits and aligns its resync requests to the rs-discard-granularity setting. If the sync source detects all zeros in such a block, the resync target discards the range on disk. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'include/linux/drbd_limits.h')
-rw-r--r--include/linux/drbd_limits.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/drbd_limits.h b/include/linux/drbd_limits.h
index 8ac8c5d9a3ad..2e4aad8d8ae8 100644
--- a/include/linux/drbd_limits.h
+++ b/include/linux/drbd_limits.h
@@ -230,4 +230,10 @@
#define DRBD_SOCKET_CHECK_TIMEO_MAX DRBD_PING_TIMEO_MAX
#define DRBD_SOCKET_CHECK_TIMEO_DEF 0
#define DRBD_SOCKET_CHECK_TIMEO_SCALE '1'
+
+#define DRBD_RS_DISCARD_GRANULARITY_MIN 0
+#define DRBD_RS_DISCARD_GRANULARITY_MAX (1<<20) /* 1MiByte */
+#define DRBD_RS_DISCARD_GRANULARITY_DEF 0 /* disabled by default */
+#define DRBD_RS_DISCARD_GRANULARITY_SCALE '1' /* bytes */
+
#endif