aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/hack-5.15/410-block-fit-partition-parser.patch
diff options
context:
space:
mode:
authorAnsuel Smith <ansuelsmth@gmail.com>2021-11-04 23:25:50 +0100
committerDaniel Golle <daniel@makrotopia.org>2022-03-27 00:07:34 +0000
commit1f302afd7350f46ec0fcc4b12b0ad59ac92fe5b6 (patch)
tree7c015f93344ad49d6dbf9888364b65f442d18483 /target/linux/generic/hack-5.15/410-block-fit-partition-parser.patch
parent7829ae4a2f9d37fa66b683d5824e0e3e93bb6c50 (diff)
downloadupstream-1f302afd7350f46ec0fcc4b12b0ad59ac92fe5b6.tar.gz
upstream-1f302afd7350f46ec0fcc4b12b0ad59ac92fe5b6.tar.bz2
upstream-1f302afd7350f46ec0fcc4b12b0ad59ac92fe5b6.zip
generic: 5.15: rework hack patch
Rework hack patch in dir for kernel 5.15. For the specific patch of packet mangeling introduce a new extra_priv_flags as we don't have enough space to add additional flags in priv_flags. Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Diffstat (limited to 'target/linux/generic/hack-5.15/410-block-fit-partition-parser.patch')
-rw-r--r--target/linux/generic/hack-5.15/410-block-fit-partition-parser.patch22
1 files changed, 11 insertions, 11 deletions
diff --git a/target/linux/generic/hack-5.15/410-block-fit-partition-parser.patch b/target/linux/generic/hack-5.15/410-block-fit-partition-parser.patch
index 7816356227..b8cada98e6 100644
--- a/target/linux/generic/hack-5.15/410-block-fit-partition-parser.patch
+++ b/target/linux/generic/hack-5.15/410-block-fit-partition-parser.patch
@@ -6,9 +6,9 @@
#define ADDPART_FLAG_WHOLEDISK 2
+#define ADDPART_FLAG_READONLY 4
+#define ADDPART_FLAG_ROOTDEV 8
- void delete_partition(struct hd_struct *part);
- int bdev_add_partition(struct block_device *bdev, int partno,
- sector_t start, sector_t length);
+ int bdev_add_partition(struct gendisk *disk, int partno, sector_t start,
+ sector_t length);
+ int bdev_del_partition(struct gendisk *disk, int partno);
--- a/block/partitions/Kconfig
+++ b/block/partitions/Kconfig
@@ -101,6 +101,13 @@ config ATARI_PARTITION
@@ -92,17 +92,17 @@
--- a/drivers/mtd/ubi/block.c
+++ b/drivers/mtd/ubi/block.c
@@ -396,7 +396,11 @@ int ubiblock_create(struct ubi_volume_in
- dev->leb_size = vi->usable_leb_size;
- /* Initialize the gendisk of this ubiblock device */
+ gd->fops = &ubiblock_ops;
+ gd->major = ubiblock_major;
+#ifdef CONFIG_FIT_PARTITION
-+ gd = alloc_disk(0);
++ gd->minors = 0;
+#else
- gd = alloc_disk(1);
+ gd->minors = 1;
+#endif
- if (!gd) {
- pr_err("UBI: block: alloc_disk failed\n");
- ret = -ENODEV;
+ gd->first_minor = idr_alloc(&ubiblock_minor_idr, dev, 0, 0, GFP_KERNEL);
+ if (gd->first_minor < 0) {
+ dev_err(disk_to_dev(gd),
@@ -413,6 +417,9 @@ int ubiblock_create(struct ubi_volume_in
goto out_put_disk;
}
@@ -118,7 +118,7 @@
@@ -706,6 +706,9 @@ int efi_partition(struct parsed_partitio
gpt_entry *ptes = NULL;
u32 i;
- unsigned ssz = bdev_logical_block_size(state->bdev) / 512;
+ unsigned ssz = queue_logical_block_size(state->disk->queue) / 512;
+#ifdef CONFIG_FIT_PARTITION
+ u32 extra_slot = 64;
+#endif