Displaying 20 results from an estimated 20 matches for "discard_zeroes_data".
2017 Mar 28
6
[PATCH] virtio-blk: add DISCARD support to virtio-blk driver
...+ }
}
spin_lock_irqsave(&vblk->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(&v...
2017 Mar 28
6
[PATCH] virtio-blk: add DISCARD support to virtio-blk driver
...+ }
}
spin_lock_irqsave(&vblk->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(&v...
2017 Mar 27
0
[virtio-dev] [PATCH] virtio-blk: add DISCARD support to virtio-blk driver
On 28/03/2017 10:39, Changpeng Liu wrote:
> + 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);
> + qu...
2017 Mar 28
1
[PATCH] virtio-blk: add DISCARD support to virtio-blk driver
...k, 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);
> > +...
2017 Mar 28
1
[PATCH] virtio-blk: add DISCARD support to virtio-blk driver
...k, 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);
> > +...
2016 Aug 17
0
[PATCH 11/15] zram: Pass attribute group to device_add_disk
..., 2 insertions(+), 5 deletions(-)
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index 20920a2..2331788 100644
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -1298,13 +1298,10 @@ static int zram_add(void)
zram->disk->queue->limits.discard_zeroes_data = 0;
queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, zram->disk->queue);
- device_add_disk(NULL, zram->disk, NULL);
+ ret = device_add_disk(NULL, zram->disk, &zram_disk_attr_group);
- ret = sysfs_create_group(&disk_to_dev(zram->disk)->kobj,
- &zram_disk_attr_group...
2016 Aug 18
1
[PATCH 11/15] zram: Pass attribute group to device_add_disk
...[..]
> diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
> index 20920a2..2331788 100644
> --- a/drivers/block/zram/zram_drv.c
> +++ b/drivers/block/zram/zram_drv.c
> @@ -1298,13 +1298,10 @@ static int zram_add(void)
> zram->disk->queue->limits.discard_zeroes_data = 0;
> queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, zram->disk->queue);
>
> - device_add_disk(NULL, zram->disk, NULL);
> + ret = device_add_disk(NULL, zram->disk, &zram_disk_attr_group);
>
> - ret = sysfs_create_group(&disk_to_dev(zram->disk)->kobj,...
2017 Mar 27
0
[PATCH] virtio-blk: add DISCARD support to virtio-blk driver
...tors.
Do you have a link to the specification for this feature? At least
virtio-v1.0 does not seem to specify a discard feature.
Note that Linux 4.11 and later have support for multi-range discard
ala ATA TRIM, SCSI UNMAP and NVMe deallocate which might be useful
here, too.
> + q->limits.discard_zeroes_data = 0;
No need to clear this. Also hopefully this field goes away for 4.12
> + blk_queue_max_discard_segments(q, 1);
No need to set this.
2016 Aug 18
1
[PATCH 11/15] zram: Pass attribute group to device_add_disk
...[..]
> diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
> index 20920a2..2331788 100644
> --- a/drivers/block/zram/zram_drv.c
> +++ b/drivers/block/zram/zram_drv.c
> @@ -1298,13 +1298,10 @@ static int zram_add(void)
> zram->disk->queue->limits.discard_zeroes_data = 0;
> queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, zram->disk->queue);
>
> - device_add_disk(NULL, zram->disk, NULL);
> + ret = device_add_disk(NULL, zram->disk, &zram_disk_attr_group);
>
> - ret = sysfs_create_group(&disk_to_dev(zram->disk)->kobj,...
2017 Mar 27
0
[PATCH] virtio-blk: add DISCARD support to virtio-blk driver
...e(&vblk->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);
> + }
Please add configuration s...
2017 Sep 09
5
Bug#874751: blktap-dkms: module FTBFS for Linux 4.12
...c:214:22: note: each undeclared identifier is reported only once for each function it appears in
/var/lib/dkms/blktap/2.0.93/build/device.c: In function 'blktap_device_configure':
/var/lib/dkms/blktap/2.0.93/build/device.c:374:9: error: 'struct queue_limits' has no member named 'discard_zeroes_data'
limits->discard_zeroes_data = trz;
^~
In file included from /usr/src/linux-headers-4.12.0-1-common/include/linux/genhd.h:64:0,
from /usr/src/linux-headers-4.12.0-1-common/include/linux/blkdev.h:10,
from /var/lib/dkms/blktap/2.0.93/build/device.c...
2018 May 23
3
[PATCH] block drivers/block: Use octal not symbolic permissions
...sysfs_entry queue_discard_max_entry = {
- .attr = {.name = "discard_max_bytes", .mode = S_IRUGO | S_IWUSR },
+ .attr = {.name = "discard_max_bytes", .mode = 0644 },
.show = queue_discard_max_show,
.store = queue_discard_max_store,
};
static struct queue_sysfs_entry queue_discard_zeroes_data_entry = {
- .attr = {.name = "discard_zeroes_data", .mode = S_IRUGO },
+ .attr = {.name = "discard_zeroes_data", .mode = 0444 },
.show = queue_discard_zeroes_data_show,
};
static struct queue_sysfs_entry queue_write_same_max_entry = {
- .attr = {.name = "write_same_ma...
2018 May 23
3
[PATCH] block drivers/block: Use octal not symbolic permissions
...sysfs_entry queue_discard_max_entry = {
- .attr = {.name = "discard_max_bytes", .mode = S_IRUGO | S_IWUSR },
+ .attr = {.name = "discard_max_bytes", .mode = 0644 },
.show = queue_discard_max_show,
.store = queue_discard_max_store,
};
static struct queue_sysfs_entry queue_discard_zeroes_data_entry = {
- .attr = {.name = "discard_zeroes_data", .mode = S_IRUGO },
+ .attr = {.name = "discard_zeroes_data", .mode = 0444 },
.show = queue_discard_zeroes_data_show,
};
static struct queue_sysfs_entry queue_write_same_max_entry = {
- .attr = {.name = "write_same_ma...
2019 Feb 19
2
[Bug 109681] New: Nvidia GT710 => nouveau + wayland + swayWM => crash when use acceleration (open Firefox)
https://bugs.freedesktop.org/show_bug.cgi?id=109681
Bug ID: 109681
Summary: Nvidia GT710 => nouveau + wayland + swayWM => crash
when use acceleration (open Firefox)
Product: Mesa
Version: 18.3
Hardware: x86-64 (AMD64)
OS: Linux (All)
Status: NEW
Severity: critical
2016 Jun 30
17
[PATCH v2 00/12] gendisk: Generate uevent after attribute available
The race condition is noticed between disk_add() and disk attributes, on
virtio-blk hotplug.
Userspace listens to the KOBJ_ADD uevent generated in add_disk(). At that
point we haven't created the serial attribute file, therefore depending
on how fast udev reacts, the /dev/disk/by-id/ entry doesn't always get
created.
As pointed out by Christoph Hellwig in the specific fix [1], virtio-blk
2016 Jun 30
17
[PATCH v2 00/12] gendisk: Generate uevent after attribute available
The race condition is noticed between disk_add() and disk attributes, on
virtio-blk hotplug.
Userspace listens to the KOBJ_ADD uevent generated in add_disk(). At that
point we haven't created the serial attribute file, therefore depending
on how fast udev reacts, the /dev/disk/by-id/ entry doesn't always get
created.
As pointed out by Christoph Hellwig in the specific fix [1], virtio-blk
2016 Aug 17
20
[PATCH 00/15] Fix issue with KOBJ_ADD uevent versus disk attributes
This is an attempt to fix the issue that some disks' sysfs attributes are not
ready at the time its KOBJ_ADD event is sent.
The symptom is during device hotplug, udev may fail to find certain attributes,
such as serial or wwn, of the disk. As a result the /dev/disk/by-id entries are
not created.
The cause is device_add_disk emits the uevent before returning, and the callers
have to create
2016 Aug 17
20
[PATCH 00/15] Fix issue with KOBJ_ADD uevent versus disk attributes
This is an attempt to fix the issue that some disks' sysfs attributes are not
ready at the time its KOBJ_ADD event is sent.
The symptom is during device hotplug, udev may fail to find certain attributes,
such as serial or wwn, of the disk. As a result the /dev/disk/by-id entries are
not created.
The cause is device_add_disk emits the uevent before returning, and the callers
have to create
2012 Apr 20
1
[PATCH] multiqueue: a hodge podge of things
...d int cmd_flags;
enum rq_cmd_type_bits cmd_type;
unsigned long atomic_flags;
int cpu;
/* the following two fields are internal, NEVER access directly */
unsigned int __data_len; /* total data len */
@@ -266,25 +254,24 @@ struct queue_limits {
unsigned char cluster;
unsigned char discard_zeroes_data;
};
struct request_queue {
/*
* Together with queue_head for cacheline sharing
*/
struct list_head queue_head;
- struct request *last_merge;
struct elevator_queue *elevator;
- /*
- * the queue request freelist, one for reads and one for writes
- */
- struct request_list rq;
+ s...
2012 Apr 20
1
[PATCH] multiqueue: a hodge podge of things
...d int cmd_flags;
enum rq_cmd_type_bits cmd_type;
unsigned long atomic_flags;
int cpu;
/* the following two fields are internal, NEVER access directly */
unsigned int __data_len; /* total data len */
@@ -266,25 +254,24 @@ struct queue_limits {
unsigned char cluster;
unsigned char discard_zeroes_data;
};
struct request_queue {
/*
* Together with queue_head for cacheline sharing
*/
struct list_head queue_head;
- struct request *last_merge;
struct elevator_queue *elevator;
- /*
- * the queue request freelist, one for reads and one for writes
- */
- struct request_list rq;
+ s...