linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* decouple block open flags from fmode_t v2
@ 2023-06-08 11:02 Christoph Hellwig
  2023-06-08 11:02 ` [PATCH 01/30] block: also call ->open for incremental partition opens Christoph Hellwig
                   ` (30 more replies)
  0 siblings, 31 replies; 41+ messages in thread
From: Christoph Hellwig @ 2023-06-08 11:02 UTC (permalink / raw)
  To: Jens Axboe
  Cc: Richard Weinberger, Josef Bacik, Md. Haris Iqbal, Jack Wang,
	Phillip Potter, Coly Li, Miquel Raynal, Vignesh Raghavendra,
	Martin K. Petersen, Chris Mason, David Sterba, Alexander Viro,
	Christian Brauner, Rafael J. Wysocki, Pavel Machek, dm-devel,
	linux-block, linux-um, linux-scsi, linux-bcache, linux-mtd,
	linux-nvme, linux-btrfs, linux-f2fs-devel, linux-nilfs,
	linux-fsdevel, linux-pm

Hi all,

this series adds a new blk_mode_t for block open flags instead of abusing
fmode_t.  The block open flags work very different from the normal use of
fmode_t and only share the basic READ/WRITE flags with it.  None of the
other normal FMODE_* flags is used, but instead there are three
block-specific ones not used by anyone else, which can now be removed.

Note that I've only CCed maintainers and lists for drivers and file systems
that have non-trivial changes, as otherwise the series would spam literally
everyone in the block and file system world.

A git tree is available here:

    git://git.infradead.org/users/hch/block.git blk-open-release

Gitweb:

    http://git.infradead.org/users/hch/block.git/shortlog/refs/heads/blk-open-release

Changes since v1:
 - drop "block: share code between disk_check_media_change and
   disk_force_media_change" for now as it conflicts with a fix in
   disk_force_media_change
 - add a few missing fmode_t -> blk_mode_t conversions
 - move the opened_for_data memeber in struct cdrom_device_info to a
   place that creates less padding
 - better document the magic floppy O_ACCMODE == O_WRONLY | O_RDWR case
 - better document the new usage of file->private_data for block devices
 - improve a few commit messages

Diffstat:
 arch/um/drivers/ubd_kern.c          |   20 ++-----
 arch/xtensa/platforms/iss/simdisk.c |    6 +-
 block/bdev.c                        |   99 ++++++++++++++++++------------------
 block/blk-zoned.c                   |   12 ++--
 block/blk.h                         |   26 ++++++++-
 block/bsg-lib.c                     |    2 
 block/bsg.c                         |    8 +-
 block/disk-events.c                 |   18 +++---
 block/fops.c                        |   60 ++++++++++++++-------
 block/genhd.c                       |   13 ++--
 block/ioctl.c                       |   61 +++++++---------------
 drivers/block/amiflop.c             |   20 +++----
 drivers/block/aoe/aoeblk.c          |    8 +-
 drivers/block/ataflop.c             |   43 +++++++--------
 drivers/block/drbd/drbd_main.c      |   13 ++--
 drivers/block/drbd/drbd_nl.c        |   23 +++++---
 drivers/block/floppy.c              |   72 +++++++++++++-------------
 drivers/block/loop.c                |   24 ++++----
 drivers/block/mtip32xx/mtip32xx.c   |    4 -
 drivers/block/nbd.c                 |   12 ++--
 drivers/block/pktcdvd.c             |   36 ++++++-------
 drivers/block/rbd.c                 |    6 +-
 drivers/block/rnbd/rnbd-clt.c       |    8 +-
 drivers/block/rnbd/rnbd-srv-sysfs.c |    3 -
 drivers/block/rnbd/rnbd-srv.c       |   23 ++++----
 drivers/block/rnbd/rnbd-srv.h       |    2 
 drivers/block/sunvdc.c              |    2 
 drivers/block/swim.c                |   24 ++++----
 drivers/block/swim3.c               |   33 +++++-------
 drivers/block/ublk_drv.c            |    4 -
 drivers/block/xen-blkback/xenbus.c  |    4 -
 drivers/block/xen-blkfront.c        |    2 
 drivers/block/z2ram.c               |    8 +-
 drivers/block/zram/zram_drv.c       |   21 +++----
 drivers/cdrom/cdrom.c               |   38 +++----------
 drivers/cdrom/gdrom.c               |   12 ++--
 drivers/md/bcache/bcache.h          |    2 
 drivers/md/bcache/request.c         |    4 -
 drivers/md/bcache/super.c           |   25 ++++-----
 drivers/md/dm-cache-target.c        |   12 ++--
 drivers/md/dm-clone-target.c        |   10 +--
 drivers/md/dm-core.h                |    7 +-
 drivers/md/dm-era-target.c          |    6 +-
 drivers/md/dm-ioctl.c               |   10 +--
 drivers/md/dm-snap.c                |    4 -
 drivers/md/dm-table.c               |   11 ++--
 drivers/md/dm-thin.c                |    9 +--
 drivers/md/dm-verity-fec.c          |    2 
 drivers/md/dm-verity-target.c       |    6 +-
 drivers/md/dm.c                     |   20 +++----
 drivers/md/dm.h                     |    2 
 drivers/md/md.c                     |   50 +++++++++---------
 drivers/mmc/core/block.c            |   12 ++--
 drivers/mtd/devices/block2mtd.c     |    6 +-
 drivers/mtd/mtd_blkdevs.c           |    8 +-
 drivers/mtd/mtdblock.c              |    2 
 drivers/mtd/ubi/block.c             |    9 +--
 drivers/nvme/host/core.c            |    6 +-
 drivers/nvme/host/ioctl.c           |   66 +++++++++++++-----------
 drivers/nvme/host/multipath.c       |    6 +-
 drivers/nvme/host/nvme.h            |    4 -
 drivers/nvme/target/io-cmd-bdev.c   |    4 -
 drivers/s390/block/dasd.c           |   10 +--
 drivers/s390/block/dasd_genhd.c     |    5 +
 drivers/s390/block/dasd_int.h       |    3 -
 drivers/s390/block/dasd_ioctl.c     |    2 
 drivers/s390/block/dcssblk.c        |   11 +---
 drivers/scsi/ch.c                   |    3 -
 drivers/scsi/scsi_bsg.c             |    4 -
 drivers/scsi/scsi_ioctl.c           |   38 ++++++-------
 drivers/scsi/sd.c                   |   39 ++++++--------
 drivers/scsi/sg.c                   |    7 +-
 drivers/scsi/sr.c                   |   22 ++++----
 drivers/scsi/st.c                   |    2 
 drivers/target/target_core_iblock.c |    9 +--
 drivers/target/target_core_pscsi.c  |   10 +--
 fs/btrfs/dev-replace.c              |    6 +-
 fs/btrfs/ioctl.c                    |   12 ++--
 fs/btrfs/super.c                    |   21 ++-----
 fs/btrfs/volumes.c                  |   55 +++++++++-----------
 fs/btrfs/volumes.h                  |   11 +---
 fs/erofs/super.c                    |    7 +-
 fs/ext4/super.c                     |   11 +---
 fs/f2fs/super.c                     |   12 ++--
 fs/jfs/jfs_logmgr.c                 |    6 +-
 fs/nfs/blocklayout/dev.c            |    9 +--
 fs/nilfs2/super.c                   |   12 +---
 fs/ocfs2/cluster/heartbeat.c        |    7 +-
 fs/reiserfs/journal.c               |   19 +++---
 fs/reiserfs/reiserfs.h              |    1 
 fs/super.c                          |   33 ++++--------
 fs/xfs/xfs_super.c                  |   15 ++---
 include/linux/blkdev.h              |   68 +++++++++++-------------
 include/linux/bsg.h                 |    2 
 include/linux/cdrom.h               |   12 ++--
 include/linux/device-mapper.h       |    8 +-
 include/linux/fs.h                  |    8 --
 include/linux/mtd/blktrans.h        |    2 
 include/scsi/scsi_ioctl.h           |    4 -
 kernel/power/hibernate.c            |   12 +---
 kernel/power/power.h                |    2 
 kernel/power/swap.c                 |   28 ++++------
 mm/swapfile.c                       |    7 +-
 103 files changed, 791 insertions(+), 837 deletions(-)

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

end of thread, other threads:[~2023-08-28 12:10 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-08 11:02 decouple block open flags from fmode_t v2 Christoph Hellwig
2023-06-08 11:02 ` [PATCH 01/30] block: also call ->open for incremental partition opens Christoph Hellwig
2023-07-06  0:18   ` [f2fs-dev] " patchwork-bot+f2fs
2023-08-25  2:44   ` Al Viro
2023-08-28 12:09     ` Christoph Hellwig
2023-06-08 11:02 ` [PATCH 02/30] cdrom: remove the unused bdev argument to cdrom_open Christoph Hellwig
2023-06-08 11:02 ` [PATCH 03/30] cdrom: remove the unused mode argument to cdrom_ioctl Christoph Hellwig
2023-06-08 11:02 ` [PATCH 04/30] cdrom: remove the unused cdrom_close_write release code Christoph Hellwig
2023-06-08 11:02 ` [PATCH 05/30] cdrom: track if a cdrom_device_info was opened for data Christoph Hellwig
2023-06-09  6:37   ` Hannes Reinecke
2023-06-08 11:02 ` [PATCH 06/30] cdrom: remove the unused mode argument to cdrom_release Christoph Hellwig
2023-06-08 11:02 ` [PATCH 07/30] block: pass a gendisk on bdev_check_media_change Christoph Hellwig
2023-06-08 11:02 ` [PATCH 08/30] block: pass a gendisk to ->open Christoph Hellwig
2023-06-08 11:02 ` [PATCH 09/30] block: remove the unused mode argument to ->release Christoph Hellwig
2023-06-08 11:02 ` [PATCH 10/30] block: rename blkdev_close to blkdev_release Christoph Hellwig
2023-06-08 11:02 ` [PATCH 11/30] swsusp: don't pass a stack address to blkdev_get_by_path Christoph Hellwig
2023-06-09 18:13   ` Rafael J. Wysocki
2023-06-08 11:02 ` [PATCH 12/30] bcache: " Christoph Hellwig
2023-06-08 11:02 ` [PATCH 13/30] rnbd-srv: don't pass a holder for non-exclusive blkdev_get_by_path Christoph Hellwig
2023-06-08 11:02 ` [PATCH 14/30] btrfs: " Christoph Hellwig
2023-06-08 11:02 ` [PATCH 15/30] block: use the holder as indication for exclusive opens Christoph Hellwig
2023-06-08 11:02 ` [PATCH 16/30] block: add a sb_open_mode helper Christoph Hellwig
2023-06-08 11:02 ` [PATCH 17/30] fs: remove sb->s_mode Christoph Hellwig
2023-06-08 11:02 ` [PATCH 18/30] scsi: replace the fmode_t argument to scsi_cmd_allowed with a simple bool Christoph Hellwig
2023-06-08 11:02 ` [PATCH 19/30] scsi: replace the fmode_t argument to scsi_ioctl " Christoph Hellwig
2023-06-08 11:02 ` [PATCH 20/30] scsi: replace the fmode_t argument to ->sg_io_fn " Christoph Hellwig
2023-06-08 11:02 ` [PATCH 21/30] nvme: replace the fmode_t argument to the nvme ioctl handlers " Christoph Hellwig
2023-06-09 15:49   ` Keith Busch
2023-06-08 11:02 ` [PATCH 22/30] mtd: block: use a simple bool to track open for write Christoph Hellwig
2023-06-08 11:02 ` [PATCH 23/30] rnbd-srv: replace sess->open_flags with a "bool readonly" Christoph Hellwig
2023-06-08 11:02 ` [PATCH 24/30] ubd: remove commented out code in ubd_open Christoph Hellwig
2023-06-08 11:02 ` [PATCH 25/30] block: move a few internal definitions out of blkdev.h Christoph Hellwig
2023-06-08 11:02 ` [PATCH 26/30] block: remove unused fmode_t arguments from ioctl handlers Christoph Hellwig
2023-06-08 11:02 ` [PATCH 27/30] block: replace fmode_t with a block-specific type for block open flags Christoph Hellwig
2023-06-08 11:45   ` Christian Brauner
2023-06-09  6:40   ` [dm-devel] " Hannes Reinecke
2023-06-08 11:02 ` [PATCH 28/30] block: always use I_BDEV on file->f_mapping->host to find the bdev Christoph Hellwig
2023-06-08 11:02 ` [PATCH 29/30] block: store the holder in file->private_data Christoph Hellwig
2023-06-09  6:41   ` Hannes Reinecke
2023-06-08 11:02 ` [PATCH 30/30] fs: remove the now unused FMODE_* flags Christoph Hellwig
2023-06-12 14:11 ` decouple block open flags from fmode_t v2 Jens Axboe

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