RFC mtd: ubi: Enable accessing RO filesystems in UBI vols
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 RFC Latest4 patches 0 repliesNew
- v1 RFC4 patches 3 repliesSuperseded
Changes in v2 from the cover letter
- Rebased onto next post-2023.10's release.
- Fix NULL dereference caused by passing NULL to blk_create_device
- Parse UBI index/volume numbers with dectoul instead of hextoul, to match Linux's behavior of treating these numbers as decimal.
- Do not treat a valid decimal number as a volume name, even if the volume ID doesn't exist, to match Linux's behavior of always treating decimal numbers as volume IDs.
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | mtd: ubi: register UBI attachments as DM devicescmd/ drivers/ drivers/ +2 more | +92 | 0 replies | |
| 2/4 | mtd: ubi: bind block device driver for static volumesdrivers/ | +111 | 0 replies | |
| 3/4 | disk: part: fall-through if "ubi" requested but ubifs not mounteddisk/ | +6 | 0 replies | |
| 4/4 | HACK: enable access to `ubi 0:volname` block devicesdisk/ | +55 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [RFC PATCH v2 0/4] mtd: ubi: Enable accessing RO filesystems in UBI vols
Hi list,
This is the second version of my RFC patchset to treat static UBI volumes as DM block devices, allowing users to access read-only filesystems (SquashFS, EROFS) contained within such volumes.
This is a rebased and updated version, as requested by Heiko.
Previously, we have agreed on a syntax, which my downstream is now starting to use:
=> ls ubi 0:rootfs /boot
=> ls ubi 0:2 /boot
This is still not yet ready for mainline inclusion, because the actual UBI DM access is happening in disk/part.c, which is not "clean" with the way the DM/legacy switching is currently plumbed. I'm still looking for guidance on how to name/implement block functions for looking up a *subvolume* block device by type+parentidx+{name,ID}.
Changes v1->v2:
- Rebased onto next post-2023.10's release.
- Fix NULL dereference caused by passing NULL to blk_create_device
- Parse UBI index/volume numbers with dectoul instead of hextoul, to match Linux's behavior of treating these numbers as decimal.
- Do not treat a valid decimal number as a volume name, even if the volume ID doesn't exist, to match Linux's behavior of always treating decimal numbers as volume IDs.
Cheers,
Sam
Sam Edwards (4):
mtd: ubi: register UBI attachments as DM devices
mtd: ubi: bind block device driver for static volumes
disk: part: fall-through if "ubi" requested but ubifs not mounted
HACK: enable access to ubi 0:volname block devices
cmd/ubi.c | 11 +++ disk/part.c | 69 +++++++++++-- drivers/mtd/ubi/Makefile | 1 + drivers/mtd/ubi/ubi-uclass.c | 185 +++++++++++++++++++++++++++++++++++ include/dm/uclass-id.h | 1 + include/ubi_uboot.h | 5 + 6 files changed, 264 insertions(+), 8 deletions(-) create mode 100644 drivers/mtd/ubi/ubi-uclass.c
Signature · 1 line
2.41.0