From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Michal Suchanek <hramrach@gmail.com>
Cc: "Brian Norris" <computersforpeace@gmail.com>,
"Boris Brezillon" <boris.brezillon@free-electrons.com>,
"Arnd Bergmann" <arnd@arndb.de>,
"Geert Uytterhoeven" <geert+renesas@glider.be>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
devicetree-spec@vger.kernel.org,
"Simon Arlott" <simon@fire.lp0.eu>,
"Linus Walleij" <linus.walleij@linaro.org>,
"Rafał Miłecki" <zajec5@gmail.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Jason Gunthorpe" <jgunthorpe@obsidianresearch.com>,
"David Hendricks" <dhendrix@chromium.org>,
"Jonas Gorski" <jogo@openwrt.org>,
"Rob Herring" <robh+dt@kernel.org>,
"MTD Maling List" <linux-mtd@lists.infradead.org>,
"Hauke Mehrtens" <hauke@hauke-m.de>
Subject: Re: [RFC PATCH 0/7] mtd: partitions: add of_match_table support
Date: Fri, 11 Dec 2015 17:00:28 +0100 [thread overview]
Message-ID: <CAMuHMdV2feXKWkJzRkMUBiAUCxp4LwaRgg+aPYwm0sUnKzm0Rg@mail.gmail.com> (raw)
In-Reply-To: <CAOMqctQVMCEa_k4xMW1qooEpe8X1-NhUOjD6pp0qJpDP_H+8hw@mail.gmail.com>
Hi Michal,
On Fri, Dec 11, 2015 at 4:34 PM, Michal Suchanek <hramrach@gmail.com> wrote:
> On 11 December 2015 at 09:44, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>> On Thu, Dec 10, 2015 at 9:54 PM, Brian Norris
>> <computersforpeace@gmail.com> wrote:
>>> On Sat, Dec 05, 2015 at 11:15:54AM +0100, Geert Uytterhoeven wrote:
>>>> On Sat, Dec 5, 2015 at 6:19 AM, Brian Norris
>>>> <computersforpeace@gmail.com> wrote:
>>>> > There have been several discussions [1] about adding a device tree binding for
>>>> > associating flash devices with the partition parser(s) that are used on the
>>>> > flash. There are a few reasons:
>>>> >
>>>> > (1) drivers shouldn't have to be encoding platform knowledge by listing what
>>>> > parsers might be used on a given system (this is the currently all that's
>>>> > supported)
>>>> > (2) we can't just scan for all supported parsers (like the block system does), since
>>>> > there is a wide diversity of "formats" (no standardization), and it is not
>>>> > always safe or efficient to attempt to do so, particularly since many of
>>>> > them allow their data structures to be placed anywhere on the flash, and
>>>> > so require scanning the entire flash device to find them.
>>>>
>>>> I read the second reason, but would it be useful to (partially) merge
>>>> block/partitions/ and drivers/mtd/partitions/, so I can use e.g. msdos
>>>> partitions
>>>> on an mtd device??
>>>
>>> I kinda agree with Michal: is there a good use case?
>>
>> I don't have an immediate use case.
>> Just looking at it from a high-level viewpoint.
>>
>>> Really, MTD partitioning is not a highly-scalable design. Particularly,
>>> it's not typically that well-suited to large (read: unreliable) NAND
>>> flash, where fixing partitions at the raw flash level mostly serves to
>>> restrict UBI's ability to wear-level across the device. For that sort of
>>> case, it's best if people are using UBI volumes on a (mostly?)
>>> unpartitioned MTD, instead of using MTD partitions as the main
>>> separation mechanism. Also, most partition designs (either MTD or block)
>>> aren't very robust against bitflips, read disturb, etc.
>>>
>>> IOW, I wouldn't expect MBR or GPT to work well on large raw NAND flash,
>>> and so I don't plan to do that sort of work myself. If you can provide
>>> some better argument for it, and some nice maintainable code to go with
>>> it, then of course it could be considered :)
>>
>> There's also NOR FLASH (e.g. SPI-NOR), which is what most boards I'm
>> working on have.
>>
>
> Yes, you can dump the content of a NOR flash to a file, attach a loop
> device to it, and if block devices had the ability to use flash
> partitioning access the different partitions.
>
> Maybe it would be more useful to use some kind of mtdloop, though.
> There might even be one already. I never needed it.
That's the inverse, which looks like a solid use case to me ;-)
E.g. for investigation or virtualization.
You can do this already in userspace with kpartx, though.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
next prev parent reply other threads:[~2015-12-11 16:00 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-05 5:19 [RFC PATCH 0/7] mtd: partitions: add of_match_table support Brian Norris
2015-12-05 5:19 ` [RFC PATCH 1/7] mtd: move partition parsers to drivers/mtd/partitions/ Brian Norris
2015-12-05 5:19 ` [RFC PATCH 2/7] mtd: move partition parsers' Kconfig under a sub-menu Brian Norris
2015-12-05 5:19 ` [RFC PATCH 3/7] doc: dt: mtd: partition: add on-flash format binding Brian Norris
2015-12-05 11:39 ` Jonas Gorski
2015-12-05 21:33 ` Michal Suchanek
2015-12-07 1:36 ` David Gibson
2015-12-10 20:43 ` Brian Norris
2015-12-11 15:58 ` Michal Suchanek
2015-12-12 5:51 ` David Gibson
2015-12-14 10:22 ` Geert Uytterhoeven
2015-12-14 12:28 ` Michal Suchanek
2015-12-15 6:00 ` David Gibson
2015-12-15 10:03 ` Geert Uytterhoeven
2015-12-17 1:05 ` David Gibson
2015-12-07 3:07 ` Rob Herring
2015-12-05 5:19 ` [RFC PATCH 4/7] mtd: add of_match_mtd_parser() and of_mtd_match_mtd_parser() helpers Brian Norris
2015-12-07 2:45 ` Rob Herring
2015-12-07 18:13 ` Brian Norris
2015-12-07 19:00 ` Rob Herring
2015-12-05 5:19 ` [RFC PATCH 5/7] mtd: partitions: factor out "match by name" handling Brian Norris
2015-12-05 5:19 ` [RFC PATCH 6/7] RFC: mtd: partitions: enable of_match_table matching Brian Norris
2015-12-05 5:19 ` [RFC PATCH 7/7] mtd: partitions: add Google's FMAP partition parser Brian Norris
2015-12-05 10:15 ` [RFC PATCH 0/7] mtd: partitions: add of_match_table support Geert Uytterhoeven
2015-12-05 18:06 ` Michal Suchanek
2015-12-10 20:54 ` Brian Norris
2015-12-11 8:44 ` Geert Uytterhoeven
2015-12-11 15:34 ` Michal Suchanek
2015-12-11 16:00 ` Geert Uytterhoeven [this message]
2015-12-11 16:18 ` Michal Suchanek
2015-12-12 1:33 ` Brian Norris
2015-12-14 10:15 ` Geert Uytterhoeven
2015-12-05 11:35 ` Jonas Gorski
2015-12-10 21:06 ` Brian Norris
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=CAMuHMdV2feXKWkJzRkMUBiAUCxp4LwaRgg+aPYwm0sUnKzm0Rg@mail.gmail.com \
--to=geert@linux-m68k.org \
--cc=arnd@arndb.de \
--cc=boris.brezillon@free-electrons.com \
--cc=computersforpeace@gmail.com \
--cc=devicetree-spec@vger.kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dhendrix@chromium.org \
--cc=geert+renesas@glider.be \
--cc=hauke@hauke-m.de \
--cc=hramrach@gmail.com \
--cc=jgunthorpe@obsidianresearch.com \
--cc=jogo@openwrt.org \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=robh+dt@kernel.org \
--cc=simon@fire.lp0.eu \
--cc=zajec5@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).