Displaying 20 results from an estimated 84 matches for "id_str".
2010 Jun 18
4
[PATCH 1/2] Add 'serial' attribute to virtio-blk devices
...+static inline int serial_sysfs(char *d, char *s, int n)
+{
+ char *di = d;
+
+ while (*s && n--)
+ *d++ = *s++;
+ return d - di;
+}
+
+static ssize_t virtblk_serial_show(struct device *dev,
+ struct device_attribute *attr, char *buf)
+{
+ struct gendisk *disk = dev_to_disk(dev);
+ char id_str[VIRTIO_BLK_ID_BYTES];
+
+ if (IS_ERR(virtblk_get_id(disk, id_str)))
+ return 0;
+ return serial_sysfs(buf, id_str, min(VIRTIO_BLK_ID_BYTES, PAGE_SIZE));
+}
+DEVICE_ATTR(serial, S_IRUGO, virtblk_serial_show, NULL);
+
static int __devinit virtblk_probe(struct virtio_device *vdev)
{
struct virtio...
2010 Jun 18
4
[PATCH 1/2] Add 'serial' attribute to virtio-blk devices
...+static inline int serial_sysfs(char *d, char *s, int n)
+{
+ char *di = d;
+
+ while (*s && n--)
+ *d++ = *s++;
+ return d - di;
+}
+
+static ssize_t virtblk_serial_show(struct device *dev,
+ struct device_attribute *attr, char *buf)
+{
+ struct gendisk *disk = dev_to_disk(dev);
+ char id_str[VIRTIO_BLK_ID_BYTES];
+
+ if (IS_ERR(virtblk_get_id(disk, id_str)))
+ return 0;
+ return serial_sysfs(buf, id_str, min(VIRTIO_BLK_ID_BYTES, PAGE_SIZE));
+}
+DEVICE_ATTR(serial, S_IRUGO, virtblk_serial_show, NULL);
+
static int __devinit virtblk_probe(struct virtio_device *vdev)
{
struct virtio...
2016 Oct 03
1
[PATCH 4/4] virtio_blk: Rename a jump label in virtblk_get_id()
...nsertions(+), 2 deletions(-)
>
> diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
> index 696f452..fef2bd0 100644
> --- a/drivers/block/virtio_blk.c
> +++ b/drivers/block/virtio_blk.c
> @@ -247,10 +247,10 @@ static int virtblk_get_id(struct gendisk *disk, char *id_str)
>
> err = blk_rq_map_kern(q, req, id_str, VIRTIO_BLK_ID_BYTES, GFP_KERNEL);
> if (err)
> - goto out;
> + goto put_request;
>
> err = blk_execute_rq(vblk->disk->queue, vblk->disk, req, false);
> -out:
> + put_re...
2016 Oct 03
1
[PATCH 4/4] virtio_blk: Rename a jump label in virtblk_get_id()
...nsertions(+), 2 deletions(-)
>
> diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
> index 696f452..fef2bd0 100644
> --- a/drivers/block/virtio_blk.c
> +++ b/drivers/block/virtio_blk.c
> @@ -247,10 +247,10 @@ static int virtblk_get_id(struct gendisk *disk, char *id_str)
>
> err = blk_rq_map_kern(q, req, id_str, VIRTIO_BLK_ID_BYTES, GFP_KERNEL);
> if (err)
> - goto out;
> + goto put_request;
>
> err = blk_execute_rq(vblk->disk->queue, vblk->disk, req, false);
> -out:
> + put_re...
2007 Aug 21
0
2 commits - test/trace
...Microphone && prop == "names")
return true;
+#endif
return false;
}
@@ -231,19 +260,21 @@ function trace_properties_recurse (o, le
flags = " (" + flags + ")";
// handle secretId that keeps track what things we have seen earlier
+ var id_string = "";
var seen = false;
- if (hasOwnProperty (o[prop], "mySecretId")) {
- seen = true;
- } else {
- o[prop]["mySecretId"] = nextSecretId;
- if (o[prop]["mySecretId"] != undefined) {
- ASSetPropFlags (o[prop], "mySecretId"...
2001 Nov 30
1
Problems with utmp
Hi there,
I'm using samba-2.2.2 under Solaris 8 and I've got the following problem!
I have configured samba with "--with-utmp" and with "--with-quota" and
everything works fine. But when look for the last users logged in, in the
utmp-database there are only the first seven letters of the username, not
eight that we use for usernames.
Can you help me with this problem
2010 Jun 24
3
[PATCH 0/2] v2: Add 'serial' attribute to virtio-blk devices
Using Rusty's suggestion I've respun the patch removing the special copy
function. I've tested this patch in a guest kernel with and without qemu
supplying serial numbers for the block devices and it's working as expected.
When qemu supplies serial numbers, the correct value is supplied to
/sys/block/vdX/serial and can be used by udev for generating disk/by-id paths
(without
2010 Jun 24
3
[PATCH 0/2] v2: Add 'serial' attribute to virtio-blk devices
Using Rusty's suggestion I've respun the patch removing the special copy
function. I've tested this patch in a guest kernel with and without qemu
supplying serial numbers for the block devices and it's working as expected.
When qemu supplies serial numbers, the correct value is supplied to
/sys/block/vdX/serial and can be used by udev for generating disk/by-id paths
(without
2015 Feb 21
5
[PATCH v2 0/4] btrfs: add support to btrfs inspect-internal
This series adds new APIs to support btrfs inspect-internal.
v2:
- use full name of btrfs command as inspect-internal
Hu Tao (4):
New API: btrfs_inspect_internal_rootid
New API: btrfs_inspect_internal_subvolid_resolve
New API: btrfs_inspect_internal_inode_resolve
New API: btrfs_inspect_internal_logical_resolve
daemon/btrfs.c | 161
2016 Oct 09
1
[PATCH 4/4] virtio_blk: Rename a jump label in virtblk_get_id()
...sertions(+), 2 deletions(-)
>
> diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
> index 696f452..fef2bd0 100644
> --- a/drivers/block/virtio_blk.c
> +++ b/drivers/block/virtio_blk.c
> @@ -247,10 +247,10 @@ static int virtblk_get_id(struct gendisk *disk, char *id_str)
>
> err = blk_rq_map_kern(q, req, id_str, VIRTIO_BLK_ID_BYTES, GFP_KERNEL);
> if (err)
> - goto out;
> + goto put_request;
>
> err = blk_execute_rq(vblk->disk->queue, vblk->disk, req, false);
> -out:
> + put_request:
> blk_put_request(req);
>...
2016 Oct 09
1
[PATCH 4/4] virtio_blk: Rename a jump label in virtblk_get_id()
...sertions(+), 2 deletions(-)
>
> diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
> index 696f452..fef2bd0 100644
> --- a/drivers/block/virtio_blk.c
> +++ b/drivers/block/virtio_blk.c
> @@ -247,10 +247,10 @@ static int virtblk_get_id(struct gendisk *disk, char *id_str)
>
> err = blk_rq_map_kern(q, req, id_str, VIRTIO_BLK_ID_BYTES, GFP_KERNEL);
> if (err)
> - goto out;
> + goto put_request;
>
> err = blk_execute_rq(vblk->disk->queue, vblk->disk, req, false);
> -out:
> + put_request:
> blk_put_request(req);
>...
2007 Aug 22
0
3 commits - libswfdec/swfdec_as_array.c libswfdec/swfdec_as_function.c test/trace
...__SWF_VERSION__ < 6
+ if (prop == "__proto__" && o[prop] == undefined)
+ return true;
#endif
return false;
@@ -260,71 +332,63 @@ function trace_properties_recurse (o, pr
if (flags != "")
flags = " (" + flags + ")";
- var id_string = "";
- if (typeof (o[prop]) == "object" || typeof (o[prop]) == "function")
- id_string = "[" + o[prop]["mySecretId"] + "]";
-
- // put things together
- var output = prop + flags + " = " + typeof (o[prop]) + id_...
2012 Jun 01
4
[PATCH v3] virtio_blk: unlock vblk->lock during kick
...queue_kick(vblk->vq);
+ if (!issued)
+ return;
+
+ if (virtqueue_kick_prepare(vblk->vq)) {
+ spin_unlock_irq(vblk->disk->queue->queue_lock);
+ virtqueue_notify(vblk->vq);
+ spin_lock_irq(vblk->disk->queue->queue_lock);
+ }
}
/* return id (s/n) string for *disk to *id_str
--
1.7.10
2012 Jun 01
4
[PATCH v3] virtio_blk: unlock vblk->lock during kick
...queue_kick(vblk->vq);
+ if (!issued)
+ return;
+
+ if (virtqueue_kick_prepare(vblk->vq)) {
+ spin_unlock_irq(vblk->disk->queue->queue_lock);
+ virtqueue_notify(vblk->vq);
+ spin_lock_irq(vblk->disk->queue->queue_lock);
+ }
}
/* return id (s/n) string for *disk to *id_str
--
1.7.10
2020 Apr 30
3
[PATCH v4] virtio-blk: handle block_device_operations callbacks after hot unplug
...ions open/release and
+ * virtio_driver probe/remove so this object can be freed once no
+ * longer in use.
+ */
+ refcount_t refs;
+
/* What host tells us, plus 2 for header & tailer. */
unsigned int sg_elems;
@@ -295,10 +311,55 @@ static int virtblk_get_id(struct gendisk *disk, char *id_str)
return err;
}
+static void virtblk_get(struct virtio_blk *vblk)
+{
+ refcount_inc(&vblk->refs);
+}
+
+static void virtblk_put(struct virtio_blk *vblk)
+{
+ if (refcount_dec_and_test(&vblk->refs)) {
+ ida_simple_remove(&vd_index_ida, vblk->index);
+ mutex_destroy(&vb...
2020 Apr 30
3
[PATCH v4] virtio-blk: handle block_device_operations callbacks after hot unplug
...ions open/release and
+ * virtio_driver probe/remove so this object can be freed once no
+ * longer in use.
+ */
+ refcount_t refs;
+
/* What host tells us, plus 2 for header & tailer. */
unsigned int sg_elems;
@@ -295,10 +311,55 @@ static int virtblk_get_id(struct gendisk *disk, char *id_str)
return err;
}
+static void virtblk_get(struct virtio_blk *vblk)
+{
+ refcount_inc(&vblk->refs);
+}
+
+static void virtblk_put(struct virtio_blk *vblk)
+{
+ if (refcount_dec_and_test(&vblk->refs)) {
+ ida_simple_remove(&vd_index_ida, vblk->index);
+ mutex_destroy(&vb...
2020 Apr 28
2
[PATCH v2] virtio-blk: handle block_device_operations callbacks after hot unplug
...ems;
@@ -53,6 +60,9 @@ struct virtio_blk {
/* num of vqs */
int num_vqs;
struct virtio_blk_vq *vqs;
+
+ /* Provides mutual exclusion with virtblk_remove(). */
+ struct mutex remove_mutex;
};
struct virtblk_req {
@@ -295,10 +305,54 @@ static int virtblk_get_id(struct gendisk *disk, char *id_str)
return err;
}
+static void virtblk_get(struct virtio_blk *vblk)
+{
+ refcount_inc(&vblk->refs);
+}
+
+static void virtblk_put(struct virtio_blk *vblk)
+{
+ if (refcount_dec_and_test(&vblk->refs)) {
+ ida_simple_remove(&vd_index_ida, vblk->index);
+ mutex_destroy(&vb...
2020 Apr 28
2
[PATCH v2] virtio-blk: handle block_device_operations callbacks after hot unplug
...ems;
@@ -53,6 +60,9 @@ struct virtio_blk {
/* num of vqs */
int num_vqs;
struct virtio_blk_vq *vqs;
+
+ /* Provides mutual exclusion with virtblk_remove(). */
+ struct mutex remove_mutex;
};
struct virtblk_req {
@@ -295,10 +305,54 @@ static int virtblk_get_id(struct gendisk *disk, char *id_str)
return err;
}
+static void virtblk_get(struct virtio_blk *vblk)
+{
+ refcount_inc(&vblk->refs);
+}
+
+static void virtblk_put(struct virtio_blk *vblk)
+{
+ if (refcount_dec_and_test(&vblk->refs)) {
+ ida_simple_remove(&vd_index_ida, vblk->index);
+ mutex_destroy(&vb...
2007 Aug 15
3
2 commits - libswfdec/swfdec_as_object.c test/trace
libswfdec/swfdec_as_object.c | 62 +++++++++++++++-------
test/trace/Makefile.am | 9 +++
test/trace/addProperty-set-prototypes-5.swf |binary
test/trace/addProperty-set-prototypes-5.swf.trace | 4 +
test/trace/addProperty-set-prototypes-6.swf |binary
test/trace/addProperty-set-prototypes-6.swf.trace | 5 +
2012 Jun 11
0
Race condition during hotplug when dropping block queue lock
...+
+ if (virtqueue_kick_prepare(vblk->vq)) {
+ spin_unlock_irq(vblk->disk->queue->queue_lock);
+ virtqueue_notify(vblk->vq);
+ spin_lock_irq(vblk->disk->queue->queue_lock);
+ }
}
/* return id (s/n) string for *disk to *id_str
Stefan