Skip to contentSkip to conversation

->driverfs_dev removal for 4.8

GIT PULL Williams, Dan J 2 participants 2 messages Jul 8, 2016 libnvdimm: non-volatile memory device

lore
Share & tools
lore

Williams, Dan J

author Reviewed-by Christoph Hellwig Reviewed-by Johannes Thumshirn Reviewed-by Bart Van Assche Reviewed-by Christoph Hellwig Reviewed-by Johannes Thumshirn Reviewed-by Christoph Hellwig Reviewed-by Johannes Thumshirn
#0 lore raw

Hi Jens, please pull from:

  git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm for-4.8/block

...to receive:

The removal of ->driverfs_dev in favor of just passing the parent device in as a parameter to add_disk().  See below, it has received a "Reviewed-by" from Christoph, Bart, and Johannes.

It is also a pre-requisite for Fam Zheng's work to cleanup gendisk uevents vs attribute visibility [1].  We would extend device_add_disk() to take an attribute_group list.

This is based off a branch of block.git/for-4.8/drivers and has received a positive build success notification from the kbuild robot across several configs.

[1]: "gendisk: Generate uevent after attribute available"
http://marc.info/?l=linux-virtualization&m=146725201522201&w=2

---

The following changes since commit 1b57e66384e2d21150301e68078526fac5680a16:

  drbd: correctly handle failed crypto_alloc_hash (2016-06-13 21:43:08 -0600)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm for-4.8/block

for you to fetch changes up to 52c44d93c26f5a76068c0a8cc83bb8f56f38043d:

  block: remove ->driverfs_dev (2016-06-27 12:26:08 -0700)

----------------------------------------------------------------
Dan Williams (5):
      block: introduce device_add_disk()
      mmc: move 'parent' tracking to mmc_blk_data
      um: track 'parent' device in a local variable
      block: convert to device_add_disk()
      block: remove ->driverfs_dev

 arch/powerpc/sysdev/axonram.c       |  3 +--- arch/um/drivers/ubd_kern.c          |  5 +-+-+--- block/genhd.c                       | 18 +-+-+-+-+-+-+-+-+---------- drivers/block/cciss.c               |  3 +--- drivers/block/floppy.c              |  3 +--- drivers/block/mtip32xx/mtip32xx.c   |  5 +-+---- drivers/block/ps3disk.c             |  3 +--- drivers/block/ps3vram.c             |  3 +--- drivers/block/rsxx/dev.c            |  4 +---- drivers/block/skd_main.c            |  8 +-+-+------ drivers/block/sunvdc.c              |  3 +--- drivers/block/virtio_blk.c          |  3 +--- drivers/block/xen-blkfront.c        |  3 +--- drivers/ide/ide-cd.c                |  3 +--- drivers/ide/ide-gd.c                |  3 +--- drivers/memstick/core/ms_block.c    |  3 +--- drivers/memstick/core/mspro_block.c |  3 +--- drivers/mmc/card/block.c            |  5 +-+-+--- drivers/mtd/mtd_blkdevs.c           |  4 +----

 drivers/nvdimm/blk.c                |  3 +---
 drivers/nvdimm/btt.c                |  3 +---
 drivers/nvdimm/bus.c                |  2 +--

 drivers/nvdimm/pmem.c               |  3 +--- drivers/nvme/host/core.c            |  3 +--- drivers/s390/block/dasd_genhd.c     |  3 +--- drivers/s390/block/dcssblk.c        |  3 +--- drivers/s390/block/scm_blk.c        |  3 +--- drivers/scsi/sd.c                   |  3 +--- drivers/scsi/sr.c                   |  3 +--- include/linux/genhd.h               |  8 +-+-+-+-+-+---

 30 files changed, 50 insertions(+-), 72 deletions(-)

commit e63a46bef01ff3064f44dba145833284fb6adeec
Author: Dan Williams <[email protected]>
Date:   Wed Jun 15 18:17:27 2016 -0700

    block: introduce device_add_disk()

    In preparation for removing the ->driverfs_dev member of a gendisk, add an api that takes the parent device as a parameter to add_disk().  For now this maintains the status quo of WARN()ing on failure, but not return a error code.

commit 307d8e6f248558b184a2513593dbbeb08406a4fa
Author: Dan Williams <[email protected]>
Date:   Mon Jun 20 10:40:44 2016 -0700

    mmc: move 'parent' tracking to mmc_blk_data

    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 <[email protected]>
Cc Bart Van Assche <[email protected]>

commit d72a57835c92f6d51863b0ad6d7d45e3859e24d4
Author: Dan Williams <[email protected]>
Date:   Mon Jun 20 10:44:32 2016 -0700

    um: track 'parent' device in a local variable

    In preparation for the removal of 'driverfs_dev' from 'struct gendisk' use a local variable to track the parented vs un-parented case in ubd_disk_register().

Cc Jeff Dike <[email protected]>
Cc Richard Weinberger <[email protected]>
Cc Bart Van Assche <[email protected]>

commit 0d52c756a665adc032c791307bc55e392b0186b3
Author: Dan Williams <[email protected]>
Date:   Wed Jun 15 19:44:20 2016 -0700

    block: convert to device_add_disk()

    For block drivers that specify a parent device, convert them to use device_add_disk().

    This conversion was done with the following semantic patch:

        @@
        struct gendisk *disk;
        expression E;
        @@

        - disk->driverfs_dev = E;
        ...
        - add_disk(disk);
        + device_add_disk(E, disk);

        @@
        struct gendisk *disk;
        expression E1, E2;
        @@

        - disk->driverfs_dev = E1;
        ...
        E2 = disk;
        ...
        - add_disk(E2);
        + device_add_disk(E1, E2);

    ...plus some manual fixups for a few missed conversions.

Cc Jens Axboe <[email protected]>
Cc Keith Busch <[email protected]>
Cc Michael S. Tsirkin <[email protected]>
Cc David Woodhouse <[email protected]>
Cc David S. Miller <[email protected]>
Cc James Bottomley <[email protected]>
Cc Ross Zwisler <[email protected]>
Cc Konrad Rzeszutek Wilk <[email protected]>
Cc Martin K. Petersen <[email protected]>

commit 52c44d93c26f5a76068c0a8cc83bb8f56f38043d
Author: Dan Williams <[email protected]>
Date:   Wed Jun 15 19:43:07 2016 -0700

    block: remove ->driverfs_dev

    Now that all drivers that specify a ->driverfs_dev have been converted to device_add_disk(), the pointer can be removed from struct gendisk.

#1 lore raw
Quoted 14 lines · Dan J

Hi Jens, please pull from:

git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm for-4.8/block

...to receive:

The removal of ->driverfs_dev in favor of just passing the parent device in as a parameter to add_disk(). See below, it has received a "Reviewed-by" from Christoph, Bart, and Johannes.

It is also a pre-requisite for Fam Zheng's work to cleanup gendisk uevents vs attribute visibility [1]. We would extend device_add_disk() to take an attribute_group list.

Quoted 6 lines

This is based off a branch of block.git/for-4.8/drivers and has received a positive build success notification from the kbuild robot across several configs.

[1]: "gendisk: Generate uevent after attribute available"
http://marc.info/?l=linux-virtualization&m=146725201522201&w=2

Pulled, thanks Dan.

Signature · 1 line
Jens Axboe