All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lei Wen <adrian.wenl@gmail.com>
To: Colin Cross <ccross@android.com>
Cc: Olof Johansson <olof@lixom.net>,
	Kay Sievers <kay.sievers@vrfy.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
	Mandeep Baines <msb@chromium.org>
Subject: Re: [PATCH] mmc_block: Allow more than 8 partitions per card
Date: Thu, 9 Sep 2010 10:49:40 +0800	[thread overview]
Message-ID: <AANLkTi=qyKCYuZ4esATV1ArBb_GrpqRW7bwdJnZnonVe@mail.gmail.com> (raw)
In-Reply-To: <1283964637-28246-1-git-send-email-ccross@android.com>

On Thu, Sep 9, 2010 at 12:50 AM, Colin Cross <ccross@android.com> wrote:
> Set the GENHD_FL_EXT_DEVT flag, which will allocate minor numbers
> in major 259 for partitions past disk->minors.
>
> Also remove the use of disk_devt to determine devidx from md->disk.
> md->disk->first_minor is always initialized from devidx and can
> always be used to recover it.
>
> Signed-off-by: Colin Cross <ccross@android.com>
> ---
>  drivers/mmc/card/block.c |    7 ++-----
>  1 files changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
> index d545f79..07d8eb0 100644
> --- a/drivers/mmc/card/block.c
> +++ b/drivers/mmc/card/block.c
> @@ -87,11 +87,7 @@ static void mmc_blk_put(struct mmc_blk_data *md)
>        mutex_lock(&open_lock);
>        md->usage--;
>        if (md->usage == 0) {
> -               int devmaj = MAJOR(disk_devt(md->disk));
> -               int devidx = MINOR(disk_devt(md->disk)) >> MMC_SHIFT;
> -
> -               if (!devmaj)
> -                       devidx = md->disk->first_minor >> MMC_SHIFT;
> +               int devidx = md->disk->first_minor >> MMC_SHIFT;
>
>                blk_cleanup_queue(md->queue.queue);
>
> @@ -607,6 +603,7 @@ static struct mmc_blk_data *mmc_blk_alloc(struct mmc_card *card)
>        md->disk->private_data = md;
>        md->disk->queue = md->queue.queue;
>        md->disk->driverfs_dev = &card->dev;
> +       md->disk->flags = GENHD_FL_EXT_DEVT;
>
>        /*
>         * As discussed on lkml, GENHD_FL_REMOVABLE should:
> --
> 1.7.1
>

Looks good to me.
Acked-by: Lei Wen <leiwen@marvell.com>

  reply	other threads:[~2010-09-09  2:49 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-18  4:13 [PATCH] mmc: make number of mmcblk minors configurable Olof Johansson
2010-08-19  0:16 ` Andrew Morton
2010-08-19  3:22   ` Olof Johansson
2010-08-20  1:02     ` [PATCH v2] mmc: add config and runtime option for number of mmcblk minors Olof Johansson
2010-08-20 22:13       ` [PATCH v3] " Olof Johansson
2010-08-20 22:18         ` sys_init_module system call runcoderen
2010-08-20 22:32           ` Randy Dunlap
2010-08-20 22:50             ` runcoderen
2010-09-08 14:25         ` [PATCH v3] mmc: add config and runtime option for number of mmcblk minors Lei Wen
2010-09-08 14:57           ` Olof Johansson
2010-09-08 15:19             ` Kay Sievers
2010-09-08 15:57               ` Olof Johansson
2010-09-08 16:48                 ` Colin Cross
2010-09-08 16:50                   ` [PATCH] mmc_block: Allow more than 8 partitions per card Colin Cross
2010-09-09  2:49                     ` Lei Wen [this message]
2010-09-09  7:54                     ` Adrian Hunter

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='AANLkTi=qyKCYuZ4esATV1ArBb_GrpqRW7bwdJnZnonVe@mail.gmail.com' \
    --to=adrian.wenl@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=ccross@android.com \
    --cc=kay.sievers@vrfy.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=msb@chromium.org \
    --cc=olof@lixom.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.