summaryrefslogtreecommitdiff
path: root/target/linux/generic/patches-3.14/047-UBI-make-UBI_IOCVOLCRBLK-take-a-parameter-for-future.patch
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2014-06-11 12:59:06 +0000
committerJohn Crispin <john@openwrt.org>2014-06-11 12:59:06 +0000
commitd494983d020035cacd8d8023afad22d2761fa7fc (patch)
treefd94c75873c35abbaebf7fd3e12f093e147ce4f1 /target/linux/generic/patches-3.14/047-UBI-make-UBI_IOCVOLCRBLK-take-a-parameter-for-future.patch
parentba59fab9bbafce7754ef426d267e6ad9f381ed73 (diff)
downloadmtk-20170518-d494983d020035cacd8d8023afad22d2761fa7fc.zip
mtk-20170518-d494983d020035cacd8d8023afad22d2761fa7fc.tar.gz
mtk-20170518-d494983d020035cacd8d8023afad22d2761fa7fc.tar.bz2
kernel: backport ubiblock support from 3.15
Backport ubiblock support from kernel 3.15 as well as all follow-up fixes related to ubiblock. Signed-off-by: Daniel Golle <daniel@makrotopia.org> create mode 100644 target/linux/generic/patches-3.14/040-UBI-R-O-block-driver-on-top-of-UBI-volumes.patch create mode 100644 target/linux/generic/patches-3.14/041-UBI-block-do-not-use-term-attach.patch create mode 100644 target/linux/generic/patches-3.14/042-UBI-block-Mark-init-only-symbol-as-__initdata.patch create mode 100644 target/linux/generic/patches-3.14/043-UBI-block-Use-u64-for-the-64-bit-dividend.patch create mode 100644 target/linux/generic/patches-3.14/044-UBI-rename-block-device-ioctls.patch create mode 100644 target/linux/generic/patches-3.14/045-UBI-block-Remove-__initdata-from-ubiblock_param_ops.patch create mode 100644 target/linux/generic/patches-3.14/046-UBI-avoid-workqueue-format-string-leak.patch create mode 100644 target/linux/generic/patches-3.14/047-UBI-make-UBI_IOCVOLCRBLK-take-a-parameter-for-future.patch SVN-Revision: 41118
Diffstat (limited to 'target/linux/generic/patches-3.14/047-UBI-make-UBI_IOCVOLCRBLK-take-a-parameter-for-future.patch')
-rw-r--r--target/linux/generic/patches-3.14/047-UBI-make-UBI_IOCVOLCRBLK-take-a-parameter-for-future.patch63
1 files changed, 63 insertions, 0 deletions
diff --git a/target/linux/generic/patches-3.14/047-UBI-make-UBI_IOCVOLCRBLK-take-a-parameter-for-future.patch b/target/linux/generic/patches-3.14/047-UBI-make-UBI_IOCVOLCRBLK-take-a-parameter-for-future.patch
new file mode 100644
index 0000000..0a0230f
--- /dev/null
+++ b/target/linux/generic/patches-3.14/047-UBI-make-UBI_IOCVOLCRBLK-take-a-parameter-for-future.patch
@@ -0,0 +1,63 @@
+From 463c5eedb4a13b9aa91f05498a0f2c20bd03f8c4 Mon Sep 17 00:00:00 2001
+From: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
+Date: Wed, 5 Mar 2014 11:16:14 -0300
+Subject: [PATCH] UBI: make UBI_IOCVOLCRBLK take a parameter for future usage
+
+In order to allow a future ioctl parameter, such as a creation flag,
+we change the UBI_IOCVOLCRBLK so it accepts a struct ubi_blkcreate_req.
+For the time being the structure is not in use, but fully reserved.
+
+This ABI change is still possible and harmless, because the ioctl has just
+been introduced and there's no userspace program which uses it.
+
+Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
+Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
+---
+ include/uapi/mtd/ubi-user.h | 19 +++++++++++++++----
+ 1 file changed, 15 insertions(+), 4 deletions(-)
+
+diff --git a/include/uapi/mtd/ubi-user.h b/include/uapi/mtd/ubi-user.h
+index 9c885e2..1927b0d 100644
+--- a/include/uapi/mtd/ubi-user.h
++++ b/include/uapi/mtd/ubi-user.h
+@@ -138,9 +138,12 @@
+ * Block devices on UBI volumes
+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ *
+- * To create or remove a R/O block device on top of an UBI volume the
+- * %UBI_IOCVOLCRBLK and %UBI_IOCVOLRMBLK ioctl commands should be used,
+- * respectively. These commands take no arguments.
++ * To create a R/O block device on top of an UBI volume the %UBI_IOCVOLCRBLK
++ * should be used. A pointer to a &struct ubi_blkcreate_req object is expected
++ * to be passed, which is not used and reserved for future usage.
++ *
++ * Conversely, to remove a block device the %UBI_IOCVOLRMBLK should be used,
++ * which takes no arguments.
+ */
+
+ /*
+@@ -199,7 +202,7 @@
+ #define UBI_IOCSETVOLPROP _IOW(UBI_VOL_IOC_MAGIC, 6, \
+ struct ubi_set_vol_prop_req)
+ /* Create a R/O block device on top of an UBI volume */
+-#define UBI_IOCVOLCRBLK _IO(UBI_VOL_IOC_MAGIC, 7)
++#define UBI_IOCVOLCRBLK _IOW(UBI_VOL_IOC_MAGIC, 7, struct ubi_blkcreate_req)
+ /* Remove the R/O block device */
+ #define UBI_IOCVOLRMBLK _IO(UBI_VOL_IOC_MAGIC, 8)
+
+@@ -431,4 +434,12 @@ struct ubi_set_vol_prop_req {
+ __u64 value;
+ } __packed;
+
++/**
++ * struct ubi_blkcreate_req - a data structure used in block creation requests.
++ * @padding: reserved for future, not used, has to be zeroed
++ */
++struct ubi_blkcreate_req {
++ __s8 padding[128];
++} __packed;
++
+ #endif /* __UBI_USER_H__ */
+--
+1.9.2
+