Displaying 14 results from an estimated 14 matches for "cap_str_2".
Did you mean:
cap_str_10
2017 Jul 26
2
[PATCH] virtio_blk: fix incorrect message when disk is resized
...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 virtblk_config_changed_work(struct work_struct *work)
capacity = (sector_t)-1;
}
- string_get...
2017 Jul 26
2
[PATCH] virtio_blk: fix incorrect message when disk is resized
...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 virtblk_config_changed_work(struct work_struct *work)
capacity = (sector_t)-1;
}
- string_get...
2015 Mar 13
0
[PATCH] sd, mmc, virtio_blk, string_helpers: fix block size units
...ck/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 specify the capacity. */
> virtio_cread(vdev, struct virtio_blk_config, capacity, &capacity);
> @@ -35...
2015 Mar 13
0
[PATCH] sd, mmc, virtio_blk, string_helpers: fix block size units
...ck/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 specify the capacity. */
> virtio_cread(vdev, struct virtio_blk_config, capacity, &capacity);
> @@ -35...
2017 Aug 04
0
[PATCH] virtio_blk: fix incorrect message when disk is resized
...lock/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 virtblk_config_changed_work(struct work_struct *work)
> capacity...
2011 Jan 27
1
[PATCH] virtio_blk: allow re-reading config space at runtime
...rk_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;
> + char cap_str_2[10], cap_str_10[10];
> + u64 capacity, size;
> +
> + /* Host must always specify the capacity. */
> + vdev->config->get(vdev, offsetof(struct virtio_blk_config, capacity),
> + &capacity, sizeof(capacity));
> +
> + /* If capacity is too big, truncate with warning....
2011 Jan 27
1
[PATCH] virtio_blk: allow re-reading config space at runtime
...rk_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;
> + char cap_str_2[10], cap_str_10[10];
> + u64 capacity, size;
> +
> + /* Host must always specify the capacity. */
> + vdev->config->get(vdev, offsetof(struct virtio_blk_config, capacity),
> + &capacity, sizeof(capacity));
> +
> + /* If capacity is too big, truncate with warning....
2018 Jan 03
1
[PATCH] virtio_blk: print capacity at probe time
...st 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->vdev;
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;
@@ -402,13 +400,24 @@ static void virtblk_config_changed_work(struct work_struct *work)
STRING_UNITS_10, cap_str_10, sizeof(cap_str_10));
dev_notice(&vdev->dev,
-...
2011 Dec 07
2
[PATCH RFC] virtio_blk: fix config handler race
...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),
&capacity, sizeof(capacity));
@...
2011 Dec 07
2
[PATCH RFC] virtio_blk: fix config handler race
...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),
&capacity, sizeof(capacity));
@...
2013 Feb 21
3
[PATCH] virtio-blk: emit udev event when device is resized
...irtio_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);
@@ -568,6 +570,7 @@ static void virtblk_config_changed_work(struct work_struct *work)
set_capacity(vblk->disk, capacity);
revalidat...
2013 Feb 21
3
[PATCH] virtio-blk: emit udev event when device is resized
...irtio_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);
@@ -568,6 +570,7 @@ static void virtblk_config_changed_work(struct work_struct *work)
set_capacity(vblk->disk, capacity);
revalidat...
2011 Aug 16
1
[PATCH] virtio-blk: Add stats VQ to collect information about devices
...(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),
&capacity, sizeof(capacity));
@@ -3...
2011 Aug 16
1
[PATCH] virtio-blk: Add stats VQ to collect information about devices
...(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),
&capacity, sizeof(capacity));
@@ -3...