From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
Tudor Ambarus <Tudor.Ambarus@microchip.com>,
<linux-mtd@lists.infradead.org>
Cc: Boris Brezillon <boris.brezillon@collabora.com>
Subject: Re: [PATCH v3] mtd: implement proper partition handling
Date: Mon, 9 Mar 2020 15:07:39 +0100 [thread overview]
Message-ID: <20200309150739.6a2e2087@xps13> (raw)
In-Reply-To: <20200114090952.11232-1-miquel.raynal@bootlin.com>
Miquel Raynal <miquel.raynal@bootlin.com> wrote on Tue, 14 Jan 2020
10:09:52 +0100:
> Instead of collecting partitions in a flat list, create a hierarchy
> within the mtd_info structure: use a partitions list to keep track of
> the partitions of an MTD device (which might be itself a partition of
> another MTD device), a pointer to the parent device (NULL when the MTD
> device is the root one, not a partition).
>
> By also saving directly in mtd_info the offset of the partition, we
> can get rid of the mtd_part structure.
>
> While at it, be consistent in the naming of the mtd_info structures to
> ease the understanding of the new hierarchy: these structures are
> usually called 'mtd', unless there are multiple instances of the same
> structure. In this case, there is usually a parent/child bound so we
> will call them 'parent' and 'child'.
>
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> ---
Applied to mtd/next.
>
> Change in v3:
> * Keep the naming for the ->parent field but add more details in the
> mtd_master structure kernel documentation and the ->parent field of
> struct mtd_info that this parenting is from an MTD partition point
> of view, not from the device model perspective.
>
> Changes in v2:
> * Commit name changed "proper partition handling" -> "rework partition
> tree".
> * Update mtd_get_device_size() to support recursive partitioning.
> * Remove part_*() helpers, update the corresponding mtd_*() helpers to
> handle the partitions themselves.
> * Drop the global partitions lock, add a lock per mtd_info but only use
> the root one to protect against partitions updates.
>
> drivers/mtd/mtdchar.c | 12 +-
> drivers/mtd/mtdcore.c | 250 ++++++++----
> drivers/mtd/mtdpart.c | 697 +++++++++------------------------
> include/linux/mtd/mtd.h | 125 +++++-
> include/linux/mtd/partitions.h | 1 -
> 5 files changed, 479 insertions(+), 606 deletions(-)
Thanks,
Miquèl
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
prev parent reply other threads:[~2020-03-09 14:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-14 9:09 [PATCH v3] mtd: implement proper partition handling Miquel Raynal
2020-03-09 14:07 ` Miquel Raynal [this message]
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=20200309150739.6a2e2087@xps13 \
--to=miquel.raynal@bootlin.com \
--cc=Tudor.Ambarus@microchip.com \
--cc=boris.brezillon@collabora.com \
--cc=linux-mtd@lists.infradead.org \
--cc=richard@nod.at \
--cc=vigneshr@ti.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).