All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH v2 0/4] mtd: ubi: Enable accessing RO filesystems in UBI vols
@ 2023-10-05 23:08 Sam Edwards
  2023-10-05 23:08 ` [RFC PATCH v2 1/4] mtd: ubi: register UBI attachments as DM devices Sam Edwards
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Sam Edwards @ 2023-10-05 23:08 UTC (permalink / raw)
  To: Heiko Schocher, Simon Glass; +Cc: Kyungmin Park, u-boot, Sam Edwards

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

-- 
2.41.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-10-05 23:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-05 23:08 [RFC PATCH v2 0/4] mtd: ubi: Enable accessing RO filesystems in UBI vols Sam Edwards
2023-10-05 23:08 ` [RFC PATCH v2 1/4] mtd: ubi: register UBI attachments as DM devices Sam Edwards
2023-10-05 23:08 ` [RFC PATCH v2 2/4] mtd: ubi: bind block device driver for static volumes Sam Edwards
2023-10-05 23:08 ` [RFC PATCH v2 3/4] disk: part: fall-through if "ubi" requested but ubifs not mounted Sam Edwards
2023-10-05 23:08 ` [RFC PATCH v2 4/4] HACK: enable access to `ubi 0:volname` block devices Sam Edwards

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.