On Thu, Sep 29, 2022 at 10:13:47AM +0300, Alvaro Karsz wrote: > > Could you explain this last part? Why are they used without > > VIRTIO_BLK_F_DISCARD? > > > Sure, > > If both VIRTIO_BLK_F_DISCARD and VIRTIO_BLK_F_SECURE_ERASE are negotiated: > q->limits.max_discard_segments = > min(virtio_blk_config->max_discard_seg, > virtio_blk_config->max_secure_erase_seg) > > If VIRTIO_BLK_F_DISCARD is negotiated and VIRTIO_BLK_F_SECURE_ERASE isn't > q->limits.max_discard_segments = virtio_blk_config->max_discard_seg > > If VIRTIO_BLK_F_SECURE_ERASE is negotiated and VIRTIO_BLK_F_DISCARD isn't > q->limits.max_discard_segments = virtio_blk_config->max_secure_erase_seg OK so virtio_blk_config->max_discard_seg is unused without VIRTIO_BLK_F_DISCARD. -- MST _______________________________________________ Virtualization mailing list Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linuxfoundation.org/mailman/listinfo/virtualization