search for: virtblk_cache_type_show

Displaying 11 results from an estimated 11 matches for "virtblk_cache_type_show".

2016 Aug 17
0
[PATCH 09/15] virtio-blk: Pass attribute group to device_add_disk
...ock/virtio_blk.c | 38 +++++++++++++++++++++++++++----------- 1 file changed, 27 insertions(+), 11 deletions(-) diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 4564df5..ff60d82 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -522,10 +522,10 @@ virtblk_cache_type_show(struct device *dev, struct device_attribute *attr, return snprintf(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, virtbl...
2012 Jul 04
1
[PATCH] virtio-blk: allow toggling host cache between writeback and writethrough
...> + return -EINVAL; > + > + writeback = i; > + vdev->config->set(vdev, > + offsetof(struct virtio_blk_config, wce), > + &writeback, sizeof(writeback)); > + > + virtblk_update_cache_mode(vdev); > + return count; > +} > + > +static ssize_t > +virtblk_cache_type_show(struct device *dev, struct device_attribute *attr, > + char *buf) > +{ > + struct gendisk *disk = dev_to_disk(dev); > + struct virtio_blk *vblk = disk->private_data; > + u8 writeback = virtblk_get_cache_mode(vblk->vdev); > + > + BUG_ON(writeback >= ARRAY_SIZE(virtbl...
2012 Jul 04
1
[PATCH] virtio-blk: allow toggling host cache between writeback and writethrough
...> + return -EINVAL; > + > + writeback = i; > + vdev->config->set(vdev, > + offsetof(struct virtio_blk_config, wce), > + &writeback, sizeof(writeback)); > + > + virtblk_update_cache_mode(vdev); > + return count; > +} > + > +static ssize_t > +virtblk_cache_type_show(struct device *dev, struct device_attribute *attr, > + char *buf) > +{ > + struct gendisk *disk = dev_to_disk(dev); > + struct virtio_blk *vblk = disk->private_data; > + u8 writeback = virtblk_get_cache_mode(vblk->vdev); > + > + BUG_ON(writeback >= ARRAY_SIZE(virtbl...
2018 May 23
3
[PATCH] block drivers/block: Use octal not symbolic permissions
...-static DEVICE_ATTR(serial, S_IRUGO, virtblk_serial_show, NULL); +static DEVICE_ATTR(serial, 0444, virtblk_serial_show, NULL); /* The queue's logical block size must be set before calling this */ static void virtblk_update_capacity(struct virtio_blk *vblk, bool resize) @@ -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...
2018 May 23
3
[PATCH] block drivers/block: Use octal not symbolic permissions
...-static DEVICE_ATTR(serial, S_IRUGO, virtblk_serial_show, NULL); +static DEVICE_ATTR(serial, 0444, virtblk_serial_show, NULL); /* The queue's logical block size must be set before calling this */ static void virtblk_update_capacity(struct virtio_blk *vblk, bool resize) @@ -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...
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
...DEV; 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 @@ static unsigned int features[] = { /* * virtio_blk causes spurious se...
2012 Nov 19
0
[PATCH 247/493] drivers/block: remove use of __devinit
...DEV; 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 @@ static unsigned int features[] = { /* * virtio_blk causes spurious se...
2017 Oct 25
0
a570843ee9 ("virtio_blk: Fix an SG_IO regression"): kernel BUG at include/linux/scatterlist.h:92!
...33415] __blk_mq_delay_run_hw_queue+0x67/0xba [ 15.236257] blk_mq_run_hw_queue+0x14/0x16 [ 15.239477] blk_mq_sched_insert_request+0xd8/0x11f [ 15.243490] blk_execute_rq_nowait+0x78/0xd3 [ 15.246775] blk_execute_rq+0x68/0x9f [ 15.249864] virtblk_serial_show+0x79/0xd7 [ 15.253033] ? virtblk_cache_type_show+0x46/0x46 [ 15.256436] dev_attr_show+0x25/0x49 [ 15.259273] sysfs_kf_seq_show+0x7f/0xcf [ 15.262768] kernfs_seq_show+0x27/0x29 [ 15.265724] seq_read+0x177/0x333 [ 15.268372] kernfs_fop_read+0x3c/0x15d [ 15.271562] __vfs_read+0x26/0x9d [ 15.274213] ? fsnotify_perm+0x63/0x6f [...
2017 Oct 25
0
a570843ee9 ("virtio_blk: Fix an SG_IO regression"): kernel BUG at include/linux/scatterlist.h:92!
...33415] __blk_mq_delay_run_hw_queue+0x67/0xba [ 15.236257] blk_mq_run_hw_queue+0x14/0x16 [ 15.239477] blk_mq_sched_insert_request+0xd8/0x11f [ 15.243490] blk_execute_rq_nowait+0x78/0xd3 [ 15.246775] blk_execute_rq+0x68/0x9f [ 15.249864] virtblk_serial_show+0x79/0xd7 [ 15.253033] ? virtblk_cache_type_show+0x46/0x46 [ 15.256436] dev_attr_show+0x25/0x49 [ 15.259273] sysfs_kf_seq_show+0x7f/0xcf [ 15.262768] kernfs_seq_show+0x27/0x29 [ 15.265724] seq_read+0x177/0x333 [ 15.268372] kernfs_fop_read+0x3c/0x15d [ 15.271562] __vfs_read+0x26/0x9d [ 15.274213] ? fsnotify_perm+0x63/0x6f [...