From: Adrian Hunter <adrian.hunter@intel.com>
To: Andrei Warkentin <awarkentin@vmware.com>
Cc: Namjae Jeon <linkinjeon@gmail.com>,
linux-kernel@vger.kernel.org,
linus walleij <linus.walleij@linaro.org>,
james p freyensee <james_p_freyensee@linux.intel.com>,
sebras@gmail.com, Ulf Hansson <Ulf.Hansson@stericsson.com>,
stefan xk nilsson <stefan.xk.nilsson@stericsson.com>,
per forlin <per.forlin@stericsson.com>,
johan rudholm <johan.rudholm@stericsson.com>,
cjb@laptop.org, linux-mmc@vger.kernel.org
Subject: Re: [PATCH v11] mmc : general purpose partition support.
Date: Thu, 06 Oct 2011 09:31:54 +0300 [thread overview]
Message-ID: <4E8D4B5A.6040106@intel.com> (raw)
In-Reply-To: <1757717892.66886.1317828833207.JavaMail.root@zimbra-prod-mbox-2.vmware.com>
On 05/10/11 18:33, Andrei Warkentin wrote:
> Hi,
>
> ----- Original Message -----
>> From: "Namjae Jeon"<linkinjeon@gmail.com>
>> To: cjb@laptop.org, linux-mmc@vger.kernel.org
>> Cc: linux-kernel@vger.kernel.org, awarkentin@vmware.com, "adrian hunter"<adrian.hunter@intel.com>, "linus walleij"
>> <linus.walleij@linaro.org>, "james p freyensee"<james_p_freyensee@linux.intel.com>, sebras@gmail.com, "Ulf Hansson"
>> <Ulf.Hansson@stericsson.com>, "stefan xk nilsson"<stefan.xk.nilsson@stericsson.com>, "per forlin"
>> <per.forlin@stericsson.com>, "johan rudholm"<johan.rudholm@stericsson.com>, "Namjae Jeon"<linkinjeon@gmail.com>
>> Sent: Wednesday, October 5, 2011 10:45:45 AM
>> Subject: [PATCH v11] mmc : general purpose partition support.
>>
>> It allows gerneral purpose partitions in MMC Device.
>> And I try to simpliy make mmc_blk_alloc_parts using mmc_part
>> structure suggested by Andrei Warkentin.
>> After patching, we can see general purpose partitions like this.
>>> cat /proc/partitions
>> 179 0 847872 mmcblk0
>> 179 192 4096 mmcblk0gp3
>> 179 160 4096 mmcblk0gp2
>> 179 128 4096 mmcblk0gp1
>> 179 96 1052672 mmcblk0gp0
>> 179 64 1024 mmcblk0boot1
>> 179 32 1024 mmcblk0boot0
>>
>> Signed-off-by: Namjae Jeon<linkinjeon@gmail.com>
>> ---
>> drivers/mmc/card/block.c | 41 +++++++++++++++++++++++------------
>> drivers/mmc/core/mmc.c | 52
>> ++++++++++++++++++++++++++++++++++++++++++---
>> include/linux/mmc/card.h | 34 +++++++++++++++++++++++++++++-
>> include/linux/mmc/mmc.h | 5 +++-
>> 4 files changed, 112 insertions(+), 20 deletions(-)
>>
>> diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
>> + for (idx = 0; idx< card->nr_parts; idx++) {
>> + if (mmc_is_boot_partition(&card->part[idx])&&
>> + !mmc_boot_partition_access(card->host))
>> + continue;
>> + if (card->part[idx].size) {
>> + ret = mmc_blk_alloc_part(card, md,
>> + card->part[idx].part_cfg,
>> + card->part[idx].size>> 9,
>> + card->part[idx].force_ro,
>> + card->part[idx].name);
>> + if (ret)
>> + return ret;
>> + }
>> }
>
> Is there any reason for putting the mmc_boot_partition_access() logic here? If
> boot partitions are not allowed by host, then just don't add the mmc_parts to
> the parts array, no? Such minutae should belong in core mmc code, not block driver, IMHO.
I like data structures to model reality i.e. the partitions exist but are not
accessible. However I am not fussed - change it or not.
>
> A
>
prev parent reply other threads:[~2011-10-06 6:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-05 14:45 [PATCH v11] mmc : general purpose partition support Namjae Jeon
2011-10-05 15:33 ` Andrei Warkentin
2011-10-06 0:13 ` NamJae Jeon
2011-10-06 5:14 ` Andrei E. Warkentin
2011-10-06 6:31 ` Adrian Hunter [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=4E8D4B5A.6040106@intel.com \
--to=adrian.hunter@intel.com \
--cc=Ulf.Hansson@stericsson.com \
--cc=awarkentin@vmware.com \
--cc=cjb@laptop.org \
--cc=james_p_freyensee@linux.intel.com \
--cc=johan.rudholm@stericsson.com \
--cc=linkinjeon@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=per.forlin@stericsson.com \
--cc=sebras@gmail.com \
--cc=stefan.xk.nilsson@stericsson.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