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>
This commit is contained in:
Philipp Reisner
2016-06-14 00:26:14 +02:00
committed by Jens Axboe
parent 700ca8c04a
commit a5ca66c419
3 changed files with 38 additions and 6 deletions

View File

@@ -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