Linux-Block Archive on lore.kernel.org
 help / Atom feed
* [PATCH] null_blk: enable discard support by default
@ 2019-01-07 19:23 John Pittman
  0 siblings, 0 replies; 1+ messages in thread
From: John Pittman @ 2019-01-07 19:23 UTC (permalink / raw)
  To: axboe; +Cc: linux-block, John Pittman

Support for discard was added to the null_blk driver in 'commit
306eb6b4ad4f ("nullb: support discard")'.  For ease of use in
benchmarking and target testing, enable this support by default.

Signed-off-by: John Pittman <jpittman@redhat.com>
---
 drivers/block/null_blk_main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/block/null_blk_main.c b/drivers/block/null_blk_main.c
index 62c9654b9ce8..c4a1db0fb336 100644
--- a/drivers/block/null_blk_main.c
+++ b/drivers/block/null_blk_main.c
@@ -527,6 +527,7 @@ static struct nullb_device *null_alloc_dev(void)
 	dev->zoned = g_zoned;
 	dev->zone_size = g_zone_size;
 	dev->zone_nr_conv = g_zone_nr_conv;
+	dev->discard = true;
 	return dev;
 }
 
-- 
2.17.2


^ permalink raw reply	[flat|nested] 1+ messages in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-07 19:23 [PATCH] null_blk: enable discard support by default John Pittman

Linux-Block Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-block/0 linux-block/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-block linux-block/ https://lore.kernel.org/linux-block \
		linux-block@vger.kernel.org linux-block@archiver.kernel.org
	public-inbox-index linux-block


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-block


AGPL code for this site: git clone https://public-inbox.org/ public-inbox