dm-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [dm-devel] merge struct block_device and struct hd_struct v2
@ 2020-11-24 13:27 Christoph Hellwig
  2020-11-24 13:27 ` [dm-devel] [PATCH 01/45] blk-cgroup: fix a hd_struct leak in blkcg_fill_root_iostats Christoph Hellwig
                   ` (44 more replies)
  0 siblings, 45 replies; 92+ messages in thread
From: Christoph Hellwig @ 2020-11-24 13:27 UTC (permalink / raw)
  To: Jens Axboe
  Cc: linux-bcache, Jan Kara, linux-fsdevel, Mike Snitzer,
	Konrad Rzeszutek Wilk, Greg Kroah-Hartman, Jan Kara, Josef Bacik,
	Coly Li, linux-block, Richard Weinberger, dm-devel, linux-mtd,
	Johannes Thumshirn, Tejun Heo, xen-devel, linux-mm

Hi Jens,

this series cleans up our main per-device node data structure by merging
the block_device and hd_struct data structures that have the same scope,
but different life times.  The main effect (besides removing lots of
code) is that instead of having two device sizes that need complex
synchronization there is just one now.

Note that this now includes the previous "misc cleanups" series as I had
to fix up a thing in there with the changed patch ordering.

The first patch already is in 5.10-rc, but not in for-5.11/block

A git tree is available here:

    git://git.infradead.org/users/hch/block.git bdev-lookup

Gitweb:

    http://git.infradead.org/users/hch/block.git/shortlog/refs/heads/bdev-lookup

Changes since v1:
 - spelling fixes
 - fix error unwinding in __alloc_disk_node
 - use bdev_is_partition in a few more places
 - don't send the RESIZE=1 uevent for hidden gendisks
 - rename __bdget_disk to disk_find_part
 - drop a bcache patch
 - some patch reordering
 - add more refactoring
 - use rcu protection to prevent racing with a disk going away
   in blkdev_get
 - split up some of the big patches into many small ones
 - clean up the freeze_bdev interface

Diffstat:
 block/bio.c                                  |    6 
 block/blk-cgroup.c                           |   50 -
 block/blk-core.c                             |   68 +-
 block/blk-flush.c                            |    2 
 block/blk-iocost.c                           |   36 -
 block/blk-lib.c                              |    2 
 block/blk-merge.c                            |    2 
 block/blk-mq.c                               |    9 
 block/blk-mq.h                               |    7 
 block/blk.h                                  |   84 ---
 block/genhd.c                                |  467 ++++-------------
 block/ioctl.c                                |   14 
 block/partitions/core.c                      |  252 +++------
 drivers/block/drbd/drbd_receiver.c           |    2 
 drivers/block/drbd/drbd_worker.c             |    3 
 drivers/block/loop.c                         |   24 
 drivers/block/mtip32xx/mtip32xx.c            |   15 
 drivers/block/mtip32xx/mtip32xx.h            |    2 
 drivers/block/nbd.c                          |    6 
 drivers/block/xen-blkback/common.h           |    4 
 drivers/block/xen-blkfront.c                 |   20 
 drivers/block/zram/zram_drv.c                |   87 ---
 drivers/block/zram/zram_drv.h                |    1 
 drivers/md/bcache/request.c                  |    4 
 drivers/md/bcache/super.c                    |   29 -
 drivers/md/dm-core.h                         |    7 
 drivers/md/dm-table.c                        |    9 
 drivers/md/dm.c                              |   45 -
 drivers/md/md.c                              |    8 
 drivers/mtd/mtdsuper.c                       |   17 
 drivers/nvme/target/admin-cmd.c              |   20 
 drivers/s390/block/dasd.c                    |    8 
 drivers/s390/block/dasd_ioctl.c              |    9 
 drivers/scsi/scsicam.c                       |    2 
 drivers/target/target_core_file.c            |    6 
 drivers/target/target_core_pscsi.c           |    7 
 drivers/usb/gadget/function/storage_common.c |    8 
 fs/block_dev.c                               |  730 +++++++++------------------
 fs/btrfs/sysfs.c                             |   15 
 fs/btrfs/volumes.c                           |   13 
 fs/buffer.c                                  |    2 
 fs/ext4/ioctl.c                              |    2 
 fs/ext4/super.c                              |   18 
 fs/ext4/sysfs.c                              |   10 
 fs/f2fs/checkpoint.c                         |    5 
 fs/f2fs/f2fs.h                               |    2 
 fs/f2fs/file.c                               |   14 
 fs/f2fs/super.c                              |    8 
 fs/f2fs/sysfs.c                              |    9 
 fs/inode.c                                   |    3 
 fs/internal.h                                |    7 
 fs/io_uring.c                                |   10 
 fs/pipe.c                                    |    5 
 fs/pstore/blk.c                              |    2 
 fs/quota/quota.c                             |   40 +
 fs/statfs.c                                  |    2 
 fs/super.c                                   |   86 ---
 fs/xfs/xfs_fsops.c                           |    7 
 include/linux/blk-cgroup.h                   |    4 
 include/linux/blk_types.h                    |   24 
 include/linux/blkdev.h                       |   27 
 include/linux/fs.h                           |    5 
 include/linux/genhd.h                        |  110 ----
 include/linux/part_stat.h                    |   45 -
 init/do_mounts.c                             |  271 ++++------
 kernel/trace/blktrace.c                      |   54 -
 mm/filemap.c                                 |   13 
 67 files changed, 957 insertions(+), 1928 deletions(-)

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel


^ permalink raw reply	[flat|nested] 92+ messages in thread
* [dm-devel] merge struct block_device and struct hd_struct v4
@ 2020-11-28 16:14 Christoph Hellwig
  2020-11-28 16:14 ` [dm-devel] [PATCH 26/45] block: remove ->bd_contains Christoph Hellwig
  0 siblings, 1 reply; 92+ messages in thread
From: Christoph Hellwig @ 2020-11-28 16:14 UTC (permalink / raw)
  To: Jens Axboe
  Cc: linux-bcache, Jan Kara, Mike Snitzer, linux-mm,
	Greg Kroah-Hartman, Jan Kara, Josef Bacik, Coly Li, linux-block,
	linux-fsdevel, dm-devel, linux-mtd, Johannes Thumshirn,
	Tejun Heo

Hi Jens,

this series cleans up our main per-device node data structure by merging
the block_device and hd_struct data structures that have the same scope,
but different life times.  The main effect (besides removing lots of
code) is that instead of having two device sizes that need complex
synchronization there is just one now.

Note that this now includes the previous "misc cleanups" series as I had
to fix up a thing in there with the changed patch ordering.

The first patch already is in 5.10-rc, but not in for-5.11/block

A git tree is available here:

    git://git.infradead.org/users/hch/block.git bdev-lookup

Gitweb:

    http://git.infradead.org/users/hch/block.git/shortlog/refs/heads/bdev-lookup

Changes since v3:
 - extend hold time of bdev_lookup_sem
 - use igrab bdget to make bdget_disk and disk_part_iter* safe
 - fix some error handling labels
 - remove a superflous cast
 - various comment fixups

Changes since v2:
 - keep a reference to the whole device bdev from each partition bdev
   to simplify blkdev_get
 - drop a stale commen in freeze_bdev
 - fix an incorrect hunk that ignored error in thaw_bdev
 - add back a missing call to mapping_set_gfp_mask
 - misc typo fixes, comment and commit log improvements
 - keep using a global lock to synchronize gendisk lookup
 - do not call ->open for blk-cgroup configuration updates
 - drop a zram cleanup patch

Changes since v1:
 - spelling fixes
 - fix error unwinding in __alloc_disk_node
 - use bdev_is_partition in a few more places
 - don't send the RESIZE=1 uevent for hidden gendisks
 - rename __bdget_disk to disk_find_part
 - drop a bcache patch
 - some patch reordering
 - add more refactoring
 - use rcu protection to prevent racing with a disk going away
   in blkdev_get
 - split up some of the big patches into many small ones
 - clean up the freeze_bdev interface

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel


^ permalink raw reply	[flat|nested] 92+ messages in thread

end of thread, other threads:[~2020-11-30  7:39 UTC | newest]

Thread overview: 92+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-24 13:27 [dm-devel] merge struct block_device and struct hd_struct v2 Christoph Hellwig
2020-11-24 13:27 ` [dm-devel] [PATCH 01/45] blk-cgroup: fix a hd_struct leak in blkcg_fill_root_iostats Christoph Hellwig
2020-11-25  6:41   ` Hannes Reinecke
2020-11-24 13:27 ` [dm-devel] [PATCH 02/45] filemap: consistently use ->f_mapping over ->i_mapping Christoph Hellwig
2020-11-24 13:53   ` Matthew Wilcox
2020-11-25  6:41   ` Hannes Reinecke
2020-11-25 12:16   ` Jan Kara
2020-11-24 13:27 ` [dm-devel] [PATCH 03/45] fs: remove get_super_thawed and get_super_exclusive_thawed Christoph Hellwig
2020-11-25  6:42   ` Hannes Reinecke
2020-11-25 12:19   ` Jan Kara
2020-11-24 13:27 ` [dm-devel] [PATCH 04/45] fs: simplify freeze_bdev/thaw_bdev Christoph Hellwig
2020-11-25  6:07   ` Chao Yu
2020-11-25 12:29   ` Jan Kara
2020-11-25 16:22     ` Christoph Hellwig
2020-11-24 13:27 ` [dm-devel] [PATCH 05/45] mtip32xx: remove the call to fsync_bdev on removal Christoph Hellwig
2020-11-25 12:31   ` Jan Kara
2020-11-24 13:27 ` [dm-devel] [PATCH 06/45] zram: remove the claim mechanism Christoph Hellwig
2020-11-25 12:37   ` Jan Kara
2020-11-24 13:27 ` [dm-devel] [PATCH 07/45] zram: do not call set_blocksize Christoph Hellwig
2020-11-24 13:27 ` [dm-devel] [PATCH 08/45] loop: " Christoph Hellwig
2020-11-25 13:37   ` Jan Kara
2020-11-24 13:27 ` [dm-devel] [PATCH 09/45] dm: simplify flush_bio initialization in __send_empty_flush Christoph Hellwig
2020-11-24 13:27 ` [dm-devel] [PATCH 10/45] dm: remove the block_device reference in struct mapped_device Christoph Hellwig
2020-11-24 13:27 ` [dm-devel] [PATCH 11/45] block: remove a duplicate __disk_get_part prototype Christoph Hellwig
2020-11-24 17:36   ` Tejun Heo
2020-11-24 13:27 ` [dm-devel] [PATCH 12/45] block: remove a superflous check in blkpg_do_ioctl Christoph Hellwig
2020-11-24 17:37   ` Tejun Heo
2020-11-25 13:39   ` Jan Kara
2020-11-24 13:27 ` [dm-devel] [PATCH 13/45] block: add a bdev_kobj helper Christoph Hellwig
2020-11-24 13:41   ` Coly Li
2020-11-24 17:37   ` Tejun Heo
2020-11-24 13:27 ` [dm-devel] [PATCH 14/45] block: use disk_part_iter_exit in disk_part_iter_next Christoph Hellwig
2020-11-24 17:37   ` Tejun Heo
2020-11-24 13:27 ` [dm-devel] [PATCH 15/45] block: use put_device in put_disk Christoph Hellwig
2020-11-24 17:37   ` Tejun Heo
2020-11-24 13:27 ` [dm-devel] [PATCH 16/45] block: change the hash used for looking up block devices Christoph Hellwig
2020-11-24 17:38   ` Tejun Heo
2020-11-24 13:27 ` [dm-devel] [PATCH 17/45] init: refactor name_to_dev_t Christoph Hellwig
2020-11-24 17:38   ` Tejun Heo
2020-11-24 13:27 ` [dm-devel] [PATCH 18/45] init: refactor devt_from_partuuid Christoph Hellwig
2020-11-24 17:38   ` Tejun Heo
2020-11-24 13:27 ` [dm-devel] [PATCH 19/45] init: cleanup match_dev_by_uuid and match_dev_by_label Christoph Hellwig
2020-11-24 17:39   ` Tejun Heo
2020-11-24 13:27 ` [dm-devel] [PATCH 20/45] block: refactor __blkdev_put Christoph Hellwig
2020-11-24 17:41   ` Tejun Heo
2020-11-24 13:27 ` [dm-devel] [PATCH 21/45] block: refactor blkdev_get Christoph Hellwig
2020-11-24 18:03   ` Tejun Heo
2020-11-24 13:27 ` [dm-devel] [PATCH 22/45] block: opencode devcgroup_inode_permission Christoph Hellwig
2020-11-24 18:05   ` Tejun Heo
2020-11-24 13:27 ` [dm-devel] [PATCH 23/45] block: remove i_bdev Christoph Hellwig
2020-11-24 13:38   ` Coly Li
2020-11-24 19:37   ` Tejun Heo
2020-11-25 16:29     ` Christoph Hellwig
2020-11-25 20:19       ` Tejun Heo
2020-11-24 13:27 ` [dm-devel] [PATCH 24/45] blk-cgroup: stop abusing get_gendisk Christoph Hellwig
2020-11-24 19:46   ` Tejun Heo
2020-11-24 13:27 ` [dm-devel] [PATCH 25/45] block: reference struct block_device from struct hd_struct Christoph Hellwig
2020-11-24 21:18   ` Tejun Heo
2020-11-25 16:45     ` Christoph Hellwig
2020-11-25 20:20       ` Tejun Heo
2020-11-26  8:16         ` Christoph Hellwig
2020-11-24 13:27 ` [dm-devel] [PATCH 26/45] block: remove ->bd_contains Christoph Hellwig
2020-11-24 21:19   ` Tejun Heo
2020-11-24 13:27 ` [dm-devel] [PATCH 27/45] block: simplify the block device claiming interface Christoph Hellwig
2020-11-24 21:19   ` Tejun Heo
2020-11-24 13:27 ` [dm-devel] [PATCH 28/45] block: simplify part_to_disk Christoph Hellwig
2020-11-24 21:20   ` Tejun Heo
2020-11-24 13:27 ` [dm-devel] [PATCH 29/45] block: initialize struct block_device in bdev_alloc Christoph Hellwig
2020-11-24 21:20   ` Tejun Heo
2020-11-24 13:27 ` [dm-devel] [PATCH 30/45] block: remove the nr_sects field in struct hd_struct Christoph Hellwig
2020-11-24 13:34   ` Coly Li
2020-11-25  6:10   ` Chao Yu
2020-11-24 13:27 ` [dm-devel] [PATCH 31/45] block: move disk stat accounting to struct block_device Christoph Hellwig
2020-11-24 13:27 ` [dm-devel] [PATCH 32/45] block: move the start_sect field " Christoph Hellwig
2020-11-24 13:27 ` [dm-devel] [PATCH 33/45] block: move the partition_meta_info " Christoph Hellwig
2020-11-24 13:27 ` [dm-devel] [PATCH 34/45] block: move holder_dir " Christoph Hellwig
2020-11-24 13:27 ` [dm-devel] [PATCH 35/45] block: move make_it_fail " Christoph Hellwig
2020-11-24 13:27 ` [dm-devel] [PATCH 36/45] block: move the policy field " Christoph Hellwig
2020-11-24 13:27 ` [dm-devel] [PATCH 37/45] block: allocate struct hd_struct as part of struct bdev_inode Christoph Hellwig
2020-11-24 13:27 ` [dm-devel] [PATCH 38/45] block: switch partition lookup to use struct block_device Christoph Hellwig
2020-11-24 13:32   ` Coly Li
2020-11-25  6:11   ` Chao Yu
2020-11-24 13:27 ` [dm-devel] [PATCH 39/45] block: remove the partno field from struct hd_struct Christoph Hellwig
2020-11-24 13:27 ` [dm-devel] [PATCH 40/45] block: pass a block_device to blk_alloc_devt Christoph Hellwig
2020-11-24 13:27 ` [dm-devel] [PATCH 41/45] block: pass a block_device to invalidate_partition Christoph Hellwig
2020-11-24 13:27 ` [dm-devel] [PATCH 42/45] block: switch disk_part_iter_* to use a struct block_device Christoph Hellwig
2020-11-24 13:27 ` [dm-devel] [PATCH 43/45] f2fs: remove a few bd_part checks Christoph Hellwig
2020-11-25  6:12   ` Chao Yu
2020-11-24 13:27 ` [dm-devel] [PATCH 44/45] block: merge struct block_device and struct hd_struct Christoph Hellwig
2020-11-24 13:27 ` [dm-devel] [PATCH 45/45] block: stop using bdget_disk for partition 0 Christoph Hellwig
2020-11-28 16:14 [dm-devel] merge struct block_device and struct hd_struct v4 Christoph Hellwig
2020-11-28 16:14 ` [dm-devel] [PATCH 26/45] block: remove ->bd_contains Christoph Hellwig
2020-11-30  7:37   ` Hannes Reinecke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).