diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-07-27 14:35:37 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-07-27 14:35:37 -0400 |
commit | 08fd8c17686c6b09fa410a26d516548dd80ff147 (patch) | |
tree | 0d8c17e70a94518a301e85fc7b23fbc09311068c /drivers/block/xen-blkback | |
parent | e831101a73fbc8339ef1d1909dad3ef64f089e70 (diff) | |
parent | d34c30cc1fa80f509500ff192ea6bc7d30671061 (diff) |
Merge tag 'for-linus-4.8-rc0-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip
Pull xen updates from David Vrabel:
"Features and fixes for 4.8-rc0:
- ACPI support for guests on ARM platforms.
- Generic steal time support for arm and x86.
- Support cases where kernel cpu is not Xen VCPU number (e.g., if
in-guest kexec is used).
- Use the system workqueue instead of a custom workqueue in various
places"
* tag 'for-linus-4.8-rc0-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: (47 commits)
xen: add static initialization of steal_clock op to xen_time_ops
xen/pvhvm: run xen_vcpu_setup() for the boot CPU
xen/evtchn: use xen_vcpu_id mapping
xen/events: fifo: use xen_vcpu_id mapping
xen/events: use xen_vcpu_id mapping in events_base
x86/xen: use xen_vcpu_id mapping when pointing vcpu_info to shared_info
x86/xen: use xen_vcpu_id mapping for HYPERVISOR_vcpu_op
xen: introduce xen_vcpu_id mapping
x86/acpi: store ACPI ids from MADT for future usage
x86/xen: update cpuid.h from Xen-4.7
xen/evtchn: add IOCTL_EVTCHN_RESTRICT
xen-blkback: really don't leak mode property
xen-blkback: constify instance of "struct attribute_group"
xen-blkfront: prefer xenbus_scanf() over xenbus_gather()
xen-blkback: prefer xenbus_scanf() over xenbus_gather()
xen: support runqueue steal time on xen
arm/xen: add support for vm_assist hypercall
xen: update xen headers
xen-pciback: drop superfluous variables
xen-pciback: short-circuit read path used for merging write values
...
Diffstat (limited to 'drivers/block/xen-blkback')
-rw-r--r-- | drivers/block/xen-blkback/xenbus.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/block/xen-blkback/xenbus.c b/drivers/block/xen-blkback/xenbus.c index 2994cfa44c8a..3cc6d1d86f1e 100644 --- a/drivers/block/xen-blkback/xenbus.c +++ b/drivers/block/xen-blkback/xenbus.c | |||
@@ -379,7 +379,7 @@ static struct attribute *xen_vbdstat_attrs[] = { | |||
379 | NULL | 379 | NULL |
380 | }; | 380 | }; |
381 | 381 | ||
382 | static struct attribute_group xen_vbdstat_group = { | 382 | static const struct attribute_group xen_vbdstat_group = { |
383 | .name = "statistics", | 383 | .name = "statistics", |
384 | .attrs = xen_vbdstat_attrs, | 384 | .attrs = xen_vbdstat_attrs, |
385 | }; | 385 | }; |
@@ -715,8 +715,11 @@ static void backend_changed(struct xenbus_watch *watch, | |||
715 | 715 | ||
716 | /* Front end dir is a number, which is used as the handle. */ | 716 | /* Front end dir is a number, which is used as the handle. */ |
717 | err = kstrtoul(strrchr(dev->otherend, '/') + 1, 0, &handle); | 717 | err = kstrtoul(strrchr(dev->otherend, '/') + 1, 0, &handle); |
718 | if (err) | 718 | if (err) { |
719 | kfree(be->mode); | ||
720 | be->mode = NULL; | ||
719 | return; | 721 | return; |
722 | } | ||
720 | 723 | ||
721 | be->major = major; | 724 | be->major = major; |
722 | be->minor = minor; | 725 | be->minor = minor; |
@@ -1022,9 +1025,9 @@ static int connect_ring(struct backend_info *be) | |||
1022 | pr_debug("%s %s\n", __func__, dev->otherend); | 1025 | pr_debug("%s %s\n", __func__, dev->otherend); |
1023 | 1026 | ||
1024 | be->blkif->blk_protocol = BLKIF_PROTOCOL_DEFAULT; | 1027 | be->blkif->blk_protocol = BLKIF_PROTOCOL_DEFAULT; |
1025 | err = xenbus_gather(XBT_NIL, dev->otherend, "protocol", | 1028 | err = xenbus_scanf(XBT_NIL, dev->otherend, "protocol", |
1026 | "%63s", protocol, NULL); | 1029 | "%63s", protocol); |
1027 | if (err) | 1030 | if (err <= 0) |
1028 | strcpy(protocol, "unspecified, assuming default"); | 1031 | strcpy(protocol, "unspecified, assuming default"); |
1029 | else if (0 == strcmp(protocol, XEN_IO_PROTO_ABI_NATIVE)) | 1032 | else if (0 == strcmp(protocol, XEN_IO_PROTO_ABI_NATIVE)) |
1030 | be->blkif->blk_protocol = BLKIF_PROTOCOL_NATIVE; | 1033 | be->blkif->blk_protocol = BLKIF_PROTOCOL_NATIVE; |
@@ -1036,10 +1039,9 @@ static int connect_ring(struct backend_info *be) | |||
1036 | xenbus_dev_fatal(dev, err, "unknown fe protocol %s", protocol); | 1039 | xenbus_dev_fatal(dev, err, "unknown fe protocol %s", protocol); |
1037 | return -ENOSYS; | 1040 | return -ENOSYS; |
1038 | } | 1041 | } |
1039 | err = xenbus_gather(XBT_NIL, dev->otherend, | 1042 | err = xenbus_scanf(XBT_NIL, dev->otherend, |
1040 | "feature-persistent", "%u", | 1043 | "feature-persistent", "%u", &pers_grants); |
1041 | &pers_grants, NULL); | 1044 | if (err <= 0) |
1042 | if (err) | ||
1043 | pers_grants = 0; | 1045 | pers_grants = 0; |
1044 | 1046 | ||
1045 | be->blkif->vbd.feature_gnt_persistent = pers_grants; | 1047 | be->blkif->vbd.feature_gnt_persistent = pers_grants; |