aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJens Axboe <axboe@fb.com>2017-04-19 08:14:34 -0600
committerJens Axboe <axboe@fb.com>2017-04-19 08:14:34 -0600
commit6af3847329191db7716309217bde152c3cacc13d (patch)
tree65d4ebcda8ac1811ed7517db7feff02aac009380
parentnbd: add a flag to destroy an nbd device on disconnect (diff)
parentblkfront: add uevent for size change (diff)
downloadlinux-dev-6af3847329191db7716309217bde152c3cacc13d.tar.xz
linux-dev-6af3847329191db7716309217bde152c3cacc13d.zip
Merge branch 'stable/for-jens-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen into for-4.12/block
Konrad writes: It has one fix - to emit an uevent whenever the size of the guest disk image changes.
-rw-r--r--drivers/block/xen-blkfront.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
index d137ef8a72be..abed296ce605 100644
--- a/drivers/block/xen-blkfront.c
+++ b/drivers/block/xen-blkfront.c
@@ -2345,6 +2345,7 @@ static void blkfront_connect(struct blkfront_info *info)
unsigned long sector_size;
unsigned int physical_sector_size;
unsigned int binfo;
+ char *envp[] = { "RESIZE=1", NULL };
int err, i;
switch (info->connected) {
@@ -2361,6 +2362,8 @@ static void blkfront_connect(struct blkfront_info *info)
sectors);
set_capacity(info->gd, sectors);
revalidate_disk(info->gd);
+ kobject_uevent_env(&disk_to_dev(info->gd)->kobj,
+ KOBJ_CHANGE, envp);
return;
case BLKIF_STATE_SUSPENDED: