From: Richard Weinberger <richard@nod.at>
To: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Boris Brezillon <boris.brezillon@collabora.com>,
linux-mtd <linux-mtd@lists.infradead.org>,
Vignesh Raghavendra <vigneshr@ti.com>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
Tudor Ambarus <Tudor.Ambarus@microchip.com>
Subject: Re: [PATCH v2] mtd: implement proper partition handling
Date: Thu, 9 Jan 2020 00:34:18 +0100 (CET) [thread overview]
Message-ID: <1651325521.16954.1578526458487.JavaMail.zimbra@nod.at> (raw)
In-Reply-To: <20191230111948.27005-1-miquel.raynal@bootlin.com>
----- Ursprüngliche Mail -----
> Von: "Miquel Raynal" <miquel.raynal@bootlin.com>
> An: "richard" <richard@nod.at>, "Vignesh Raghavendra" <vigneshr@ti.com>, "Tudor Ambarus" <Tudor.Ambarus@microchip.com>,
> "linux-mtd" <linux-mtd@lists.infradead.org>
> CC: "Boris Brezillon" <boris.brezillon@collabora.com>, "Thomas Petazzoni" <thomas.petazzoni@bootlin.com>, "Miquel
> Raynal" <miquel.raynal@bootlin.com>
> Gesendet: Montag, 30. Dezember 2019 12:19:48
> Betreff: [PATCH v2] mtd: implement proper partition handling
> 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).
What problem does this solve?
...beside of a nice diffstat which removes more than it adds. :-)
> 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>
[...]
> +static inline struct mtd_info *mtd_get_master(struct mtd_info *mtd)
> +{
> + while (mtd->parent)
> + mtd = mtd->parent;
> +
> + return mtd;
> +}
So, parent == master?
When I create a MTD ontop of UBI using gluebi, who will be parent/master?
Thanks,
//richard
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2020-01-08 23:34 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-30 11:19 [PATCH v2] mtd: implement proper partition handling Miquel Raynal
2020-01-08 23:34 ` Richard Weinberger [this message]
2020-01-09 18:13 ` Miquel Raynal
2020-01-09 18:43 ` Richard Weinberger
2020-01-09 18:45 ` Miquel Raynal
2020-01-09 19:13 ` Boris Brezillon
2020-01-09 19:23 ` Miquel Raynal
2020-01-09 19:37 ` Boris Brezillon
2020-01-10 8:28 ` Miquel Raynal
2020-01-10 9:46 ` Boris Brezillon
2020-01-10 9:55 ` Miquel Raynal
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=1651325521.16954.1578526458487.JavaMail.zimbra@nod.at \
--to=richard@nod.at \
--cc=Tudor.Ambarus@microchip.com \
--cc=boris.brezillon@collabora.com \
--cc=linux-mtd@lists.infradead.org \
--cc=miquel.raynal@bootlin.com \
--cc=thomas.petazzoni@bootlin.com \
--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