search for: dev_attr_cache_type_rw

Displaying 9 results from an estimated 9 matches for "dev_attr_cache_type_rw".

Did you mean: dev_attr_cache_type_ro
2016 Aug 17
0
[PATCH 09/15] virtio-blk: Pass attribute group to device_add_disk
...rintf(buf, 40, "%s\n", virtblk_cache_types[writeback]); } -static const struct device_attribute dev_attr_cache_type_ro = +static struct device_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,...
2012 Jul 04
1
[PATCH] virtio-blk: allow toggling host cache between writeback and writethrough
...uot;, virtblk_cache_types[writeback]); Why 40? Why snprintf? A plain sprintf won't do? > +} > + > +static const struct device_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 = > + __ATTR(cache_type, S_IRUGO|S_IWUSR, > + virtblk_cache_type_show, virtblk_cache_type_store); > + > static int __devinit virtblk_probe(struct virtio_device *vdev) > { > struct virtio_blk *vblk; > @@ -474,8 +549,7 @@ static int __devinit virtblk_probe(struct virti...
2012 Jul 04
1
[PATCH] virtio-blk: allow toggling host cache between writeback and writethrough
...uot;, virtblk_cache_types[writeback]); Why 40? Why snprintf? A plain sprintf won't do? > +} > + > +static const struct device_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 = > + __ATTR(cache_type, S_IRUGO|S_IWUSR, > + virtblk_cache_type_show, virtblk_cache_type_store); > + > static int __devinit virtblk_probe(struct virtio_device *vdev) > { > struct virtio_blk *vblk; > @@ -474,8 +549,7 @@ static int __devinit virtblk_probe(struct virti...
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 Nov 19
0
[PATCH 247/493] drivers/block: remove use of __devinit
...t pci_dev *dev, const struct pci_device_id *id) { int ret = -ENODEV; diff --git a/drivers/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 @@ s...
2012 Nov 19
0
[PATCH 247/493] drivers/block: remove use of __devinit
...t pci_dev *dev, const struct pci_device_id *id) { int ret = -ENODEV; diff --git a/drivers/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 @@ s...
2018 May 23
3
[PATCH] block drivers/block: Use octal not symbolic permissions
...@ -576,10 +576,10 @@ virtblk_cache_type_show(struct device *dev, struct device_attribute *attr, } static const struct device_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 i...
2018 May 23
3
[PATCH] block drivers/block: Use octal not symbolic permissions
...@ -576,10 +576,10 @@ virtblk_cache_type_show(struct device *dev, struct device_attribute *attr, } static const struct device_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 i...