search for: kobj_change

Displaying 20 results from an estimated 37 matches for "kobj_change".

2013 Feb 21
3
[PATCH] virtio-blk: emit udev event when device is resized
When virtio-blk device is resized from host (using block_resize from QEMU) emit KOBJ_CHANGE uevent to notify guest about such change. This allows user to have custom udev rules which would take whatever action if such event occurs. As a proof of concept I've created simple udev rule that automatically resize filesystem on virtio-blk device. ACTION=="change", KERNEL=="v...
2013 Feb 21
3
[PATCH] virtio-blk: emit udev event when device is resized
When virtio-blk device is resized from host (using block_resize from QEMU) emit KOBJ_CHANGE uevent to notify guest about such change. This allows user to have custom udev rules which would take whatever action if such event occurs. As a proof of concept I've created simple udev rule that automatically resize filesystem on virtio-blk device. ACTION=="change", KERNEL=="v...
2016 Jun 28
2
[PATCH] virtio-blk: Generate uevent after attribute available
...sn't always get created. This race condition can be easily reproduced by hot plugging a number of virtio-blk disks. Also in systemd, there used to be a related workaround in udev rules called 'WAIT_FOR="serial"', but it is removed in later versions. Now let's generate a KOBJ_CHANGE event after the attributes are ready. Signed-off-by: Fam Zheng <famz at redhat.com> --- drivers/block/virtio_blk.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 42758b5..5056007 100644 --- a/drivers/block/virtio_blk.c ++...
2016 Jun 28
2
[PATCH] virtio-blk: Generate uevent after attribute available
...sn't always get created. This race condition can be easily reproduced by hot plugging a number of virtio-blk disks. Also in systemd, there used to be a related workaround in udev rules called 'WAIT_FOR="serial"', but it is removed in later versions. Now let's generate a KOBJ_CHANGE event after the attributes are ready. Signed-off-by: Fam Zheng <famz at redhat.com> --- drivers/block/virtio_blk.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 42758b5..5056007 100644 --- a/drivers/block/virtio_blk.c ++...
2016 Jun 29
2
[PATCH] virtio-blk: Generate uevent after attribute available
...ily reproduced by hot plugging a number of > > virtio-blk disks. > > > > Also in systemd, there used to be a related workaround in udev rules > > called 'WAIT_FOR="serial"', but it is removed in later versions. > > > > Now let's generate a KOBJ_CHANGE event after the attributes are ready. > > The same race is present in other drivers as well, e.g. nvme. Please > find a way to make this work properly without needing to hack every > driver to send events manually. OK, I'll take a look today! Fam
2016 Jun 29
2
[PATCH] virtio-blk: Generate uevent after attribute available
...ily reproduced by hot plugging a number of > > virtio-blk disks. > > > > Also in systemd, there used to be a related workaround in udev rules > > called 'WAIT_FOR="serial"', but it is removed in later versions. > > > > Now let's generate a KOBJ_CHANGE event after the attributes are ready. > > The same race is present in other drivers as well, e.g. nvme. Please > find a way to make this work properly without needing to hack every > driver to send events manually. OK, I'll take a look today! Fam
2015 Mar 09
2
[PATCH] 9p/trans_virtio: fix hot-unplug
...se.\n"); + warning_time = jiffies; + } + mutex_lock(&virtio_9p_lock); + } + mutex_unlock(&virtio_9p_lock); + + vdev->config->del_vqs(vdev); + sysfs_remove_file(&(vdev->dev.kobj), &dev_attr_mount_tag.attr); kobject_uevent(&(vdev->dev.kobj), KOBJ_CHANGE); kfree(chan->tag); -- MST
2015 Mar 09
2
[PATCH] 9p/trans_virtio: fix hot-unplug
...se.\n"); + warning_time = jiffies; + } + mutex_lock(&virtio_9p_lock); + } + mutex_unlock(&virtio_9p_lock); + + vdev->config->del_vqs(vdev); + sysfs_remove_file(&(vdev->dev.kobj), &dev_attr_mount_tag.attr); kobject_uevent(&(vdev->dev.kobj), KOBJ_CHANGE); kfree(chan->tag); -- MST
2018 Jan 03
1
[PATCH] virtio_blk: print capacity at probe time
...(struct work_struct *work) +{ + struct virtio_blk *vblk = + container_of(work, struct virtio_blk, config_work); + char *envp[] = { "RESIZE=1", NULL }; + + virtblk_update_capacity(vblk, true); revalidate_disk(vblk->disk); kobject_uevent_env(&disk_to_dev(vblk->disk)->kobj, KOBJ_CHANGE, envp); } @@ -621,7 +630,6 @@ static int virtblk_probe(struct virtio_device *vdev) struct request_queue *q; int err, index; - u64 cap; u32 v, blk_size, sg_elems, opt_io_size; u16 min_io_size; u8 physical_block_exp, alignment_offset; @@ -719,17 +727,6 @@ static int virtblk_probe(struct...
2016 Jun 28
0
[PATCH] virtio-blk: Generate uevent after attribute available
...This race condition can be easily reproduced by hot plugging a number of > virtio-blk disks. > > Also in systemd, there used to be a related workaround in udev rules > called 'WAIT_FOR="serial"', but it is removed in later versions. > > Now let's generate a KOBJ_CHANGE event after the attributes are ready. The same race is present in other drivers as well, e.g. nvme. Please find a way to make this work properly without needing to hack every driver to send events manually.
2016 Sep 02
0
[PATCH] virtio-blk: Generate uevent after attribute available
...a number of > > > virtio-blk disks. > > > > > > Also in systemd, there used to be a related workaround in udev rules > > > called 'WAIT_FOR="serial"', but it is removed in later versions. > > > > > > Now let's generate a KOBJ_CHANGE event after the attributes are ready. > > > > The same race is present in other drivers as well, e.g. nvme. Please > > find a way to make this work properly without needing to hack every > > driver to send events manually. > > OK, I'll take a look today! > &...
2014 Oct 05
0
[PATCH 06/16] virtio_blk: drop config_enable
...*/ virtio_cread(vdev, struct virtio_blk_config, capacity, &capacity); @@ -374,7 +369,7 @@ static void virtblk_config_changed_work(struct work_struct *work) set_capacity(vblk->disk, capacity); revalidate_disk(vblk->disk); kobject_uevent_env(&disk_to_dev(vblk->disk)->kobj, KOBJ_CHANGE, envp); -done: + mutex_unlock(&vblk->config_lock); } @@ -609,7 +604,6 @@ static int virtblk_probe(struct virtio_device *vdev) mutex_init(&vblk->config_lock); INIT_WORK(&vblk->config_work, virtblk_config_changed_work); - vblk->config_enable = true; err = init_v...
2014 Oct 05
0
[PATCH 07/16] virtio-blk: drop config_mutex
...virtio_cread(vdev, struct virtio_blk_config, capacity, &capacity); @@ -369,8 +364,6 @@ static void virtblk_config_changed_work(struct work_struct *work) set_capacity(vblk->disk, capacity); revalidate_disk(vblk->disk); kobject_uevent_env(&disk_to_dev(vblk->disk)->kobj, KOBJ_CHANGE, envp); - - mutex_unlock(&vblk->config_lock); } static void virtblk_config_changed(struct virtio_device *vdev) @@ -601,7 +594,6 @@ static int virtblk_probe(struct virtio_device *vdev) vblk->vdev = vdev; vblk->sg_elems = sg_elems; - mutex_init(&vblk->config_lock); I...
2015 Mar 12
0
[PATCH] 9p/trans_virtio: fix hot-unplug
...} > + mutex_lock(&virtio_9p_lock); > + } > + > mutex_unlock(&virtio_9p_lock); > + > + vdev->config->del_vqs(vdev); > + > sysfs_remove_file(&(vdev->dev.kobj), &dev_attr_mount_tag.attr); > kobject_uevent(&(vdev->dev.kobj), KOBJ_CHANGE); > kfree(chan->tag); > -- > MST
2015 Mar 12
0
[PATCH] 9p/trans_virtio: fix hot-unplug
...} > + mutex_lock(&virtio_9p_lock); > + } > + > mutex_unlock(&virtio_9p_lock); > + > + vdev->config->del_vqs(vdev); > + > sysfs_remove_file(&(vdev->dev.kobj), &dev_attr_mount_tag.attr); > kobject_uevent(&(vdev->dev.kobj), KOBJ_CHANGE); > kfree(chan->tag); > -- > MST
2014 Oct 06
0
[PATCH v2 05/15] virtio_blk: drop config_enable
...*/ virtio_cread(vdev, struct virtio_blk_config, capacity, &capacity); @@ -374,7 +369,7 @@ static void virtblk_config_changed_work(struct work_struct *work) set_capacity(vblk->disk, capacity); revalidate_disk(vblk->disk); kobject_uevent_env(&disk_to_dev(vblk->disk)->kobj, KOBJ_CHANGE, envp); -done: + mutex_unlock(&vblk->config_lock); } @@ -609,7 +604,6 @@ static int virtblk_probe(struct virtio_device *vdev) mutex_init(&vblk->config_lock); INIT_WORK(&vblk->config_work, virtblk_config_changed_work); - vblk->config_enable = true; err = init_v...
2015 Mar 12
1
[PATCH] 9p/trans_virtio: fix hot-unplug
...irtio_9p_lock); > > + } > > + > > mutex_unlock(&virtio_9p_lock); > > + > > + vdev->config->del_vqs(vdev); > > + > > sysfs_remove_file(&(vdev->dev.kobj), &dev_attr_mount_tag.attr); > > kobject_uevent(&(vdev->dev.kobj), KOBJ_CHANGE); > > kfree(chan->tag); > > -- > > MST
2015 Mar 12
1
[PATCH] 9p/trans_virtio: fix hot-unplug
...irtio_9p_lock); > > + } > > + > > mutex_unlock(&virtio_9p_lock); > > + > > + vdev->config->del_vqs(vdev); > > + > > sysfs_remove_file(&(vdev->dev.kobj), &dev_attr_mount_tag.attr); > > kobject_uevent(&(vdev->dev.kobj), KOBJ_CHANGE); > > kfree(chan->tag); > > -- > > MST
2010 Mar 19
3
[PATCH 0/6] virtio: console: Fixes, abi update
Hello, These patches fix a couple of small issues: - generate a kobject change event so that udev is woken up on name changes - fix a crash after hot-unplug of the first console port and a subsequent config update But majorly, it reworks how ports are discovered: instead of numbering the ports individually in the host and the guest by just incrementing a number, we now switch to a
2010 Mar 19
3
[PATCH 0/6] virtio: console: Fixes, abi update
Hello, These patches fix a couple of small issues: - generate a kobject change event so that udev is woken up on name changes - fix a crash after hot-unplug of the first console port and a subsequent config update But majorly, it reworks how ports are discovered: instead of numbering the ports individually in the host and the guest by just incrementing a number, we now switch to a