search for: blk_queue_max_discard_sectors

Displaying 20 results from an estimated 26 matches for "blk_queue_max_discard_sectors".

2017 Jul 05
3
[PATCH v2] virtio-blk: add DISCARD support to virtio-blk driver
..._io_size) blk_queue_io_opt(q, blk_size * opt_io_size); + if (virtio_has_feature(vdev, VIRTIO_BLK_F_DISCARD)) { + q->limits.discard_alignment = blk_size; + q->limits.discard_granularity = blk_size; + + virtio_cread(vdev, struct virtio_blk_config, max_discard_seg, &v); + if (v) + blk_queue_max_discard_sectors(q, v); + else + blk_queue_max_discard_sectors(q, -1U); + + virtio_cread(vdev, struct virtio_blk_config, max_discard_num, &v); + if (v) + blk_queue_max_discard_segments(q, v); + else + blk_queue_max_discard_segments(q, 256); + + queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, q); + } +...
2017 Jul 05
3
[PATCH v2] virtio-blk: add DISCARD support to virtio-blk driver
..._io_size) blk_queue_io_opt(q, blk_size * opt_io_size); + if (virtio_has_feature(vdev, VIRTIO_BLK_F_DISCARD)) { + q->limits.discard_alignment = blk_size; + q->limits.discard_granularity = blk_size; + + virtio_cread(vdev, struct virtio_blk_config, max_discard_seg, &v); + if (v) + blk_queue_max_discard_sectors(q, v); + else + blk_queue_max_discard_sectors(q, -1U); + + virtio_cread(vdev, struct virtio_blk_config, max_discard_num, &v); + if (v) + blk_queue_max_discard_segments(q, v); + else + blk_queue_max_discard_segments(q, 256); + + queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, q); + } +...
2018 Mar 30
2
[PATCH v3] virtio_blk: add DISCARD and WRIET ZEROES command support
...= blk_size; + + virtio_cread(vdev, struct virtio_blk_config, discard_sector_alignment, &v); + if (v) + q->limits.discard_alignment = v << 9; + else + q->limits.discard_alignment = 0; + + virtio_cread(vdev, struct virtio_blk_config, max_discard_sectors, &v); + if (v) + blk_queue_max_discard_sectors(q, v); + else + blk_queue_max_discard_sectors(q, UINT_MAX); + + virtio_cread(vdev, struct virtio_blk_config, max_discard_seg, &v); + if (v) + blk_queue_max_discard_segments(q, v); + else + blk_queue_max_discard_segments(q, USHRT_MAX); + + queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, q...
2018 Mar 30
2
[PATCH v3] virtio_blk: add DISCARD and WRIET ZEROES command support
...= blk_size; + + virtio_cread(vdev, struct virtio_blk_config, discard_sector_alignment, &v); + if (v) + q->limits.discard_alignment = v << 9; + else + q->limits.discard_alignment = 0; + + virtio_cread(vdev, struct virtio_blk_config, max_discard_sectors, &v); + if (v) + blk_queue_max_discard_sectors(q, v); + else + blk_queue_max_discard_sectors(q, UINT_MAX); + + virtio_cread(vdev, struct virtio_blk_config, max_discard_seg, &v); + if (v) + blk_queue_max_discard_segments(q, v); + else + blk_queue_max_discard_segments(q, USHRT_MAX); + + queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, q...
2017 Mar 28
6
[PATCH] virtio-blk: add DISCARD support to virtio-blk driver
...virtio_device *vdev) if (!err && opt_io_size) blk_queue_io_opt(q, blk_size * opt_io_size); + if (virtio_has_feature(vdev, VIRTIO_BLK_F_DISCARD)) { + q->limits.discard_zeroes_data = 0; + q->limits.discard_alignment = blk_size; + q->limits.discard_granularity = blk_size; + blk_queue_max_discard_sectors(q, UINT_MAX); + blk_queue_max_discard_segments(q, 1); + queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, q); + } + virtio_device_ready(vdev); device_add_disk(&vdev->dev, vblk->disk); @@ -882,14 +902,14 @@ static int virtblk_restore(struct virtio_device *vdev) VIRTIO_BLK_F_SCSI, #end...
2017 Mar 28
6
[PATCH] virtio-blk: add DISCARD support to virtio-blk driver
...virtio_device *vdev) if (!err && opt_io_size) blk_queue_io_opt(q, blk_size * opt_io_size); + if (virtio_has_feature(vdev, VIRTIO_BLK_F_DISCARD)) { + q->limits.discard_zeroes_data = 0; + q->limits.discard_alignment = blk_size; + q->limits.discard_granularity = blk_size; + blk_queue_max_discard_sectors(q, UINT_MAX); + blk_queue_max_discard_segments(q, 1); + queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, q); + } + virtio_device_ready(vdev); device_add_disk(&vdev->dev, vblk->disk); @@ -882,14 +902,14 @@ static int virtblk_restore(struct virtio_device *vdev) VIRTIO_BLK_F_SCSI, #end...
2017 Jul 04
0
[PATCH v2] virtio-blk: add DISCARD support to virtio-blk driver
...e * opt_io_size); > > + if (virtio_has_feature(vdev, VIRTIO_BLK_F_DISCARD)) { > + q->limits.discard_alignment = blk_size; > + q->limits.discard_granularity = blk_size; > + > + virtio_cread(vdev, struct virtio_blk_config, max_discard_seg, &v); > + if (v) > + blk_queue_max_discard_sectors(q, v); > + else > + blk_queue_max_discard_sectors(q, -1U); > + > + virtio_cread(vdev, struct virtio_blk_config, max_discard_num, &v); > + if (v) > + blk_queue_max_discard_segments(q, v); > + else > + blk_queue_max_discard_segments(q, 256); > + > + queue_...
2018 Mar 30
0
[PATCH v3] virtio_blk: add DISCARD and WRIET ZEROES command support
...ct virtio_blk_config, discard_sector_alignment, &v); > + if (v) > + q->limits.discard_alignment = v << 9; > + else > + q->limits.discard_alignment = 0; > + > + virtio_cread(vdev, struct virtio_blk_config, max_discard_sectors, &v); > + if (v) > + blk_queue_max_discard_sectors(q, v); > + else > + blk_queue_max_discard_sectors(q, UINT_MAX); > + > + virtio_cread(vdev, struct virtio_blk_config, max_discard_seg, &v); > + if (v) > + blk_queue_max_discard_segments(q, v); > + else > + blk_queue_max_discard_segments(q, USHRT_MAX); > + &gt...
2018 Oct 12
0
[PATCH v8] virtio_blk: add discard and write zeroes support
...io_cread(vdev, struct virtio_blk_config, + discard_sector_alignment, &v); + if (v) + q->limits.discard_alignment = v << SECTOR_SHIFT; + else + q->limits.discard_alignment = 0; + + virtio_cread(vdev, struct virtio_blk_config, + max_discard_sectors, &v); + if (v) + blk_queue_max_discard_sectors(q, v); + else + blk_queue_max_discard_sectors(q, UINT_MAX); + + virtio_cread(vdev, struct virtio_blk_config, max_discard_seg, + &v); + if (v && v <= MAX_DISCARD_SEGMENTS) + blk_queue_max_discard_segments(q, v); + else + blk_queue_max_discard_segments(q, MAX_DISCARD_SEGME...
2018 May 29
0
[PATCH v5] virtio_blk: add DISCARD and WRIET ZEROES commands support
...; + + virtio_cread(vdev, struct virtio_blk_config, + discard_sector_alignment, &v); + if (v) + q->limits.discard_alignment = v << 9; + else + q->limits.discard_alignment = 0; + + virtio_cread(vdev, struct virtio_blk_config, + max_discard_sectors, &v); + if (v) + blk_queue_max_discard_sectors(q, v); + else + blk_queue_max_discard_sectors(q, UINT_MAX); + + virtio_cread(vdev, struct virtio_blk_config, max_discard_seg, + &v); + if (v) + blk_queue_max_discard_segments(q, v); + else + blk_queue_max_discard_segments(q, USHRT_MAX); + + queue_flag_set_unlocked(QUEUE_FLAG_DISCA...
2018 May 29
0
[PATCH v5] virtio_blk: add DISCARD and WRIET ZEROES commands support
...; + + virtio_cread(vdev, struct virtio_blk_config, + discard_sector_alignment, &v); + if (v) + q->limits.discard_alignment = v << 9; + else + q->limits.discard_alignment = 0; + + virtio_cread(vdev, struct virtio_blk_config, + max_discard_sectors, &v); + if (v) + blk_queue_max_discard_sectors(q, v); + else + blk_queue_max_discard_sectors(q, UINT_MAX); + + virtio_cread(vdev, struct virtio_blk_config, max_discard_seg, + &v); + if (v) + blk_queue_max_discard_segments(q, v); + else + blk_queue_max_discard_segments(q, USHRT_MAX); + + blk_queue_flag_set(QUEUE_FLAG_DISCARD, q...
2018 Jun 06
10
[PATCH v6] virtio_blk: add DISCARD and WRIET ZEROES commands support
...; + + virtio_cread(vdev, struct virtio_blk_config, + discard_sector_alignment, &v); + if (v) + q->limits.discard_alignment = v << 9; + else + q->limits.discard_alignment = 0; + + virtio_cread(vdev, struct virtio_blk_config, + max_discard_sectors, &v); + if (v) + blk_queue_max_discard_sectors(q, v); + else + blk_queue_max_discard_sectors(q, UINT_MAX); + + virtio_cread(vdev, struct virtio_blk_config, max_discard_seg, + &v); + if (v) + blk_queue_max_discard_segments(q, v); + else + blk_queue_max_discard_segments(q, USHRT_MAX); + + blk_queue_flag_set(QUEUE_FLAG_DISCARD, q...
2018 Jun 06
10
[PATCH v6] virtio_blk: add DISCARD and WRIET ZEROES commands support
...; + + virtio_cread(vdev, struct virtio_blk_config, + discard_sector_alignment, &v); + if (v) + q->limits.discard_alignment = v << 9; + else + q->limits.discard_alignment = 0; + + virtio_cread(vdev, struct virtio_blk_config, + max_discard_sectors, &v); + if (v) + blk_queue_max_discard_sectors(q, v); + else + blk_queue_max_discard_sectors(q, UINT_MAX); + + virtio_cread(vdev, struct virtio_blk_config, max_discard_seg, + &v); + if (v) + blk_queue_max_discard_segments(q, v); + else + blk_queue_max_discard_segments(q, USHRT_MAX); + + blk_queue_flag_set(QUEUE_FLAG_DISCARD, q...
2017 Jul 05
2
[PATCH v2] virtio-blk: add DISCARD support to virtio-blk driver
...+ if (virtio_has_feature(vdev, VIRTIO_BLK_F_DISCARD)) { > > + q->limits.discard_alignment = blk_size; > > + q->limits.discard_granularity = blk_size; > > + > > + virtio_cread(vdev, struct virtio_blk_config, max_discard_seg, &v); > > + if (v) > > + blk_queue_max_discard_sectors(q, v); > > + else > > + blk_queue_max_discard_sectors(q, -1U); > > + > > + virtio_cread(vdev, struct virtio_blk_config, max_discard_num, &v); > > + if (v) > > + blk_queue_max_discard_segments(q, v); > > + else > > + blk_queue_max_discard...
2017 Jul 05
2
[PATCH v2] virtio-blk: add DISCARD support to virtio-blk driver
...+ if (virtio_has_feature(vdev, VIRTIO_BLK_F_DISCARD)) { > > + q->limits.discard_alignment = blk_size; > > + q->limits.discard_granularity = blk_size; > > + > > + virtio_cread(vdev, struct virtio_blk_config, max_discard_seg, &v); > > + if (v) > > + blk_queue_max_discard_sectors(q, v); > > + else > > + blk_queue_max_discard_sectors(q, -1U); > > + > > + virtio_cread(vdev, struct virtio_blk_config, max_discard_num, &v); > > + if (v) > > + blk_queue_max_discard_segments(q, v); > > + else > > + blk_queue_max_discard...
2017 Mar 28
1
[PATCH] virtio-blk: add DISCARD support to virtio-blk driver
...blk_queue_io_opt(q, blk_size * opt_io_size); > > > > + if (virtio_has_feature(vdev, VIRTIO_BLK_F_DISCARD)) { > > + q->limits.discard_zeroes_data = 0; > > + q->limits.discard_alignment = blk_size; > > + q->limits.discard_granularity = blk_size; > > + blk_queue_max_discard_sectors(q, UINT_MAX); > > + blk_queue_max_discard_segments(q, 1); > > + queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, q); > > + } > > Please add configuration space fields for these limits. Looking at the > virtio-scsi block limits code in QEMU's scsi_disk_emulate_inquiry()...
2017 Mar 28
1
[PATCH] virtio-blk: add DISCARD support to virtio-blk driver
...blk_queue_io_opt(q, blk_size * opt_io_size); > > > > + if (virtio_has_feature(vdev, VIRTIO_BLK_F_DISCARD)) { > > + q->limits.discard_zeroes_data = 0; > > + q->limits.discard_alignment = blk_size; > > + q->limits.discard_granularity = blk_size; > > + blk_queue_max_discard_sectors(q, UINT_MAX); > > + blk_queue_max_discard_segments(q, 1); > > + queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, q); > > + } > > Please add configuration space fields for these limits. Looking at the > virtio-scsi block limits code in QEMU's scsi_disk_emulate_inquiry()...
2018 May 29
2
[PATCH v4] virtio_blk: add DISCARD and WRIET ZEROES commands support
...; + + virtio_cread(vdev, struct virtio_blk_config, + discard_sector_alignment, &v); + if (v) + q->limits.discard_alignment = v << 9; + else + q->limits.discard_alignment = 0; + + virtio_cread(vdev, struct virtio_blk_config, + max_discard_sectors, &v); + if (v) + blk_queue_max_discard_sectors(q, v); + else + blk_queue_max_discard_sectors(q, UINT_MAX); + + virtio_cread(vdev, struct virtio_blk_config, max_discard_seg, + &v); + if (v) + blk_queue_max_discard_segments(q, v); + else + blk_queue_max_discard_segments(q, USHRT_MAX); + + queue_flag_set_unlocked(QUEUE_FLAG_DISCA...
2018 May 29
2
[PATCH v4] virtio_blk: add DISCARD and WRIET ZEROES commands support
...; + + virtio_cread(vdev, struct virtio_blk_config, + discard_sector_alignment, &v); + if (v) + q->limits.discard_alignment = v << 9; + else + q->limits.discard_alignment = 0; + + virtio_cread(vdev, struct virtio_blk_config, + max_discard_sectors, &v); + if (v) + blk_queue_max_discard_sectors(q, v); + else + blk_queue_max_discard_sectors(q, UINT_MAX); + + virtio_cread(vdev, struct virtio_blk_config, max_discard_seg, + &v); + if (v) + blk_queue_max_discard_segments(q, v); + else + blk_queue_max_discard_segments(q, USHRT_MAX); + + queue_flag_set_unlocked(QUEUE_FLAG_DISCA...
2017 Mar 27
0
[virtio-dev] [PATCH] virtio-blk: add DISCARD support to virtio-blk driver
...gt; + if (virtio_has_feature(vdev, VIRTIO_BLK_F_DISCARD)) { > + q->limits.discard_zeroes_data = 0; Maybe you could use another feature bit to populate discard_zeroes_data. Paolo > + q->limits.discard_alignment = blk_size; > + q->limits.discard_granularity = blk_size; > + blk_queue_max_discard_sectors(q, UINT_MAX); > + blk_queue_max_discard_segments(q, 1); > + queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, q); > + } > +