public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@free-electrons.com>
To: Daniel Golle <daniel@makrotopia.org>
Cc: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>,
	openwrt-devel@lists.openwrt.org,
	Richard Weinberger <richard@nod.at>,
	lede-dev@lists.infradead.org,
	"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
	Zoltan HERPAI <wigyori@uid0.hu>,
	Hauke Mehrtens <hauke@hauke-m.de>,
	Ralph Sennhauser <ralph.sennhauser@gmail.com>,
	Brian Norris <computersforpeace@gmail.com>
Subject: Re: [PATCH/RFC 0/3] UBI: unify mouting rootfs based on cmdline parameter
Date: Sun, 28 Aug 2016 17:00:54 +0200	[thread overview]
Message-ID: <20160828170054.230dd406@bbrezillon> (raw)
In-Reply-To: <20160828144013.GF1623@makrotopia.org>

On Sun, 28 Aug 2016 16:40:14 +0200
Daniel Golle <daniel@makrotopia.org> wrote:

> On Sun, Aug 28, 2016 at 11:25:54AM -0300, Ezequiel Garcia wrote:
> > On 28 August 2016 at 11:20, Boris Brezillon
> > <boris.brezillon@free-electrons.com> wrote:  
> > > On Sun, 28 Aug 2016 11:12:50 -0300
> > > Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> wrote:
> > >  
> > >> Daniel,
> > >>
> > >> Let's try to tackle this from a different angle.
> > >>
> > >> On 27 August 2016 at 16:43, Daniel Golle <daniel@makrotopia.org> wrote:  
> > >> > Hi!
> > >> >
> > >> > In an attempts to fix the flaws of the current set of UBI-related
> > >> > patches we are carrying in OpenWrt, I re-wrote the way mounting the
> > >> > rootfs from UBI in OpenWrt/LEDE works. The main requirement I face
> > >> > which cannot be easily addressed using other means which are already
> > >> > available in the kernel is the fact that UBIFS and squashfs-on-UBI
> > >> > require different parameters to be set on the cmdline, e.g.
> > >> > for UBIFS: ubi.mtd=ubi root=ubi0:rootfs rootfstype=ubifs
> > >> > for squashfs: ubi.mtd=ubi ubiblock=0,1 root=/dev/ubiblock0_1 rootfstype=squashfs
> > >> >  
> > >>
> > >> Can you help me understand the problem you are solving here?
> > >>
> > >> So you currently need to do:
> > >>
> > >> * for UBIFS: ubi.mtd=ubi root=ubi0:rootfs rootfstype=ubifs
> > >> * for squashfs: ubi.mtd=ubi ubi.block=0,1 root=/dev/ubiblock0_1
> > >> rootfstype=squashfs
> > >>
> > >> [..]  
> > >> >
> > >> > With those changes, a single set of cmdline parameters is
> > >> > sufficient to mount either UBIFS or any other block filesystem
> > >> > by creating a ubiblock device:
> > >> > ubi.mtd=ubi root=ubi0:rootfs rootfstype=ubifs,squashfs
> > >> >  
> > >>
> > >> And you would like to do:
> > >>
> > >> * for UBIFS: ubi.mtd=ubi root=ubi0:rootfs rootfstype=ubifs
> > >> * for squashfs: ubi.mtd=ubi root=/dev/ubiblock0_1 rootfstype=squashfs  
> > >
> > > I think Daniel wants something like:
> > >
> > > ubi.mtd=1 root=ubi0:rootfs
> > >
> > > or
> > >
> > > ubi.mtd=1 root=/dev/ubiblock0_1
> > >
> > > to work for both the UBIFS and squashfs cases.
> > >  
> > 
> > Right. In which case, I was going to propose the same thing
> > you just did! It would be simple, and uninvasive to introduce
> > something like the parameter you suggested
> > "ubi.block=attach_all_ro_vols".  
> 
> That in addition with the patch referred to in an earlier mail
> http://code.bulix.org/fkxrgt-105392
> would indeed solve the problem, with the limitation that one needs to
> use the {ubi_num}_{vol_id} syntax instead of being able to refer to
> the volume name.

Let me clarify my previous answer: I'm still strongly opposed to this
approach (including my less invasive patch). I was just trying to show
that your implementation was invasive and could be made less invasive,
but it remains a hack, which, unless proven otherwise, is not needed.

> Currently, we do use 'dynamic' (ie. read-write) volumes even for
> squashfs, as otherwise boot takes much longer as the CRC for the
> whole volumes needs to be calculated. Having *any* 'static' volumes
> also breaks some older versions of U-Boot already supporting UBI.
> I'd rather say "attach_all_non_ubifs_vols" and probe the filesystem
> type, though that's also not very clean.
> Also, one might not want to attach *all* volumes, ie. for a ubootenv
> volume, there should not be a ubiblock.
> Re-using the volume-name parser from UBIFS to also create the ubiblock
> device needed to mount the rootfs seemed to be the most transparent
> approach to me.

So each time you're asking more. AFAIK, JFFS2 was only supporting
the /dev/mtdblockX format, without any way to use MTD names. But now you
want an improved version that is able to use the UBI format, which is
not at all suitable for block-device probing.

To be very clear, on my side this is a NACK.

Regards,

Boris

  reply	other threads:[~2016-08-28 15:00 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-27 19:43 [PATCH/RFC 0/3] UBI: unify mouting rootfs based on cmdline parameter Daniel Golle
2016-08-27 20:43 ` Richard Weinberger
2016-08-27 21:06   ` Daniel Golle
2016-08-27 21:23     ` Richard Weinberger
2016-08-27 23:13       ` Daniel Golle
2016-08-27 23:33         ` Richard Weinberger
2016-08-28  6:47           ` Boris Brezillon
2016-08-28  7:10   ` Ralph Sennhauser
2016-08-28  8:12     ` Richard Weinberger
2016-08-28  9:19       ` Ralph Sennhauser
2016-08-28  9:28         ` Richard Weinberger
2016-08-28 11:44           ` Daniel Golle
2016-08-28 11:57             ` Richard Weinberger
2016-08-28 13:47               ` Daniel Golle
2016-08-28 14:17                 ` Boris Brezillon
2016-08-28 12:10             ` Ralph Sennhauser
2016-08-28 13:24             ` Boris Brezillon
2016-08-28 14:12 ` Ezequiel Garcia
2016-08-28 14:20   ` Boris Brezillon
2016-08-28 14:25     ` Ezequiel Garcia
2016-08-28 14:40       ` Daniel Golle
2016-08-28 15:00         ` Boris Brezillon [this message]
2016-08-28 15:24           ` Daniel Golle
2016-08-28 16:35             ` Boris Brezillon
2016-08-28 14:32     ` Daniel Golle
2016-08-28 14:27   ` Daniel Golle
2016-08-28 14:54     ` Ezequiel Garcia

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160828170054.230dd406@bbrezillon \
    --to=boris.brezillon@free-electrons.com \
    --cc=computersforpeace@gmail.com \
    --cc=daniel@makrotopia.org \
    --cc=ezequiel@vanguardiasur.com.ar \
    --cc=hauke@hauke-m.de \
    --cc=lede-dev@lists.infradead.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=openwrt-devel@lists.openwrt.org \
    --cc=ralph.sennhauser@gmail.com \
    --cc=richard@nod.at \
    --cc=wigyori@uid0.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox