summaryrefslogtreecommitdiff
path: root/drivers/block/drbd/drbd_debugfs.c
diff options
context:
space:
mode:
authorLars Ellenberg <lars@linbit.com>2016-06-14 01:26:31 +0300
committerJens Axboe <axboe@fb.com>2016-06-14 06:43:07 +0300
commit9104d31a759fbade8505f38f92f4dde719957826 (patch)
treead71e3ed1cbb0a096fae43d8a48db469b8ff4761 /drivers/block/drbd/drbd_debugfs.c
parent60bac040129720837770d0d852cf71dccbc69f61 (diff)
downloadlinux-9104d31a759fbade8505f38f92f4dde719957826.tar.xz
drbd: introduce WRITE_SAME support
We will support WRITE_SAME, if * all peers support WRITE_SAME (both in kernel and DRBD version), * all peer devices support WRITE_SAME * logical_block_size is identical on all peers. We may at some point introduce a fallback on the receiving side for devices/kernels that do not support WRITE_SAME, by open-coding a submit loop. But not yet. 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 'drivers/block/drbd/drbd_debugfs.c')
-rw-r--r--drivers/block/drbd/drbd_debugfs.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/block/drbd/drbd_debugfs.c b/drivers/block/drbd/drbd_debugfs.c
index 4de95bbff486..8a9081236f92 100644
--- a/drivers/block/drbd/drbd_debugfs.c
+++ b/drivers/block/drbd/drbd_debugfs.c
@@ -237,14 +237,9 @@ static void seq_print_peer_request_flags(struct seq_file *m, struct drbd_peer_re
seq_print_rq_state_bit(m, f & EE_SEND_WRITE_ACK, &sep, "C");
seq_print_rq_state_bit(m, f & EE_MAY_SET_IN_SYNC, &sep, "set-in-sync");
- if (f & EE_IS_TRIM) {
- seq_putc(m, sep);
- sep = '|';
- if (f & EE_IS_TRIM_USE_ZEROOUT)
- seq_puts(m, "zero-out");
- else
- seq_puts(m, "trim");
- }
+ if (f & EE_IS_TRIM)
+ __seq_print_rq_state_bit(m, f & EE_IS_TRIM_USE_ZEROOUT, &sep, "zero-out", "trim");
+ seq_print_rq_state_bit(m, f & EE_WRITE_SAME, &sep, "write-same");
seq_putc(m, '\n');
}