search for: discard_align

Displaying 20 results from an estimated 38 matches for "discard_align".

2011 Sep 01
9
[PATCH V4 0/3] xen-blkfront/blkback discard support
Dear list, This is the V4 of the trim support for xen-blkfront/blkback, Now we move BLKIF_OP_TRIM to BLKIF_OP_DISCARD, and dropped all "trim" stuffs in the patches, and use "discard" instead. Also we updated the helpers of blkif_x86_{32|64}_request or we will meet problems using a non-native protocol. And this patch has been tested with both SSD and raw file, with SSD we will
2018 Mar 30
2
[PATCH v3] virtio_blk: add DISCARD and WRIET ZEROES command support
...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_granularity = 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_co...
2018 Mar 30
2
[PATCH v3] virtio_blk: add DISCARD and WRIET ZEROES command support
...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_granularity = 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_co...
2017 Mar 28
6
[PATCH] virtio-blk: add DISCARD support to virtio-blk driver
...->vqs[qid].lock, flags); @@ -775,6 +786,15 @@ static int virtblk_probe(struct 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); @@ -88...
2017 Mar 28
6
[PATCH] virtio-blk: add DISCARD support to virtio-blk driver
...->vqs[qid].lock, flags); @@ -775,6 +786,15 @@ static int virtblk_probe(struct 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); @@ -88...
2017 Mar 01
3
[systemd-devel] udev virtio by-path naming
...rm/a003e00.virtio_mmio/virtio3/block/vda': KERNEL=="vda" SUBSYSTEM=="block" DRIVER=="" ATTR{alignment_offset}=="0" ATTR{badblocks}=="" ATTR{cache_type}=="write back" ATTR{capability}=="50" ATTR{discard_alignment}=="0" ATTR{ext_range}=="256" ATTR{inflight}==" 0 0" ATTR{range}=="16" ATTR{removable}=="0" ATTR{ro}=="0" ATTR{serial}=="" ATTR{size}=="2097152" ATTR{stat}==" 94...
2017 Mar 01
3
[systemd-devel] udev virtio by-path naming
...rm/a003e00.virtio_mmio/virtio3/block/vda': KERNEL=="vda" SUBSYSTEM=="block" DRIVER=="" ATTR{alignment_offset}=="0" ATTR{badblocks}=="" ATTR{cache_type}=="write back" ATTR{capability}=="50" ATTR{discard_alignment}=="0" ATTR{ext_range}=="256" ATTR{inflight}==" 0 0" ATTR{range}=="16" ATTR{removable}=="0" ATTR{ro}=="0" ATTR{serial}=="" ATTR{size}=="2097152" ATTR{stat}==" 94...
2018 Jan 31
0
systemd-udevd not applying ATTR to block device at boot
...a" SUBSYSTEM=="block" DRIVER=="" ATTR{ro}=="0" ATTR{size}=="104857600" ATTR{stat}==" 14877 938 923845 15717 2732 310 82984 4328 0 9685 20033" ATTR{range}=="16" ATTR{discard_alignment}=="0" ATTR{events}=="" ATTR{ext_range}=="256" ATTR{events_poll_msecs}=="-1" ATTR{alignment_offset}=="0" ATTR{badblocks}=="" ATTR{inflight}==" 0 0" ATTR{removable}=="0" AT...
2018 Mar 30
0
[PATCH v3] virtio_blk: add DISCARD and WRIET ZEROES command support
...blk_queue_io_opt(q, blk_size * opt_io_size); > > + if (virtio_has_feature(vdev, VIRTIO_BLK_F_DISCARD)) { > + q->limits.discard_granularity = 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); >...
2018 Oct 12
0
[PATCH v8] virtio_blk: add discard and write zeroes support
...!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_granularity = blk_size; + + virtio_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, stru...
2018 May 29
0
[PATCH v5] virtio_blk: add DISCARD and WRIET ZEROES commands support
...!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_granularity = 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_b...
2018 May 29
0
[PATCH v5] virtio_blk: add DISCARD and WRIET ZEROES commands support
...!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_granularity = 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_b...
2018 Jun 06
10
[PATCH v6] virtio_blk: add DISCARD and WRIET ZEROES commands support
...!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_granularity = 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_b...
2018 Jun 06
10
[PATCH v6] virtio_blk: add DISCARD and WRIET ZEROES commands support
...!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_granularity = 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_b...
2017 Jul 05
3
[PATCH v2] virtio-blk: add DISCARD support to virtio-blk driver
...>out_hdr.type |= cpu_to_virtio32(vblk->vdev, VIRTIO_BLK_T_IN); @@ -767,6 +818,25 @@ static int virtblk_probe(struct 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_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_dis...
2017 Jul 05
3
[PATCH v2] virtio-blk: add DISCARD support to virtio-blk driver
...>out_hdr.type |= cpu_to_virtio32(vblk->vdev, VIRTIO_BLK_T_IN); @@ -767,6 +818,25 @@ static int virtblk_probe(struct 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_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_dis...
2017 Mar 28
1
[PATCH] virtio-blk: add DISCARD support to virtio-blk driver
...t virtblk_probe(struct 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); > > + } > > Please add configuration space...
2017 Mar 28
1
[PATCH] virtio-blk: add DISCARD support to virtio-blk driver
...t virtblk_probe(struct 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); > > + } > > Please add configuration space...
2018 May 29
2
[PATCH v4] virtio_blk: add DISCARD and WRIET ZEROES commands support
...!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_granularity = 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_b...
2018 May 29
2
[PATCH v4] virtio_blk: add DISCARD and WRIET ZEROES commands support
...!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_granularity = 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_b...