search for: virtblk_cache_type_stor

Displaying 18 results from an estimated 18 matches for "virtblk_cache_type_stor".

2017 Jun 09
3
[PATCH v1] virtio_blk: Use sysfs_match_string() helper
...l.com> --- drivers/block/virtio_blk.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 553cc4c542b4..0e707b8cce9d 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -541,12 +541,9 @@ virtblk_cache_type_store(struct device *dev, struct device_attribute *attr, int i; BUG_ON(!virtio_has_feature(vblk->vdev, VIRTIO_BLK_F_CONFIG_WCE)); - for (i = ARRAY_SIZE(virtblk_cache_types); --i >= 0; ) - if (sysfs_streq(buf, virtblk_cache_types[i])) - break; - + i = sysfs_match_string(virtblk_cache_types...
2017 Jun 09
3
[PATCH v1] virtio_blk: Use sysfs_match_string() helper
...l.com> --- drivers/block/virtio_blk.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 553cc4c542b4..0e707b8cce9d 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -541,12 +541,9 @@ virtblk_cache_type_store(struct device *dev, struct device_attribute *attr, int i; BUG_ON(!virtio_has_feature(vblk->vdev, VIRTIO_BLK_F_CONFIG_WCE)); - for (i = ARRAY_SIZE(virtblk_cache_types); --i >= 0; ) - if (sysfs_streq(buf, virtblk_cache_types[i])) - break; - + i = sysfs_match_string(virtblk_cache_types...
2012 Jul 04
1
[PATCH] virtio-blk: allow toggling host cache between writeback and writethrough
...userspace API after all, and you see to prefer writeback in one word in your own code so let's not inflict pain on others :) Also, would be nice to make it discoverable what the legal values are. Another attribute valid_cache_types with all values space separated? > +static ssize_t > +virtblk_cache_type_store(struct device *dev, struct device_attribute *attr, > + const char *buf, size_t count) > +{ > + struct gendisk *disk = dev_to_disk(dev); > + struct virtio_blk *vblk = disk->private_data; > + struct virtio_device *vdev = vblk->vdev; > + int i; > + u8 writeback; > + &...
2012 Jul 04
1
[PATCH] virtio-blk: allow toggling host cache between writeback and writethrough
...userspace API after all, and you see to prefer writeback in one word in your own code so let's not inflict pain on others :) Also, would be nice to make it discoverable what the legal values are. Another attribute valid_cache_types with all values space separated? > +static ssize_t > +virtblk_cache_type_store(struct device *dev, struct device_attribute *attr, > + const char *buf, size_t count) > +{ > + struct gendisk *disk = dev_to_disk(dev); > + struct virtio_blk *vblk = disk->private_data; > + struct virtio_device *vdev = vblk->vdev; > + int i; > + u8 writeback; > + &...
2016 Aug 17
0
[PATCH 09/15] virtio-blk: Pass attribute group to device_add_disk
...e_attribute dev_attr_cache_type_ro = __ATTR(cache_type, S_IRUGO, virtblk_cache_type_show, NULL); -static const struct device_attribute dev_attr_cache_type_rw = +static struct device_attribute dev_attr_cache_type_rw = __ATTR(cache_type, S_IRUGO|S_IWUSR, virtblk_cache_type_show, virtblk_cache_type_store); @@ -550,6 +550,26 @@ static struct blk_mq_ops virtio_mq_ops = { static unsigned int virtblk_queue_depth; module_param_named(queue_depth, virtblk_queue_depth, uint, 0444); +static struct attribute *virtblk_attrs_ro[] = { + &dev_attr_serial.attr, + &dev_attr_cache_type_ro.attr, + NUL...
2017 Jul 03
0
[PATCH v1] virtio_blk: Use sysfs_match_string() helper
..._blk.c | 7 ++----- > ?1 file changed, 2 insertions(+), 5 deletions(-) > > diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c > index 553cc4c542b4..0e707b8cce9d 100644 > --- a/drivers/block/virtio_blk.c > +++ b/drivers/block/virtio_blk.c > @@ -541,12 +541,9 @@ virtblk_cache_type_store(struct device *dev, > struct device_attribute *attr, > ? int i; > ? > ? BUG_ON(!virtio_has_feature(vblk->vdev, > VIRTIO_BLK_F_CONFIG_WCE)); > - for (i = ARRAY_SIZE(virtblk_cache_types); --i >= 0; ) > - if (sysfs_streq(buf, virtblk_cache_types[i])) > - break; > -...
2017 Jul 03
2
[PATCH v1] virtio_blk: Use sysfs_match_string() helper
...e changed, 2 insertions(+), 5 deletions(-) > > > > diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c > > index 553cc4c542b4..0e707b8cce9d 100644 > > --- a/drivers/block/virtio_blk.c > > +++ b/drivers/block/virtio_blk.c > > @@ -541,12 +541,9 @@ virtblk_cache_type_store(struct device *dev, > > struct device_attribute *attr, > > ? int i; > > ? > > ? BUG_ON(!virtio_has_feature(vblk->vdev, > > VIRTIO_BLK_F_CONFIG_WCE)); > > - for (i = ARRAY_SIZE(virtblk_cache_types); --i >= 0; ) > > - if (sysfs_streq(buf, virtblk_cach...
2017 Jul 03
2
[PATCH v1] virtio_blk: Use sysfs_match_string() helper
...e changed, 2 insertions(+), 5 deletions(-) > > > > diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c > > index 553cc4c542b4..0e707b8cce9d 100644 > > --- a/drivers/block/virtio_blk.c > > +++ b/drivers/block/virtio_blk.c > > @@ -541,12 +541,9 @@ virtblk_cache_type_store(struct device *dev, > > struct device_attribute *attr, > > ? int i; > > ? > > ? BUG_ON(!virtio_has_feature(vblk->vdev, > > VIRTIO_BLK_F_CONFIG_WCE)); > > - for (i = ARRAY_SIZE(virtblk_cache_types); --i >= 0; ) > > - if (sysfs_streq(buf, virtblk_cach...
2012 Nov 19
0
[PATCH 247/493] drivers/block: remove use of __devinit
.../block/virtio_blk.c b/drivers/block/virtio_blk.c index dbba5cf..9f64e5cb 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -696,7 +696,7 @@ static const struct device_attribute dev_attr_cache_type_rw = __ATTR(cache_type, S_IRUGO|S_IWUSR, virtblk_cache_type_show, virtblk_cache_type_store); -static int __devinit virtblk_probe(struct virtio_device *vdev) +static int virtblk_probe(struct virtio_device *vdev) { struct virtio_blk *vblk; struct request_queue *q; @@ -963,7 +963,7 @@ static unsigned int features[] = { /* * virtio_blk causes spurious section mismatch warning by...
2012 Nov 19
0
[PATCH 247/493] drivers/block: remove use of __devinit
.../block/virtio_blk.c b/drivers/block/virtio_blk.c index dbba5cf..9f64e5cb 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -696,7 +696,7 @@ static const struct device_attribute dev_attr_cache_type_rw = __ATTR(cache_type, S_IRUGO|S_IWUSR, virtblk_cache_type_show, virtblk_cache_type_store); -static int __devinit virtblk_probe(struct virtio_device *vdev) +static int virtblk_probe(struct virtio_device *vdev) { struct virtio_blk *vblk; struct request_queue *q; @@ -963,7 +963,7 @@ static unsigned int features[] = { /* * virtio_blk causes spurious section mismatch warning by...
2013 Apr 05
8
[PATCH 0/7] virtio cleanups
Aiming these for coming merge window. Nothing should change, but get ready for a non-guest-endian config transports, and > 32 features bits. Final one is just an overdue consolidation. Cheers, Rusty. Rusty Russell (7): virtio_config: introduce size-based accessors. virtio: use size-based config accessors. virtio_config: helpers for non-converting accessors. virtio_config: make
2013 Apr 05
8
[PATCH 0/7] virtio cleanups
Aiming these for coming merge window. Nothing should change, but get ready for a non-guest-endian config transports, and > 32 features bits. Final one is just an overdue consolidation. Cheers, Rusty. Rusty Russell (7): virtio_config: introduce size-based accessors. virtio: use size-based config accessors. virtio_config: helpers for non-converting accessors. virtio_config: make
2018 May 23
3
[PATCH] block drivers/block: Use octal not symbolic permissions
...vice_attribute dev_attr_cache_type_ro = - __ATTR(cache_type, S_IRUGO, + __ATTR(cache_type, 0444, virtblk_cache_type_show, NULL); static const struct device_attribute dev_attr_cache_type_rw = - __ATTR(cache_type, S_IRUGO|S_IWUSR, + __ATTR(cache_type, 0644, virtblk_cache_type_show, virtblk_cache_type_store); static int virtblk_init_request(struct blk_mq_tag_set *set, struct request *rq, diff --git a/drivers/block/xen-blkback/blkback.c b/drivers/block/xen-blkback/blkback.c index 987d665e82de..b55b245e8052 100644 --- a/drivers/block/xen-blkback/blkback.c +++ b/drivers/block/xen-blkback/blkback.c @@...
2018 May 23
3
[PATCH] block drivers/block: Use octal not symbolic permissions
...vice_attribute dev_attr_cache_type_ro = - __ATTR(cache_type, S_IRUGO, + __ATTR(cache_type, 0444, virtblk_cache_type_show, NULL); static const struct device_attribute dev_attr_cache_type_rw = - __ATTR(cache_type, S_IRUGO|S_IWUSR, + __ATTR(cache_type, 0644, virtblk_cache_type_show, virtblk_cache_type_store); static int virtblk_init_request(struct blk_mq_tag_set *set, struct request *rq, diff --git a/drivers/block/xen-blkback/blkback.c b/drivers/block/xen-blkback/blkback.c index 987d665e82de..b55b245e8052 100644 --- a/drivers/block/xen-blkback/blkback.c +++ b/drivers/block/xen-blkback/blkback.c @@...
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
2013 Mar 21
24
[PATCH 00/22] New virtio PCI layout
I've renewed this again, with some comments from HPA. I've tried to keep the new patches separate, so you can see the changes since we last discussed this (and so it's easy to back it out if we decide it's insane). I haven't even looked at the QEMU side so this is completely untested. Comments gratefully received! Rusty. Michael S Tsirkin (1): pci: add pci_iomap_range
2013 Mar 21
24
[PATCH 00/22] New virtio PCI layout
I've renewed this again, with some comments from HPA. I've tried to keep the new patches separate, so you can see the changes since we last discussed this (and so it's easy to back it out if we decide it's insane). I haven't even looked at the QEMU side so this is completely untested. Comments gratefully received! Rusty. Michael S Tsirkin (1): pci: add pci_iomap_range