]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 17 Oct 2015 19:32:30 +0000 (12:32 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 17 Oct 2015 19:32:30 +0000 (12:32 -0700)
added patches:
dm-btree-add-ref-counting-ops-for-the-leaves-of-top-level-btrees.patch
dm-raid-fix-round-up-of-default-region-size.patch
usb-option-add-zte-pids.patch

queue-3.10/dm-btree-add-ref-counting-ops-for-the-leaves-of-top-level-btrees.patch [new file with mode: 0644]
queue-3.10/dm-raid-fix-round-up-of-default-region-size.patch [new file with mode: 0644]
queue-3.10/series
queue-3.10/usb-option-add-zte-pids.patch [new file with mode: 0644]

diff --git a/queue-3.10/dm-btree-add-ref-counting-ops-for-the-leaves-of-top-level-btrees.patch b/queue-3.10/dm-btree-add-ref-counting-ops-for-the-leaves-of-top-level-btrees.patch
new file mode 100644 (file)
index 0000000..c0a18a4
--- /dev/null
@@ -0,0 +1,135 @@
+From b0dc3c8bc157c60b1d470163882be8c13e1950af Mon Sep 17 00:00:00 2001
+From: Joe Thornber <ejt@redhat.com>
+Date: Wed, 12 Aug 2015 15:12:09 +0100
+Subject: dm btree: add ref counting ops for the leaves of top level btrees
+
+From: Joe Thornber <ejt@redhat.com>
+
+commit b0dc3c8bc157c60b1d470163882be8c13e1950af upstream.
+
+When using nested btrees, the top leaves of the top levels contain
+block addresses for the root of the next tree down.  If we shadow a
+shared leaf node the leaf values (sub tree roots) should be incremented
+accordingly.
+
+This is only an issue if there is metadata sharing in the top levels.
+Which only occurs if metadata snapshots are being used (as is possible
+with dm-thinp).  And could result in a block from the thinp metadata
+snap being reused early, thus corrupting the thinp metadata snap.
+
+Signed-off-by: Joe Thornber <ejt@redhat.com>
+Signed-off-by: Mike Snitzer <snitzer@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/md/persistent-data/dm-btree-internal.h |    6 ++++
+ drivers/md/persistent-data/dm-btree-remove.c   |   12 ++------
+ drivers/md/persistent-data/dm-btree-spine.c    |   37 +++++++++++++++++++++++++
+ drivers/md/persistent-data/dm-btree.c          |    7 ----
+ 4 files changed, 47 insertions(+), 15 deletions(-)
+
+--- a/drivers/md/persistent-data/dm-btree-internal.h
++++ b/drivers/md/persistent-data/dm-btree-internal.h
+@@ -138,4 +138,10 @@ int lower_bound(struct btree_node *n, ui
+ extern struct dm_block_validator btree_node_validator;
++/*
++ * Value type for upper levels of multi-level btrees.
++ */
++extern void init_le64_type(struct dm_transaction_manager *tm,
++                         struct dm_btree_value_type *vt);
++
+ #endif        /* DM_BTREE_INTERNAL_H */
+--- a/drivers/md/persistent-data/dm-btree-remove.c
++++ b/drivers/md/persistent-data/dm-btree-remove.c
+@@ -544,14 +544,6 @@ static int remove_raw(struct shadow_spin
+       return r;
+ }
+-static struct dm_btree_value_type le64_type = {
+-      .context = NULL,
+-      .size = sizeof(__le64),
+-      .inc = NULL,
+-      .dec = NULL,
+-      .equal = NULL
+-};
+-
+ int dm_btree_remove(struct dm_btree_info *info, dm_block_t root,
+                   uint64_t *keys, dm_block_t *new_root)
+ {
+@@ -559,12 +551,14 @@ int dm_btree_remove(struct dm_btree_info
+       int index = 0, r = 0;
+       struct shadow_spine spine;
+       struct btree_node *n;
++      struct dm_btree_value_type le64_vt;
++      init_le64_type(info->tm, &le64_vt);
+       init_shadow_spine(&spine, info);
+       for (level = 0; level < info->levels; level++) {
+               r = remove_raw(&spine, info,
+                              (level == last_level ?
+-                              &info->value_type : &le64_type),
++                              &info->value_type : &le64_vt),
+                              root, keys[level], (unsigned *)&index);
+               if (r < 0)
+                       break;
+--- a/drivers/md/persistent-data/dm-btree-spine.c
++++ b/drivers/md/persistent-data/dm-btree-spine.c
+@@ -249,3 +249,40 @@ int shadow_root(struct shadow_spine *s)
+ {
+       return s->root;
+ }
++
++static void le64_inc(void *context, const void *value_le)
++{
++      struct dm_transaction_manager *tm = context;
++      __le64 v_le;
++
++      memcpy(&v_le, value_le, sizeof(v_le));
++      dm_tm_inc(tm, le64_to_cpu(v_le));
++}
++
++static void le64_dec(void *context, const void *value_le)
++{
++      struct dm_transaction_manager *tm = context;
++      __le64 v_le;
++
++      memcpy(&v_le, value_le, sizeof(v_le));
++      dm_tm_dec(tm, le64_to_cpu(v_le));
++}
++
++static int le64_equal(void *context, const void *value1_le, const void *value2_le)
++{
++      __le64 v1_le, v2_le;
++
++      memcpy(&v1_le, value1_le, sizeof(v1_le));
++      memcpy(&v2_le, value2_le, sizeof(v2_le));
++      return v1_le == v2_le;
++}
++
++void init_le64_type(struct dm_transaction_manager *tm,
++                  struct dm_btree_value_type *vt)
++{
++      vt->context = tm;
++      vt->size = sizeof(__le64);
++      vt->inc = le64_inc;
++      vt->dec = le64_dec;
++      vt->equal = le64_equal;
++}
+--- a/drivers/md/persistent-data/dm-btree.c
++++ b/drivers/md/persistent-data/dm-btree.c
+@@ -651,12 +651,7 @@ static int insert(struct dm_btree_info *
+       struct btree_node *n;
+       struct dm_btree_value_type le64_type;
+-      le64_type.context = NULL;
+-      le64_type.size = sizeof(__le64);
+-      le64_type.inc = NULL;
+-      le64_type.dec = NULL;
+-      le64_type.equal = NULL;
+-
++      init_le64_type(info->tm, &le64_type);
+       init_shadow_spine(&spine, info);
+       for (level = 0; level < (info->levels - 1); level++) {
diff --git a/queue-3.10/dm-raid-fix-round-up-of-default-region-size.patch b/queue-3.10/dm-raid-fix-round-up-of-default-region-size.patch
new file mode 100644 (file)
index 0000000..63000b7
--- /dev/null
@@ -0,0 +1,39 @@
+From 042745ee53a0a7c1f5aff191a4a24213c6dcfb52 Mon Sep 17 00:00:00 2001
+From: Mikulas Patocka <mpatocka@redhat.com>
+Date: Fri, 2 Oct 2015 11:17:37 -0400
+Subject: dm raid: fix round up of default region size
+
+From: Mikulas Patocka <mpatocka@redhat.com>
+
+commit 042745ee53a0a7c1f5aff191a4a24213c6dcfb52 upstream.
+
+Commit 3a0f9aaee028 ("dm raid: round region_size to power of two")
+intended to make sure that the default region size is a power of two.
+However, the logic in that commit is incorrect and sets the variable
+region_size to 0 or 1, depending on whether min_region_size is a power
+of two.
+
+Fix this logic, using roundup_pow_of_two(), so that region_size is
+properly rounded up to the next power of two.
+
+Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
+Fixes: 3a0f9aaee028 ("dm raid: round region_size to power of two")
+Signed-off-by: Mike Snitzer <snitzer@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/md/dm-raid.c |    3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+--- a/drivers/md/dm-raid.c
++++ b/drivers/md/dm-raid.c
+@@ -325,8 +325,7 @@ static int validate_region_size(struct r
+                */
+               if (min_region_size > (1 << 13)) {
+                       /* If not a power of 2, make it the next power of 2 */
+-                      if (min_region_size & (min_region_size - 1))
+-                              region_size = 1 << fls(region_size);
++                      region_size = roundup_pow_of_two(min_region_size);
+                       DMINFO("Choosing default region size of %lu sectors",
+                              region_size);
+               } else {
index a7755c88f3cd3ded2f9cf0fcf0f04a63dc10b482..8f0dc13842f6c6aa3326c02b0fb27e20479e9fc8 100644 (file)
@@ -15,3 +15,6 @@ asoc-fix-broken-pxa-soc-support.patch
 asoc-dwc-correct-irq-clear-method.patch
 btrfs-skip-waiting-on-ordered-range-for-special-files.patch
 staging-comedi-adl_pci7x3x-fix-digital-output-on-pci-7230.patch
+dm-btree-add-ref-counting-ops-for-the-leaves-of-top-level-btrees.patch
+usb-option-add-zte-pids.patch
+dm-raid-fix-round-up-of-default-region-size.patch
diff --git a/queue-3.10/usb-option-add-zte-pids.patch b/queue-3.10/usb-option-add-zte-pids.patch
new file mode 100644 (file)
index 0000000..5263785
--- /dev/null
@@ -0,0 +1,67 @@
+From 19ab6bc5674a30fdb6a2436b068d19a3c17dc73e Mon Sep 17 00:00:00 2001
+From: "Liu.Zhao" <lzsos369@163.com>
+Date: Mon, 24 Aug 2015 08:36:12 -0700
+Subject: USB: option: add ZTE PIDs
+
+From: "Liu.Zhao" <lzsos369@163.com>
+
+commit 19ab6bc5674a30fdb6a2436b068d19a3c17dc73e upstream.
+
+This is intended to add ZTE device PIDs on kernel.
+
+Signed-off-by: Liu.Zhao <lzsos369@163.com>
+[johan: sort the new entries ]
+Signed-off-by: Johan Hovold <johan@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/serial/option.c |   24 ++++++++++++++++++++++++
+ 1 file changed, 24 insertions(+)
+
+--- a/drivers/usb/serial/option.c
++++ b/drivers/usb/serial/option.c
+@@ -276,6 +276,10 @@ static void option_instat_callback(struc
+ #define ZTE_PRODUCT_MF622                     0x0001
+ #define ZTE_PRODUCT_MF628                     0x0015
+ #define ZTE_PRODUCT_MF626                     0x0031
++#define ZTE_PRODUCT_ZM8620_X                  0x0396
++#define ZTE_PRODUCT_ME3620_MBIM                       0x0426
++#define ZTE_PRODUCT_ME3620_X                  0x1432
++#define ZTE_PRODUCT_ME3620_L                  0x1433
+ #define ZTE_PRODUCT_AC2726                    0xfff1
+ #define ZTE_PRODUCT_CDMA_TECH                 0xfffe
+ #define ZTE_PRODUCT_AC8710T                   0xffff
+@@ -549,6 +553,18 @@ static const struct option_blacklist_inf
+       .sendsetup = BIT(1) | BIT(2) | BIT(3),
+ };
++static const struct option_blacklist_info zte_me3620_mbim_blacklist = {
++      .reserved = BIT(2) | BIT(3) | BIT(4),
++};
++
++static const struct option_blacklist_info zte_me3620_xl_blacklist = {
++      .reserved = BIT(3) | BIT(4) | BIT(5),
++};
++
++static const struct option_blacklist_info zte_zm8620_x_blacklist = {
++      .reserved = BIT(3) | BIT(4) | BIT(5),
++};
++
+ static const struct option_blacklist_info huawei_cdc12_blacklist = {
+       .reserved = BIT(1) | BIT(2),
+ };
+@@ -1579,6 +1595,14 @@ static const struct usb_device_id option
+        .driver_info = (kernel_ulong_t)&zte_ad3812_z_blacklist },
+       { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MC2716, 0xff, 0xff, 0xff),
+        .driver_info = (kernel_ulong_t)&zte_mc2716_z_blacklist },
++      { USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_ME3620_L),
++       .driver_info = (kernel_ulong_t)&zte_me3620_xl_blacklist },
++      { USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_ME3620_MBIM),
++       .driver_info = (kernel_ulong_t)&zte_me3620_mbim_blacklist },
++      { USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_ME3620_X),
++       .driver_info = (kernel_ulong_t)&zte_me3620_xl_blacklist },
++      { USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_ZM8620_X),
++       .driver_info = (kernel_ulong_t)&zte_zm8620_x_blacklist },
+       { USB_VENDOR_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff, 0x02, 0x01) },
+       { USB_VENDOR_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff, 0x02, 0x05) },
+       { USB_VENDOR_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff, 0x86, 0x10) },