All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Williams <dan.j.williams@intel.com>
To: Bart Van Assche <bart.vanassche@sandisk.com>
Cc: linux-block@vger.kernel.org, Ulf Hansson <ulf.hansson@linaro.org>,
	"linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Jens Axboe <axboe@fb.com>, Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH v4 2/5] mmc: move 'parent' tracking to mmc_blk_data
Date: Wed, 22 Jun 2016 10:03:11 -0700	[thread overview]
Message-ID: <CAPcyv4gxTj7zC+i2Wn3GHF-twpkVMJSwJ=A7wWuHLRNwjUGLUg@mail.gmail.com> (raw)
In-Reply-To: <87fd92ea-5b21-1590-9842-1d33669e6da7@sandisk.com>

On Tue, Jun 21, 2016 at 11:38 PM, Bart Van Assche
<bart.vanassche@sandisk.com> wrote:
> On 06/21/2016 10:46 PM, Dan Williams wrote:
>>
>> In preparation for the removal of 'driverfs_dev' from 'struct gendisk',
>> carry this data in mmc_blk_data. It is used for registration of parent
>> disks and partitions.
>>
>> Cc: Ulf Hansson <ulf.hansson@linaro.org>
>> Reported-by: Bart Van Assche <bart.vanassche@sandisk.com>
>> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
>> ---
>>  drivers/mmc/card/block.c |    5 +++--
>>  1 file changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
>> index 383184743f9a..d1733424bf6e 100644
>> --- a/drivers/mmc/card/block.c
>> +++ b/drivers/mmc/card/block.c
>> @@ -93,6 +93,7 @@ static DEFINE_SPINLOCK(mmc_blk_lock);
>>   */
>>  struct mmc_blk_data {
>>         spinlock_t      lock;
>> +       struct device   *parent;
>>         struct gendisk  *disk;
>>         struct mmc_queue queue;
>>         struct list_head part;
>> @@ -2270,7 +2271,7 @@ again:
>>         md->disk->fops = &mmc_bdops;
>>         md->disk->private_data = md;
>>         md->disk->queue = md->queue.queue;
>> -       md->disk->driverfs_dev = parent;
>> +       md->parent = parent;
>>         set_disk_ro(md->disk, md->read_only || default_ro);
>>         md->disk->flags = GENHD_FL_EXT_DEVT;
>>         if (area_type & (MMC_BLK_DATA_AREA_RPMB | MMC_BLK_DATA_AREA_BOOT))
>> @@ -2458,7 +2459,7 @@ static int mmc_add_disk(struct mmc_blk_data *md)
>>         int ret;
>>         struct mmc_card *card = md->queue.card;
>>
>> -       add_disk(md->disk);
>> +       device_add_disk(md->parent, md->disk);
>>         md->force_ro.show = force_ro_show;
>>         md->force_ro.store = force_ro_store;
>>         sysfs_attr_init(&md->force_ro.attr);
>
>
> What will the impact be of this patch on code that accesses driverfs_dev
> like printk_all_partitions()? Will this patch hurt bisectability?

Hmm, yes there will be a point in the history where
printk_all_partitions() will print " (driver?)" for mmc devices
instead of " driver: %s".  I would not classify that as breaking
bisection, but it's easy enough to fix up in v5.
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

WARNING: multiple messages have this Message-ID (diff)
From: Dan Williams <dan.j.williams@intel.com>
To: Bart Van Assche <bart.vanassche@sandisk.com>
Cc: Jens Axboe <axboe@fb.com>, Ulf Hansson <ulf.hansson@linaro.org>,
	"linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	linux-block@vger.kernel.org, Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH v4 2/5] mmc: move 'parent' tracking to mmc_blk_data
Date: Wed, 22 Jun 2016 10:03:11 -0700	[thread overview]
Message-ID: <CAPcyv4gxTj7zC+i2Wn3GHF-twpkVMJSwJ=A7wWuHLRNwjUGLUg@mail.gmail.com> (raw)
In-Reply-To: <87fd92ea-5b21-1590-9842-1d33669e6da7@sandisk.com>

On Tue, Jun 21, 2016 at 11:38 PM, Bart Van Assche
<bart.vanassche@sandisk.com> wrote:
> On 06/21/2016 10:46 PM, Dan Williams wrote:
>>
>> In preparation for the removal of 'driverfs_dev' from 'struct gendisk',
>> carry this data in mmc_blk_data. It is used for registration of parent
>> disks and partitions.
>>
>> Cc: Ulf Hansson <ulf.hansson@linaro.org>
>> Reported-by: Bart Van Assche <bart.vanassche@sandisk.com>
>> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
>> ---
>>  drivers/mmc/card/block.c |    5 +++--
>>  1 file changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
>> index 383184743f9a..d1733424bf6e 100644
>> --- a/drivers/mmc/card/block.c
>> +++ b/drivers/mmc/card/block.c
>> @@ -93,6 +93,7 @@ static DEFINE_SPINLOCK(mmc_blk_lock);
>>   */
>>  struct mmc_blk_data {
>>         spinlock_t      lock;
>> +       struct device   *parent;
>>         struct gendisk  *disk;
>>         struct mmc_queue queue;
>>         struct list_head part;
>> @@ -2270,7 +2271,7 @@ again:
>>         md->disk->fops = &mmc_bdops;
>>         md->disk->private_data = md;
>>         md->disk->queue = md->queue.queue;
>> -       md->disk->driverfs_dev = parent;
>> +       md->parent = parent;
>>         set_disk_ro(md->disk, md->read_only || default_ro);
>>         md->disk->flags = GENHD_FL_EXT_DEVT;
>>         if (area_type & (MMC_BLK_DATA_AREA_RPMB | MMC_BLK_DATA_AREA_BOOT))
>> @@ -2458,7 +2459,7 @@ static int mmc_add_disk(struct mmc_blk_data *md)
>>         int ret;
>>         struct mmc_card *card = md->queue.card;
>>
>> -       add_disk(md->disk);
>> +       device_add_disk(md->parent, md->disk);
>>         md->force_ro.show = force_ro_show;
>>         md->force_ro.store = force_ro_store;
>>         sysfs_attr_init(&md->force_ro.attr);
>
>
> What will the impact be of this patch on code that accesses driverfs_dev
> like printk_all_partitions()? Will this patch hurt bisectability?

Hmm, yes there will be a point in the history where
printk_all_partitions() will print " (driver?)" for mmc devices
instead of " driver: %s".  I would not classify that as breaking
bisection, but it's easy enough to fix up in v5.

WARNING: multiple messages have this Message-ID (diff)
From: Dan Williams <dan.j.williams@intel.com>
To: Bart Van Assche <bart.vanassche@sandisk.com>
Cc: Jens Axboe <axboe@fb.com>, Ulf Hansson <ulf.hansson@linaro.org>,
	"linux-nvdimm@lists.01.org" <linux-nvdimm@ml01.01.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	linux-block@vger.kernel.org, Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH v4 2/5] mmc: move 'parent' tracking to mmc_blk_data
Date: Wed, 22 Jun 2016 10:03:11 -0700	[thread overview]
Message-ID: <CAPcyv4gxTj7zC+i2Wn3GHF-twpkVMJSwJ=A7wWuHLRNwjUGLUg@mail.gmail.com> (raw)
In-Reply-To: <87fd92ea-5b21-1590-9842-1d33669e6da7@sandisk.com>

On Tue, Jun 21, 2016 at 11:38 PM, Bart Van Assche
<bart.vanassche@sandisk.com> wrote:
> On 06/21/2016 10:46 PM, Dan Williams wrote:
>>
>> In preparation for the removal of 'driverfs_dev' from 'struct gendisk',
>> carry this data in mmc_blk_data. It is used for registration of parent
>> disks and partitions.
>>
>> Cc: Ulf Hansson <ulf.hansson@linaro.org>
>> Reported-by: Bart Van Assche <bart.vanassche@sandisk.com>
>> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
>> ---
>>  drivers/mmc/card/block.c |    5 +++--
>>  1 file changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
>> index 383184743f9a..d1733424bf6e 100644
>> --- a/drivers/mmc/card/block.c
>> +++ b/drivers/mmc/card/block.c
>> @@ -93,6 +93,7 @@ static DEFINE_SPINLOCK(mmc_blk_lock);
>>   */
>>  struct mmc_blk_data {
>>         spinlock_t      lock;
>> +       struct device   *parent;
>>         struct gendisk  *disk;
>>         struct mmc_queue queue;
>>         struct list_head part;
>> @@ -2270,7 +2271,7 @@ again:
>>         md->disk->fops = &mmc_bdops;
>>         md->disk->private_data = md;
>>         md->disk->queue = md->queue.queue;
>> -       md->disk->driverfs_dev = parent;
>> +       md->parent = parent;
>>         set_disk_ro(md->disk, md->read_only || default_ro);
>>         md->disk->flags = GENHD_FL_EXT_DEVT;
>>         if (area_type & (MMC_BLK_DATA_AREA_RPMB | MMC_BLK_DATA_AREA_BOOT))
>> @@ -2458,7 +2459,7 @@ static int mmc_add_disk(struct mmc_blk_data *md)
>>         int ret;
>>         struct mmc_card *card = md->queue.card;
>>
>> -       add_disk(md->disk);
>> +       device_add_disk(md->parent, md->disk);
>>         md->force_ro.show = force_ro_show;
>>         md->force_ro.store = force_ro_store;
>>         sysfs_attr_init(&md->force_ro.attr);
>
>
> What will the impact be of this patch on code that accesses driverfs_dev
> like printk_all_partitions()? Will this patch hurt bisectability?

Hmm, yes there will be a point in the history where
printk_all_partitions() will print " (driver?)" for mmc devices
instead of " driver: %s".  I would not classify that as breaking
bisection, but it's easy enough to fix up in v5.

  reply	other threads:[~2016-06-22 17:03 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-21 20:46 [PATCH v4 0/5] Introduce device_add_disk() to kill gendisk.driverfs_dev Dan Williams
2016-06-21 20:46 ` Dan Williams
2016-06-21 20:46 ` [PATCH v4 1/5] block: introduce device_add_disk() Dan Williams
2016-06-21 20:46   ` Dan Williams
2016-06-21 20:46   ` Dan Williams
2016-06-21 20:46 ` [PATCH v4 2/5] mmc: move 'parent' tracking to mmc_blk_data Dan Williams
2016-06-21 20:46   ` Dan Williams
2016-06-21 20:46   ` Dan Williams
2016-06-22  6:38   ` Bart Van Assche
2016-06-22  6:38     ` Bart Van Assche
2016-06-22  6:38     ` Bart Van Assche
2016-06-22 17:03     ` Dan Williams [this message]
2016-06-22 17:03       ` Dan Williams
2016-06-22 17:03       ` Dan Williams
2016-06-21 20:46 ` [PATCH v4 3/5] um: track 'parent' device in a local variable Dan Williams
2016-06-21 20:46   ` Dan Williams
2016-06-21 20:46   ` Dan Williams
2016-06-22  6:20   ` Bart Van Assche
2016-06-22  6:20     ` Bart Van Assche
2016-06-22  6:20     ` Bart Van Assche
2016-06-22 14:32     ` Dan Williams
2016-06-22 14:32       ` Dan Williams
2016-06-22 14:32       ` Dan Williams
2016-06-21 20:46 ` [PATCH v4 4/5] block: convert to device_add_disk() Dan Williams
2016-06-21 20:46   ` Dan Williams
2016-06-21 20:46   ` Dan Williams
2016-06-21 20:46 ` [PATCH v4 5/5] block: remove ->driverfs_dev Dan Williams
2016-06-21 20:46   ` Dan Williams
2016-06-21 20:46   ` Dan Williams

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='CAPcyv4gxTj7zC+i2Wn3GHF-twpkVMJSwJ=A7wWuHLRNwjUGLUg@mail.gmail.com' \
    --to=dan.j.williams@intel.com \
    --cc=axboe@fb.com \
    --cc=bart.vanassche@sandisk.com \
    --cc=hch@lst.de \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvdimm@lists.01.org \
    --cc=ulf.hansson@linaro.org \
    /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.