kernel: support FIT partition parser on mtdblock devices
authorDaniel Golle <daniel@makrotopia.org>
Fri, 2 Apr 2021 23:41:30 +0000 (00:41 +0100)
committerDaniel Golle <daniel@makrotopia.org>
Fri, 9 Apr 2021 15:04:35 +0000 (16:04 +0100)
commit2809d0000744b77d5b6cef20f6d44eed75c35e6a
treebfc220a6c41f870b357ebd4f8f789a92c3b6c1fd
parentce14445b748db8fbc57bc3e619c69d3989ef3efc
kernel: support FIT partition parser on mtdblock devices

Allow using the FIT block-device partition partition parser to work on
top of mtdblock devices.
This is more tricky than it sounds as it requires to reorganize the
procedure of registering mtdblock devices in order to avoid locking
troubles caused by the block partition parsers then trying to open
the mtdblock device for reading while locks are still being held.
Fix that by moving the adding of the disks after the entire device
has been probed when locks no longer need to be held.
Also address issue with mtdsuper surfaced when using sub-partitions
which prevented mounting JFFS2 using the /dev/mtdblock* device.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
target/linux/generic/files/block/partitions/fit.c
target/linux/generic/hack-5.10/400-block-fit-partition-parser.patch [deleted file]
target/linux/generic/hack-5.10/401-mtd-super-don-t-reply-on-mtdblock-device-minor.patch [new file with mode: 0644]
target/linux/generic/hack-5.10/402-mtd-blktrans-call-add-disks-after-mtd-device.patch [new file with mode: 0644]
target/linux/generic/hack-5.10/410-block-fit-partition-parser.patch [new file with mode: 0644]