Changpeng Liu
2017-Mar-17 01:34 UTC
[RFC] virtio_blk: add DISCARD support to virtio_blk driver
Currently virtio_blk driver does not provide discard feature flag, so the filesystems which built on top of the block device will not send discard command. This is okay for HDD backend, but it will impact the performance for SSD backend. Add a feature flag such as VIRTIO_BLK_F_DISCARD to virtio_blk driver is very straightforward, but it will extend the exist virtio_blk protocol, I'm preparing to add this feature, before that, I'd like to get comments or suggestions from community. --- 1.9.3
Stefan Hajnoczi
2017-Mar-20 15:28 UTC
[RFC] virtio_blk: add DISCARD support to virtio_blk driver
On Fri, Mar 17, 2017 at 1:34 AM, Changpeng Liu <changpeng.liu at intel.com> wrote:> Currently virtio_blk driver does not provide discard feature > flag, so the filesystems which built on top of the block device > will not send discard command. This is okay for HDD backend, but > it will impact the performance for SSD backend. > > Add a feature flag such as VIRTIO_BLK_F_DISCARD to virtio_blk driver > is very straightforward, but it will extend the exist virtio_blk > protocol, I'm preparing to add this feature, before that, I'd like > to get comments or suggestions from community.Please remember to also send a VIRTIO spec change: https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=virtio#feedback This feature was not added to virtio-blk in the past because virtio-scsi was essentially a replacement that could support all disk I/O features (thanks to the SCSI command set). There are many virtio-blk users and some may not want to migrate to virtio-scsi. So it seems reasonable to add a DISCARD command to virtio-blk. Stefan
Maybe Matching Threads
- [RFC] virtio_blk: add DISCARD support to virtio_blk driver
- [PATCH v2] virtio-blk: add DISCARD support to virtio-blk driver
- [PATCH v2] virtio-blk: add DISCARD support to virtio-blk driver
- [PATCH v3] virtio_blk: add DISCARD and WRIET ZEROES command support
- [PATCH v3] virtio_blk: add DISCARD and WRIET ZEROES command support