OSDN Git Service

nullb: support discard
authorShaohua Li <shli@fb.com>
Mon, 14 Aug 2017 22:04:57 +0000 (15:04 -0700)
committerJens Axboe <axboe@kernel.dk>
Wed, 23 Aug 2017 14:54:08 +0000 (08:54 -0600)
commit306eb6b4ad4f2d51c989b9e3d3a9271c44408431
tree149473e4af24728a64174e2ed3469ec1241643fc
parent5bcd0e0c79b513261172d1348f93d1bf00dffbdf
nullb: support discard

discard makes sense for memory backed disk. And also it's useful to test
if upper layer supports dicard correctly.

User configures 'discard' attribute to enable/disable dicard support.

Based on original patch from Kyungchan Koh

Signed-off-by: Kyungchan Koh <kkc6196@fb.com>
Signed-off-by: Shaohua Li <shli@fb.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/null_blk.c