Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.75 Removed upstream: bcm27xx/patches-6.12/950-0225-media-i2c-ov5647-Correct-pixel-array-offset.patch[1] bcm27xx/patches-6.12/950-0226-media-i2c-ov5647-Correct-minimum-VBLANK-value.patch[2] bcm27xx/patches-6.12/950-0248-media-i2c-ov5647-Sensor-should-report-RAW-color-spac.patch[3] qualcommax/patches-6.12/0074-v6.20-clk-qcom-gcc-ipq5018-flag-sleep-clock-as-critical.patch[4] Manually rebased: bcm27xx/patches-6.12/950-0262-mfd-simple-mfd-i2c-Add-configuration-for-RPi-POE-HAT.patch bcm27xx/patches-6.12/950-0071-drivers-mfd-sensehat-Add-Raspberry-Pi-Sense-HAT-to-s.patch bcm27xx/patches-6.12/950-0516-media-i2c-ov5647-Add-V4L2_CID_LINK_FREQUENCY-control.patch lantiq/patches-6.12/101-find_active_root.patch All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.75&id=58f1767ad5c9eda3dd0befddc1843259d46d64fa 2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.75&id=ff65571ffae52b65577121e7696bf22156e1928a 3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.75&id=fbf2a108ed5eb1c896d3f354bd05314c2e22e78f 4. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.75&id=b109dd4970a0fc89d54b1198b163f86125dd2977 Build system: x86/64 Build-tested: flogic/glinet_gl-mt6000 Run-tested: flogic/glinet_gl-mt6000 Co-authored-by: Shiji Yang <yangshiji66@outlook.com> Signed-off-by: John Audia <therealgraysky@proton.me> Link: https://github.com/openwrt/openwrt/pull/22276 Signed-off-by: Robert Marko <robimarko@gmail.com>
54 lines
1.9 KiB
Diff
54 lines
1.9 KiB
Diff
From 03cb793b26834ddca170ba87057c8f883772dd45 Mon Sep 17 00:00:00 2001
|
|
From: Christian Marangi <ansuelsmth@gmail.com>
|
|
Date: Thu, 3 Oct 2024 00:11:41 +0200
|
|
Subject: [PATCH 1/5] block: add support for defining read-only partitions
|
|
|
|
Add support for defining read-only partitions and complete support for
|
|
it in the cmdline partition parser as the additional "ro" after a
|
|
partition is scanned but never actually applied.
|
|
|
|
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
|
Reviewed-by: Christoph Hellwig <hch@lst.de>
|
|
Link: https://lore.kernel.org/r/20241002221306.4403-2-ansuelsmth@gmail.com
|
|
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
---
|
|
block/blk.h | 1 +
|
|
block/partitions/cmdline.c | 3 +++
|
|
block/partitions/core.c | 3 +++
|
|
3 files changed, 7 insertions(+)
|
|
|
|
--- a/block/blk.h
|
|
+++ b/block/blk.h
|
|
@@ -574,6 +574,7 @@ void blk_free_ext_minor(unsigned int min
|
|
#define ADDPART_FLAG_NONE 0
|
|
#define ADDPART_FLAG_RAID 1
|
|
#define ADDPART_FLAG_WHOLEDISK 2
|
|
+#define ADDPART_FLAG_READONLY 4
|
|
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/cmdline.c
|
|
+++ b/block/partitions/cmdline.c
|
|
@@ -237,6 +237,9 @@ static int add_part(int slot, struct cmd
|
|
put_partition(state, slot, subpart->from >> 9,
|
|
subpart->size >> 9);
|
|
|
|
+ if (subpart->flags & PF_RDONLY)
|
|
+ state->parts[slot].flags |= ADDPART_FLAG_READONLY;
|
|
+
|
|
info = &state->parts[slot].info;
|
|
|
|
strscpy(info->volname, subpart->name, sizeof(info->volname));
|
|
--- a/block/partitions/core.c
|
|
+++ b/block/partitions/core.c
|
|
@@ -373,6 +373,9 @@ static struct block_device *add_partitio
|
|
goto out_del;
|
|
}
|
|
|
|
+ if (flags & ADDPART_FLAG_READONLY)
|
|
+ bdev_set_flag(bdev, BD_READ_ONLY);
|
|
+
|
|
/* everything is up and running, commence */
|
|
err = xa_insert(&disk->part_tbl, partno, bdev, GFP_KERNEL);
|
|
if (err)
|