qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Online resize of virtio-blk device does not emit udev event


From: Milos Vyletel
Subject: [Qemu-devel] Online resize of virtio-blk device does not emit udev event
Date: Tue, 19 Feb 2013 22:15:32 +0100 (CET)

Hi,

This list seem to be most appropriate place to ask this question since it's 
QEMU related and virtio-blk maintainers are here as well.

I'm doing some work with online resizing of guest's block device on LVM. What I
do is call lvresize to expand logical volume itself and virsh blockresize to
notify guest about this change. Besides the fact that I needed to patch kernel
to get this working on mounted partitions(BZ 906050) everything works just fine.

Now that I've had this part successfully tested I wanted to make a script that
will be triggered by udev whenever particular device is changed. I assumed that
after capacity change virtio_blk driver would emit udev event but that's not the
case. I'm able to see one on host but not on guest.

address@hidden ~]# lvresize -f -L +100M /dev/vgguests/evd2 && \
> virsh blockresize resize vdb 1
  Rounding size to boundary between physical extents: 128.00 MiB
  Extending logical volume evd2 to 15.00 GiB
  Logical volume evd2 successfully resized
Block device 'vdb' is resized

address@hidden ~]# udevadm monitor
...
KERNEL[1361292279.619233] change   /devices/virtual/block/dm-9 (block)
UDEV  [1361292279.736012] change   /devices/virtual/block/dm-9 (block)
...

I was looking at the virtblk_config_changed_work function in RHEL6.3 kernel's
drivers/block/virtio_blk.c which I believe is the function handling blockresize
and it does not look like it tries to emit any kobject uevent.

Before I jump into patching kernel my question is whether it makes sense to have
such uevent? I surely can use a way how to detect capacity change from 
userspace.

Thanks,
Milos



reply via email to

[Prev in Thread] Current Thread [Next in Thread]