search for: virtblk_config_changed_work

Displaying 20 results from an estimated 71 matches for "virtblk_config_changed_work".

2013 Feb 21
3
[PATCH] virtio-blk: emit udev event when device is resized
...e.cz> --- drivers/block/virtio_blk.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 8ad21a2..5990382 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -539,6 +539,8 @@ static void virtblk_config_changed_work(struct work_struct *work) struct virtio_device *vdev = vblk->vdev; struct request_queue *q = vblk->disk->queue; char cap_str_2[10], cap_str_10[10]; + char event[] = "RESIZE=1"; + char *envp[] = { event, NULL }; u64 capacity, size; mutex_lock(&vblk->config_lock)...
2013 Feb 21
3
[PATCH] virtio-blk: emit udev event when device is resized
...e.cz> --- drivers/block/virtio_blk.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 8ad21a2..5990382 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -539,6 +539,8 @@ static void virtblk_config_changed_work(struct work_struct *work) struct virtio_device *vdev = vblk->vdev; struct request_queue *q = vblk->disk->queue; char cap_str_2[10], cap_str_10[10]; + char event[] = "RESIZE=1"; + char *envp[] = { event, NULL }; u64 capacity, size; mutex_lock(&vblk->config_lock)...
2017 Jul 26
2
[PATCH] virtio_blk: fix incorrect message when disk is resized
.../block/virtio_blk.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 4e02aa5fdac0..69a2d1748743 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -381,6 +381,7 @@ static void virtblk_config_changed_work(struct work_struct *work) struct request_queue *q = vblk->disk->queue; char cap_str_2[10], cap_str_10[10]; char *envp[] = { "RESIZE=1", NULL }; + unsigned long long nblocks; u64 capacity; /* Host must always specify the capacity. */ @@ -393,16 +394,19 @@ static void virt...
2017 Jul 26
2
[PATCH] virtio_blk: fix incorrect message when disk is resized
.../block/virtio_blk.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 4e02aa5fdac0..69a2d1748743 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -381,6 +381,7 @@ static void virtblk_config_changed_work(struct work_struct *work) struct request_queue *q = vblk->disk->queue; char cap_str_2[10], cap_str_10[10]; char *envp[] = { "RESIZE=1", NULL }; + unsigned long long nblocks; u64 capacity; /* Host must always specify the capacity. */ @@ -393,16 +394,19 @@ static void virt...
2018 Jan 03
1
[PATCH] virtio_blk: print capacity at probe time
...blk.c b/drivers/block/virtio_blk.c index 68846897d213..787cd2a10b0b 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -373,14 +373,12 @@ static ssize_t virtblk_serial_show(struct device *dev, static DEVICE_ATTR(serial, S_IRUGO, virtblk_serial_show, NULL); -static void virtblk_config_changed_work(struct work_struct *work) +/* The queue's logical block size must be set before calling this */ +static void virtblk_update_capacity(struct virtio_blk *vblk, bool resize) { - struct virtio_blk *vblk = - container_of(work, struct virtio_blk, config_work); struct virtio_device *vdev = vblk-&g...
2011 Dec 07
2
[PATCH RFC] virtio_blk: fix config handler race
...pace updates */ struct work_struct config_work; + /* Lock for config space updates */ + struct mutex config_lock; + + /* enable config space updates */ + bool config_enable; + /* What host tells us, plus 2 for header & tailer. */ unsigned int sg_elems; @@ -318,6 +325,10 @@ static void virtblk_config_changed_work(struct work_struct *work) char cap_str_2[10], cap_str_10[10]; u64 capacity, size; + mutex_lock(&vblk->config_lock); + if (!vblk->config_enable) + goto done; + /* Host must always specify the capacity. */ vdev->config->get(vdev, offsetof(struct virtio_blk_config, capacity)...
2011 Dec 07
2
[PATCH RFC] virtio_blk: fix config handler race
...pace updates */ struct work_struct config_work; + /* Lock for config space updates */ + struct mutex config_lock; + + /* enable config space updates */ + bool config_enable; + /* What host tells us, plus 2 for header & tailer. */ unsigned int sg_elems; @@ -318,6 +325,10 @@ static void virtblk_config_changed_work(struct work_struct *work) char cap_str_2[10], cap_str_10[10]; u64 capacity, size; + mutex_lock(&vblk->config_lock); + if (!vblk->config_enable) + goto done; + /* Host must always specify the capacity. */ vdev->config->get(vdev, offsetof(struct virtio_blk_config, capacity)...
2014 Oct 05
0
[PATCH 06/16] virtio_blk: drop config_enable
...ock/virtio_blk.c @@ -44,9 +44,6 @@ struct virtio_blk /* Lock for config space updates */ struct mutex config_lock; - /* enable config space updates */ - bool config_enable; - /* What host tells us, plus 2 for header & tailer. */ unsigned int sg_elems; @@ -348,8 +345,6 @@ static void virtblk_config_changed_work(struct work_struct *work) u64 capacity, size; mutex_lock(&vblk->config_lock); - if (!vblk->config_enable) - goto done; /* Host must always specify the capacity. */ virtio_cread(vdev, struct virtio_blk_config, capacity, &capacity); @@ -374,7 +369,7 @@ static void virtblk_c...
2014 Oct 05
0
[PATCH 07/16] virtio-blk: drop config_mutex
...+41,6 @@ struct virtio_blk /* Process context for config space updates */ struct work_struct config_work; - /* Lock for config space updates */ - struct mutex config_lock; - /* What host tells us, plus 2 for header & tailer. */ unsigned int sg_elems; @@ -344,8 +341,6 @@ static void virtblk_config_changed_work(struct work_struct *work) char *envp[] = { "RESIZE=1", NULL }; u64 capacity, size; - mutex_lock(&vblk->config_lock); - /* Host must always specify the capacity. */ virtio_cread(vdev, struct virtio_blk_config, capacity, &capacity); @@ -369,8 +364,6 @@ static void vir...
2014 Oct 06
0
[PATCH v2 05/15] virtio_blk: drop config_enable
...ock/virtio_blk.c @@ -44,9 +44,6 @@ struct virtio_blk /* Lock for config space updates */ struct mutex config_lock; - /* enable config space updates */ - bool config_enable; - /* What host tells us, plus 2 for header & tailer. */ unsigned int sg_elems; @@ -348,8 +345,6 @@ static void virtblk_config_changed_work(struct work_struct *work) u64 capacity, size; mutex_lock(&vblk->config_lock); - if (!vblk->config_enable) - goto done; /* Host must always specify the capacity. */ virtio_cread(vdev, struct virtio_blk_config, capacity, &capacity); @@ -374,7 +369,7 @@ static void virtblk_c...
2017 Aug 04
0
[PATCH] virtio_blk: fix incorrect message when disk is resized
...---- > 1 file changed, 10 insertions(+), 6 deletions(-) Ping? > diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c > index 4e02aa5fdac0..69a2d1748743 100644 > --- a/drivers/block/virtio_blk.c > +++ b/drivers/block/virtio_blk.c > @@ -381,6 +381,7 @@ static void virtblk_config_changed_work(struct work_struct *work) > struct request_queue *q = vblk->disk->queue; > char cap_str_2[10], cap_str_10[10]; > char *envp[] = { "RESIZE=1", NULL }; > + unsigned long long nblocks; > u64 capacity; > > /* Host must always specify the capacity. */ &gt...
2014 Nov 25
2
[PATCH v4 18/42] virtio_blk: make serial attribute static
...--- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -332,7 +332,8 @@ static ssize_t virtblk_serial_show(struct device *dev, return err; } -DEVICE_ATTR(serial, S_IRUGO, virtblk_serial_show, NULL); + +static DEVICE_ATTR(serial, S_IRUGO, virtblk_serial_show, NULL); static void virtblk_config_changed_work(struct work_struct *work) { -- MST
2014 Nov 25
2
[PATCH v4 18/42] virtio_blk: make serial attribute static
...--- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -332,7 +332,8 @@ static ssize_t virtblk_serial_show(struct device *dev, return err; } -DEVICE_ATTR(serial, S_IRUGO, virtblk_serial_show, NULL); + +static DEVICE_ATTR(serial, S_IRUGO, virtblk_serial_show, NULL); static void virtblk_config_changed_work(struct work_struct *work) { -- MST
2011 Jan 27
1
[PATCH] virtio_blk: allow re-reading config space at runtime
...ct work; > +}; > + > static void blk_done(struct virtqueue *vq) > { > struct virtio_blk *vblk = vq->vdev->priv; > @@ -291,6 +298,57 @@ static ssize_t virtblk_serial_show(struc > } > DEVICE_ATTR(serial, S_IRUGO, virtblk_serial_show, NULL); > > +static void virtblk_config_changed_work(struct work_struct *work) > +{ > + struct virtblk_config_change *cfg = > + container_of(work, struct virtblk_config_change, work); > + struct virtio_device *vdev = cfg->vdev; > + struct virtio_blk *vblk = vdev->priv; > + struct request_queue *q = vblk->disk->queue; &g...
2011 Jan 27
1
[PATCH] virtio_blk: allow re-reading config space at runtime
...ct work; > +}; > + > static void blk_done(struct virtqueue *vq) > { > struct virtio_blk *vblk = vq->vdev->priv; > @@ -291,6 +298,57 @@ static ssize_t virtblk_serial_show(struc > } > DEVICE_ATTR(serial, S_IRUGO, virtblk_serial_show, NULL); > > +static void virtblk_config_changed_work(struct work_struct *work) > +{ > + struct virtblk_config_change *cfg = > + container_of(work, struct virtblk_config_change, work); > + struct virtio_device *vdev = cfg->vdev; > + struct virtio_blk *vblk = vdev->priv; > + struct request_queue *q = vblk->disk->queue; &g...
2011 Aug 16
1
[PATCH] virtio-blk: Add stats VQ to collect information about devices
...vb->stats_vq; + sg_init_one(&sg, vb->stats, sizeof(vb->stats)); + if (virtqueue_add_buf(vq, &sg, 1, 0, vb) < 0) + BUG(); + virtqueue_kick(vq); +} + static void blk_done(struct virtqueue *vq) { struct virtio_blk *vblk = vq->vdev->priv; @@ -306,6 +379,11 @@ static void virtblk_config_changed_work(struct work_struct *work) char cap_str_2[10], cap_str_10[10]; u64 capacity, size; + if (vblk->need_stats_update) { + stats_handle_request(vblk); + return; + } + /* Host must always specify the capacity. */ vdev->config->get(vdev, offsetof(struct virtio_blk_config, capacity),...
2011 Aug 16
1
[PATCH] virtio-blk: Add stats VQ to collect information about devices
...vb->stats_vq; + sg_init_one(&sg, vb->stats, sizeof(vb->stats)); + if (virtqueue_add_buf(vq, &sg, 1, 0, vb) < 0) + BUG(); + virtqueue_kick(vq); +} + static void blk_done(struct virtqueue *vq) { struct virtio_blk *vblk = vq->vdev->priv; @@ -306,6 +379,11 @@ static void virtblk_config_changed_work(struct work_struct *work) char cap_str_2[10], cap_str_10[10]; u64 capacity, size; + if (vblk->need_stats_update) { + stats_handle_request(vblk); + return; + } + /* Host must always specify the capacity. */ vdev->config->get(vdev, offsetof(struct virtio_blk_config, capacity),...
2015 Mar 13
0
[PATCH] sd, mmc, virtio_blk, string_helpers: fix block size units
...sson <ulf.hansson at linaro.org> Kind regards Uffe > > --- > > diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c > index cdfbd21..26d2440 100644 > --- a/drivers/block/virtio_blk.c > +++ b/drivers/block/virtio_blk.c > @@ -344,7 +344,7 @@ static void virtblk_config_changed_work(struct work_struct *work) > struct request_queue *q = vblk->disk->queue; > char cap_str_2[10], cap_str_10[10]; > char *envp[] = { "RESIZE=1", NULL }; > - u64 capacity, size; > + u64 capacity; > > /* Host must always sp...
2015 Mar 13
0
[PATCH] sd, mmc, virtio_blk, string_helpers: fix block size units
...sson <ulf.hansson at linaro.org> Kind regards Uffe > > --- > > diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c > index cdfbd21..26d2440 100644 > --- a/drivers/block/virtio_blk.c > +++ b/drivers/block/virtio_blk.c > @@ -344,7 +344,7 @@ static void virtblk_config_changed_work(struct work_struct *work) > struct request_queue *q = vblk->disk->queue; > char cap_str_2[10], cap_str_10[10]; > char *envp[] = { "RESIZE=1", NULL }; > - u64 capacity, size; > + u64 capacity; > > /* Host must always sp...
2014 Oct 06
25
[PATCH v2 00/15] virtio: fix spec compliance issues
Rusty, I have a mind to include this patchset for this merge window. Any input on this? This fixes the following virtio spec compliance issues: 1. on restore, drivers use device before setting ACKNOWLEDGE and DRIVER bits 2. on probe, drivers aren't prepared to handle config interrupts arriving before probe returns 3. on probe, drivers use device before DRIVER_OK it set Note that 1 is a