diff mbox series

[2/8] null_blk: add REQ_OP_WRITE_ZEROES config property

Message ID 20190711175328.16430-3-chaitanya.kulkarni@wdc.com (mailing list archive)
State New, archived
Headers show
Series null_blk: add missing write-zeroes and discard support | expand

Commit Message

Chaitanya Kulkarni July 11, 2019, 5:53 p.m. UTC
This is a preparation patch for implementing the support for the
write-zeroes operations for null_blk. We introduce a new bool flag
write-zeroes for nullb_device structure so that user can either set
this value through configfs when null_blk is memory backed or use
module parameter. Following two patches are implementing respective
support for REQ_OP_WRITE_ZEROES.

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
---
 drivers/block/null_blk.h | 1 +
 1 file changed, 1 insertion(+)

Comments

Minwoo Im July 28, 2019, 6:17 a.m. UTC | #1
On 19-07-11 10:53:22, Chaitanya Kulkarni wrote:
> This is a preparation patch for implementing the support for the
> write-zeroes operations for null_blk. We introduce a new bool flag
> write-zeroes for nullb_device structure so that user can either set
> this value through configfs when null_blk is memory backed or use
> module parameter. Following two patches are implementing respective
> support for REQ_OP_WRITE_ZEROES.
> 
> Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>

Hi Chaitanya,

It looks good to be squashed with 3rd patch.  Code looks good to me.

Thanks!
diff mbox series

Patch

diff --git a/drivers/block/null_blk.h b/drivers/block/null_blk.h
index 34b22d6523ba..ecd1e45f6eb9 100644
--- a/drivers/block/null_blk.h
+++ b/drivers/block/null_blk.h
@@ -63,6 +63,7 @@  struct nullb_device {
 	bool power; /* power on/off the device */
 	bool memory_backed; /* if data is stored in memory */
 	bool discard; /* if support discard */
+	bool write_zeroes; /* if support write_zeroes */
 	bool zoned; /* if device is zoned */
 };