linux-bcache.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* don't use ->bd_inode to access the block device size
@ 2021-10-13  5:10 Christoph Hellwig
  2021-10-13  5:10 ` [PATCH 01/29] bcache: remove bdev_sectors Christoph Hellwig
                   ` (31 more replies)
  0 siblings, 32 replies; 76+ messages in thread
From: Christoph Hellwig @ 2021-10-13  5:10 UTC (permalink / raw)
  To: Jens Axboe
  Cc: Coly Li, Mike Snitzer, Song Liu, David Sterba, Josef Bacik,
	Theodore Ts'o, OGAWA Hirofumi, Dave Kleikamp,
	Ryusuke Konishi, Anton Altaparmakov, Konstantin Komarov,
	Kees Cook, Phillip Lougher, Jan Kara, linux-block, dm-devel,
	drbd-dev, linux-bcache, linux-raid, linux-mtd, linux-nvme,
	linux-scsi, target-devel, linux-fsdevel, linux-btrfs, linux-ext4,
	jfs-discussion, linux-nfs, linux-nilfs, linux-ntfs-dev, ntfs3,
	reiserfs-devel

Hi Jens,

various drivers currently poke directy at the block device inode, which
is a bit of a mess.  This series cleans up the places that read the
block device size to use the proper helpers.  I have separate patches
for many of the other bd_inode uses, but this series is already big
enough as-is,

I wondered about adding a helper for looking at the size in byte units
to avoid the SECTOR_SHIFT shifts in various places.  But given that
I could not come up with a good name and block devices fundamentally
work in sector size granularity I decided against that.

Diffstat:
 block/fops.c                        |    2 +-
 drivers/block/drbd/drbd_int.h       |    3 +--
 drivers/md/bcache/super.c           |    2 +-
 drivers/md/bcache/util.h            |    4 ----
 drivers/md/bcache/writeback.c       |    2 +-
 drivers/md/dm-bufio.c               |    2 +-
 drivers/md/dm-cache-metadata.c      |    2 +-
 drivers/md/dm-cache-target.c        |    2 +-
 drivers/md/dm-clone-target.c        |    2 +-
 drivers/md/dm-dust.c                |    5 ++---
 drivers/md/dm-ebs-target.c          |    2 +-
 drivers/md/dm-era-target.c          |    2 +-
 drivers/md/dm-exception-store.h     |    2 +-
 drivers/md/dm-flakey.c              |    3 +--
 drivers/md/dm-integrity.c           |    6 +++---
 drivers/md/dm-linear.c              |    3 +--
 drivers/md/dm-log-writes.c          |    4 ++--
 drivers/md/dm-log.c                 |    2 +-
 drivers/md/dm-mpath.c               |    2 +-
 drivers/md/dm-raid.c                |    6 +++---
 drivers/md/dm-switch.c              |    2 +-
 drivers/md/dm-table.c               |    3 +--
 drivers/md/dm-thin-metadata.c       |    2 +-
 drivers/md/dm-thin.c                |    2 +-
 drivers/md/dm-verity-target.c       |    3 +--
 drivers/md/dm-writecache.c          |    2 +-
 drivers/md/dm-zoned-target.c        |    2 +-
 drivers/md/md.c                     |   26 +++++++++++---------------
 drivers/mtd/devices/block2mtd.c     |    5 +++--
 drivers/nvme/target/io-cmd-bdev.c   |    4 ++--
 drivers/target/target_core_iblock.c |    5 +++--
 fs/affs/super.c                     |    2 +-
 fs/btrfs/dev-replace.c              |    2 +-
 fs/btrfs/disk-io.c                  |    3 ++-
 fs/btrfs/ioctl.c                    |    4 ++--
 fs/btrfs/volumes.c                  |    7 ++++---
 fs/buffer.c                         |    4 ++--
 fs/cramfs/inode.c                   |    2 +-
 fs/ext4/super.c                     |    2 +-
 fs/fat/inode.c                      |    5 +----
 fs/hfs/mdb.c                        |    2 +-
 fs/hfsplus/wrapper.c                |    2 +-
 fs/jfs/resize.c                     |    5 ++---
 fs/jfs/super.c                      |    5 ++---
 fs/nfs/blocklayout/dev.c            |    4 ++--
 fs/nilfs2/ioctl.c                   |    2 +-
 fs/nilfs2/super.c                   |    2 +-
 fs/nilfs2/the_nilfs.c               |    3 ++-
 fs/ntfs/super.c                     |    8 +++-----
 fs/ntfs3/super.c                    |    3 +--
 fs/pstore/blk.c                     |    4 ++--
 fs/reiserfs/super.c                 |    7 ++-----
 fs/squashfs/super.c                 |    5 +++--
 fs/udf/lowlevel.c                   |    5 ++---
 fs/udf/super.c                      |    9 +++------
 include/linux/genhd.h               |    6 ++++++
 56 files changed, 100 insertions(+), 117 deletions(-)

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

end of thread, other threads:[~2021-10-14 17:04 UTC | newest]

Thread overview: 76+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-13  5:10 don't use ->bd_inode to access the block device size Christoph Hellwig
2021-10-13  5:10 ` [PATCH 01/29] bcache: remove bdev_sectors Christoph Hellwig
2021-10-13  5:21   ` Coly Li
2021-10-13  6:09   ` Kees Cook
2021-10-13  5:10 ` [PATCH 02/29] drbd: use bdev_nr_sectors instead of open coding it Christoph Hellwig
2021-10-13  6:09   ` Kees Cook
2021-10-13 22:33   ` Chaitanya Kulkarni
2021-10-13  5:10 ` [PATCH 03/29] dm: " Christoph Hellwig
2021-10-13  6:10   ` Kees Cook
2021-10-13 16:43   ` Mike Snitzer
2021-10-13  5:10 ` [PATCH 04/29] md: " Christoph Hellwig
2021-10-13  6:12   ` Kees Cook
2021-10-13 21:14     ` Song Liu
2021-10-13  5:10 ` [PATCH 05/29] mtd/block2mtd: " Christoph Hellwig
2021-10-13  5:10 ` [PATCH 06/29] nvmet: " Christoph Hellwig
2021-10-13 22:33   ` Chaitanya Kulkarni
2021-10-13  5:10 ` [PATCH 07/29] target/iblock: " Christoph Hellwig
2021-10-13  9:31   ` Bodo Stroesser
2021-10-13 22:37   ` Chaitanya Kulkarni
2021-10-13  5:10 ` [PATCH 08/29] fs: use bdev_nr_sectors instead of open coding it in blkdev_max_block Christoph Hellwig
2021-10-13 10:42   ` Jan Kara
2021-10-13 22:35   ` Chaitanya Kulkarni
2021-10-13  5:10 ` [PATCH 09/29] fs: simplify init_page_buffers Christoph Hellwig
2021-10-13  6:14   ` Kees Cook
2021-10-13 10:42   ` Jan Kara
2021-10-13  5:10 ` [PATCH 10/29] affs: use bdev_nr_sectors instead of open coding it Christoph Hellwig
2021-10-13  6:14   ` Kees Cook
2021-10-13  5:10 ` [PATCH 11/29] btrfs: " Christoph Hellwig
2021-10-13  7:08   ` Anand Jain
2021-10-13 22:36   ` Chaitanya Kulkarni
2021-10-14  2:44   ` Keith Busch
2021-10-13  5:10 ` [PATCH 12/29] cramfs: " Christoph Hellwig
2021-10-13  6:16   ` Kees Cook
2021-10-13  5:10 ` [PATCH 13/29] fat: " Christoph Hellwig
2021-10-13  6:16   ` Kees Cook
2021-10-13  5:10 ` [PATCH 14/29] hfs: " Christoph Hellwig
2021-10-13  6:16   ` Kees Cook
2021-10-13  5:10 ` [PATCH 15/29] hfsplus: " Christoph Hellwig
2021-10-13  6:16   ` Kees Cook
2021-10-13  5:10 ` [PATCH 16/29] jfs: " Christoph Hellwig
2021-10-13 14:13   ` Dave Kleikamp
2021-10-13  5:10 ` [PATCH 17/29] nfs/blocklayout: " Christoph Hellwig
2021-10-13  5:10 ` [PATCH 18/29] nilfs2: " Christoph Hellwig
2021-10-13  5:10 ` [PATCH 19/29] ntfs3: " Christoph Hellwig
2021-10-13  5:10 ` [PATCH 20/29] pstore/blk: " Christoph Hellwig
2021-10-13  5:10 ` [PATCH 21/29] reiserfs: " Christoph Hellwig
2021-10-13 10:43   ` Jan Kara
2021-10-13  5:10 ` [PATCH 22/29] squashfs: " Christoph Hellwig
2021-10-13 19:37   ` Phillip Lougher
2021-10-13  5:10 ` [PATCH 23/29] block: use bdev_nr_sectors instead of open coding it in blkdev_fallocate Christoph Hellwig
2021-10-13 10:44   ` Jan Kara
2021-10-13 22:34   ` Chaitanya Kulkarni
2021-10-13  5:10 ` [PATCH 24/29] block: add a sb_bdev_nr_blocks helper Christoph Hellwig
2021-10-13  6:27   ` Kees Cook
2021-10-13  5:10 ` [PATCH 25/29] ext4: use sb_bdev_nr_blocks Christoph Hellwig
2021-10-13  6:29   ` Kees Cook
2021-10-13  6:30   ` Kees Cook
2021-10-13 10:46   ` Jan Kara
2021-10-13 15:51   ` Theodore Ts'o
2021-10-13  5:10 ` [PATCH 26/29] jfs: " Christoph Hellwig
2021-10-13  6:31   ` Kees Cook
2021-10-13  5:10 ` [PATCH 27/29] ntfs: " Christoph Hellwig
2021-10-13  6:33   ` Kees Cook
2021-10-13  5:10 ` [PATCH 28/29] reiserfs: " Christoph Hellwig
2021-10-13  6:33   ` Kees Cook
2021-10-13 10:46   ` Jan Kara
2021-10-13  5:10 ` [PATCH 29/29] udf: " Christoph Hellwig
2021-10-13  6:34   ` Kees Cook
2021-10-13 10:47   ` Jan Kara
2021-10-13  6:39 ` don't use ->bd_inode to access the block device size Kees Cook
2021-10-13  7:14 ` Anand Jain
2021-10-14  6:28 ` Christoph Hellwig
2021-10-14  9:32   ` Anton Altaparmakov
2021-10-14 13:13     ` Dave Kleikamp
2021-10-14 15:14       ` Kees Cook
2021-10-14 15:35         ` Wol

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).