Skip to content

Commit 6af3847

Browse files
committed
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.
2 parents a2c9790 + 89515d0 commit 6af3847

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/block/xen-blkfront.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2345,6 +2345,7 @@ static void blkfront_connect(struct blkfront_info *info)
23452345
unsigned long sector_size;
23462346
unsigned int physical_sector_size;
23472347
unsigned int binfo;
2348+
char *envp[] = { "RESIZE=1", NULL };
23482349
int err, i;
23492350

23502351
switch (info->connected) {
@@ -2361,6 +2362,8 @@ static void blkfront_connect(struct blkfront_info *info)
23612362
sectors);
23622363
set_capacity(info->gd, sectors);
23632364
revalidate_disk(info->gd);
2365+
kobject_uevent_env(&disk_to_dev(info->gd)->kobj,
2366+
KOBJ_CHANGE, envp);
23642367

23652368
return;
23662369
case BLKIF_STATE_SUSPENDED:

0 commit comments

Comments
 (0)