Quantcast

[PATCH][aws] blkfront: add uevent for size change

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[PATCH][aws] blkfront: add uevent for size change

Kamal Mostafa-2
BugLink: https://bugs.launchpad.net/bugs/1683878

This Xen blkfront patch (recently submitted to LKML with positive feedback[0])
is required by AWS.  It is probably eventually destined for all supported
Ubuntu kernels but we'd like it to land in linux-aws immediately.

Patch looks proper to me and applies cleanly to linux-aws (xenial).

 -Kamal

[0] https://patchwork.kernel.org/patch/9676017/
    or orig LKML: https://lkml.org/lkml/2017/4/11/736


Marc Olson (1):
  UBUNTU: SAUCE: blkfront: add uevent for size change

 drivers/block/xen-blkfront.c | 3 +++
 1 file changed, 3 insertions(+)

--
2.7.4


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[PATCH][aws] UBUNTU: SAUCE: blkfront: add uevent for size change

Kamal Mostafa-2
From: Marc Olson <[hidden email]>

BugLink: https://bugs.launchpad.net/bugs/1683878

When a blkfront device is resized from dom0, emit a KOBJ_CHANGE uevent to
notify the guest about the change. This allows for custom udev rules, such
as automatically resizing a filesystem, when an event occurs.

Signed-off-by: Marc Olson <[hidden email]>
Reference: https://lkml.org/lkml/2017/4/11/736
Signed-off-by: Kamal Mostafa <[hidden email]>
---
 drivers/block/xen-blkfront.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
index 2fee2ee..66abf9c 100644
--- a/drivers/block/xen-blkfront.c
+++ b/drivers/block/xen-blkfront.c
@@ -1996,6 +1996,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;
 
  switch (info->connected) {
@@ -2012,6 +2013,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:
--
2.7.4


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

ACK: [PATCH][aws] blkfront: add uevent for size change

Joseph Salisbury-3
In reply to this post by Kamal Mostafa-2
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

ACK: [PATCH][aws] blkfront: add uevent for size change

brad.figg
In reply to this post by Kamal Mostafa-2
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

APPLIED[aws]: [PATCH][aws] UBUNTU: SAUCE: blkfront: add uevent for size change

Stefan Bader-2
In reply to this post by Kamal Mostafa-2
Applied to aws branch while re-spinning.


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team

signature.asc (836 bytes) Download Attachment
Loading...