]> git.baikalelectronics.ru Git - kernel.git/commit
block: add support for REQ_OP_WRITE_ZEROES
authorChaitanya Kulkarni <chaitanya.kulkarni@hgst.com>
Wed, 30 Nov 2016 20:28:59 +0000 (12:28 -0800)
committerJens Axboe <axboe@fb.com>
Thu, 1 Dec 2016 14:58:40 +0000 (07:58 -0700)
commitfa146d01d5a0ad2e56c3ee579f79ad72da25d6a8
tree493bf4be078a224b84c405220965e7a6c00a505c
parent133b841473f406c031d158acc333531314877362
block: add support for REQ_OP_WRITE_ZEROES

This adds a new block layer operation to zero out a range of
LBAs. This allows to implement zeroing for devices that don't use
either discard with a predictable zero pattern or WRITE SAME of zeroes.
The prominent example of that is NVMe with the Write Zeroes command,
but in the future, this should also help with improving the way
zeroing discards work. For this operation, suitable entry is exported in
sysfs which indicate the number of maximum bytes allowed in one
write zeroes operation by the device.

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@hgst.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
Documentation/ABI/testing/sysfs-block
block/bio.c
block/blk-core.c
block/blk-lib.c
block/blk-merge.c
block/blk-settings.c
block/blk-sysfs.c
block/blk-wbt.c
include/linux/bio.h
include/linux/blk_types.h
include/linux/blkdev.h