Displaying 20 results from an estimated 3000 matches similar to: "[PATCH] virtio-blk: Generate uevent after attribute available"
2016 Jun 29
2
[PATCH] virtio-blk: Generate uevent after attribute available
On Tue, 06/28 04:45, Christoph Hellwig wrote:
> On Tue, Jun 28, 2016 at 10:39:15AM +0800, Fam Zheng wrote:
> > Userspace listens to the KOBJ_ADD uevent generated in add_disk. At that
> > point we haven't created the serial attribute file, therefore depending
> > on how fast udev reacts, the /dev/disk/by-id/ entry doesn't always get
> > created.
> >
>
2016 Jun 29
2
[PATCH] virtio-blk: Generate uevent after attribute available
On Tue, 06/28 04:45, Christoph Hellwig wrote:
> On Tue, Jun 28, 2016 at 10:39:15AM +0800, Fam Zheng wrote:
> > Userspace listens to the KOBJ_ADD uevent generated in add_disk. At that
> > point we haven't created the serial attribute file, therefore depending
> > on how fast udev reacts, the /dev/disk/by-id/ entry doesn't always get
> > created.
> >
>
2016 Jun 28
0
[PATCH] virtio-blk: Generate uevent after attribute available
On Tue, Jun 28, 2016 at 10:39:15AM +0800, Fam Zheng wrote:
> Userspace listens to the KOBJ_ADD uevent generated in add_disk. At that
> point we haven't created the serial attribute file, therefore depending
> on how fast udev reacts, the /dev/disk/by-id/ entry doesn't always get
> created.
>
> This race condition can be easily reproduced by hot plugging a number of
>
2016 Sep 02
0
[PATCH] virtio-blk: Generate uevent after attribute available
On Wed, Jun 29, 2016 at 09:24:15AM +0800, Fam Zheng wrote:
> On Tue, 06/28 04:45, Christoph Hellwig wrote:
> > On Tue, Jun 28, 2016 at 10:39:15AM +0800, Fam Zheng wrote:
> > > Userspace listens to the KOBJ_ADD uevent generated in add_disk. At that
> > > point we haven't created the serial attribute file, therefore depending
> > > on how fast udev reacts, the
2016 Jun 30
17
[PATCH v2 00/12] gendisk: Generate uevent after attribute available
The race condition is noticed between disk_add() and disk attributes, on
virtio-blk hotplug.
Userspace listens to the KOBJ_ADD uevent generated in add_disk(). At that
point we haven't created the serial attribute file, therefore depending
on how fast udev reacts, the /dev/disk/by-id/ entry doesn't always get
created.
As pointed out by Christoph Hellwig in the specific fix [1], virtio-blk
2016 Jun 30
17
[PATCH v2 00/12] gendisk: Generate uevent after attribute available
The race condition is noticed between disk_add() and disk attributes, on
virtio-blk hotplug.
Userspace listens to the KOBJ_ADD uevent generated in add_disk(). At that
point we haven't created the serial attribute file, therefore depending
on how fast udev reacts, the /dev/disk/by-id/ entry doesn't always get
created.
As pointed out by Christoph Hellwig in the specific fix [1], virtio-blk
2016 Aug 17
0
[PATCH 09/15] virtio-blk: Pass attribute group to device_add_disk
Previously after device_add_disk returns, the KOBJ_ADD uevent is already
emitted. Adding attributes after that is a poor usage of kobject, and
in practice may result in race conditions with userspace, for
example udev checks availability of certain attributes and initializes
/dev entries conditionally.
device_add_disk can handle adding attribute group better, so use it.
Meanwhile, handle error
2016 Jun 30
1
[PATCH v2 04/12] axonrom: Generate uevent after attribute available
On Wed, Jun 29, 2016 at 6:59 PM, Fam Zheng <famz at redhat.com> wrote:
> It is documented that KOBJ_ADD should be generated after the object's
> attributes and children are ready. We can achieve this with the new
> disk_gen_uevents interface.
>
> Signed-off-by: Fam Zheng <famz at redhat.com>
> ---
> arch/powerpc/sysdev/axonram.c | 3 ++-
> 1 file changed,
2016 Jun 30
1
[PATCH v2 04/12] axonrom: Generate uevent after attribute available
On Wed, Jun 29, 2016 at 6:59 PM, Fam Zheng <famz at redhat.com> wrote:
> It is documented that KOBJ_ADD should be generated after the object's
> attributes and children are ready. We can achieve this with the new
> disk_gen_uevents interface.
>
> Signed-off-by: Fam Zheng <famz at redhat.com>
> ---
> arch/powerpc/sysdev/axonram.c | 3 ++-
> 1 file changed,
2016 Jul 01
1
[PATCH v2 00/12] gendisk: Generate uevent after attribute available
On Wed, 06/29 23:38, Christoph Hellwig wrote:
> On Thu, Jun 30, 2016 at 02:35:54PM +0800, Fam Zheng wrote:
> > also more code and less flexible IMO. For example, we need at least two
> > variants, for attribute_group and device_attribute separately, right?
>
> Yes, or maybe just a calling convention that just passes both.
OK, I can look into that, but I'm not sure about
2016 Jul 01
1
[PATCH v2 00/12] gendisk: Generate uevent after attribute available
On Wed, 06/29 23:38, Christoph Hellwig wrote:
> On Thu, Jun 30, 2016 at 02:35:54PM +0800, Fam Zheng wrote:
> > also more code and less flexible IMO. For example, we need at least two
> > variants, for attribute_group and device_attribute separately, right?
>
> Yes, or maybe just a calling convention that just passes both.
OK, I can look into that, but I'm not sure about
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
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=="vd*",
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=="vd*",
2012 Jul 04
1
[PATCH] virtio-blk: allow toggling host cache between writeback and writethrough
On Tue, Jul 03, 2012 at 03:19:37PM +0200, Paolo Bonzini wrote:
> This patch adds support for the new VIRTIO_BLK_F_CONFIG_WCE feature,
> which exposes the cache mode in the configuration space and lets the
> driver modify it. The cache mode is exposed via sysfs.
>
> Even if the host does not support the new feature, the cache mode is
> visible (thanks to the existing
2012 Jul 04
1
[PATCH] virtio-blk: allow toggling host cache between writeback and writethrough
On Tue, Jul 03, 2012 at 03:19:37PM +0200, Paolo Bonzini wrote:
> This patch adds support for the new VIRTIO_BLK_F_CONFIG_WCE feature,
> which exposes the cache mode in the configuration space and lets the
> driver modify it. The cache mode is exposed via sysfs.
>
> Even if the host does not support the new feature, the cache mode is
> visible (thanks to the existing
2016 Jun 30
2
[PATCH v2 00/12] gendisk: Generate uevent after attribute available
On Wed, 06/29 23:24, Christoph Hellwig wrote:
> On Thu, Jun 30, 2016 at 09:59:41AM +0800, Fam Zheng wrote:
> > Documentation/kobject.txt:
> > > Use the KOBJ_ADD action for when the kobject is first added to the kernel.
> > > This should be done only after any attributes or children of the kobject
> > > have been initialized properly, as userspace will instantly
2016 Jun 30
2
[PATCH v2 00/12] gendisk: Generate uevent after attribute available
On Wed, 06/29 23:24, Christoph Hellwig wrote:
> On Thu, Jun 30, 2016 at 09:59:41AM +0800, Fam Zheng wrote:
> > Documentation/kobject.txt:
> > > Use the KOBJ_ADD action for when the kobject is first added to the kernel.
> > > This should be done only after any attributes or children of the kobject
> > > have been initialized properly, as userspace will instantly
2016 Jun 30
0
[PATCH v2 02/12] genhd: Honor gen_uevent and add disk_gen_uevents
In add_disk(), don't send uevent to userspace when gen_uevent is true;
also export the refactored function disk_gen_uevents for later use.
Signed-off-by: Fam Zheng <famz at redhat.com>
---
block/genhd.c | 23 +++++++++++++++++++----
include/linux/genhd.h | 1 +
2 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/block/genhd.c b/block/genhd.c
index 8e1bfa1..9b66953