linux-nilfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* decouple block open flags from fmode_t
@ 2023-06-06  7:39 Christoph Hellwig
  2023-06-06  7:39 ` [PATCH 01/31] block: also call ->open for incremental partition opens Christoph Hellwig
                   ` (31 more replies)
  0 siblings, 32 replies; 125+ messages in thread
From: Christoph Hellwig @ 2023-06-06  7:39 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-fsdeve

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.

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                 |   47 +++++++----------
 block/fops.c                        |   54 ++++++++++++-------
 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               |   36 +++----------
 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, 796 insertions(+), 853 deletions(-)

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

end of thread, other threads:[~2023-06-27  5:41 UTC | newest]

Thread overview: 125+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-06  7:39 decouple block open flags from fmode_t Christoph Hellwig
2023-06-06  7:39 ` [PATCH 01/31] block: also call ->open for incremental partition opens Christoph Hellwig
2023-06-07  8:14   ` Christian Brauner
2023-06-07  8:32     ` Christoph Hellwig
2023-06-07 12:10   ` Hannes Reinecke
2023-06-06  7:39 ` [PATCH 02/31] cdrom: remove the unused bdev argument to cdrom_open Christoph Hellwig
2023-06-06 22:50   ` Phillip Potter
2023-06-07  8:16   ` Christian Brauner
2023-06-07 12:10   ` Hannes Reinecke
2023-06-06  7:39 ` [PATCH 03/31] cdrom: remove the unused mode argument to cdrom_ioctl Christoph Hellwig
     [not found]   ` <20230606073950.225178-4-hch-jcswGhMUV9g@public.gmane.org>
2023-06-06 22:54     ` Phillip Potter
2023-06-07  8:17     ` Christian Brauner
2023-06-07 12:11   ` Hannes Reinecke
2023-06-06  7:39 ` [PATCH 04/31] cdrom: remove the unused cdrom_close_write release code Christoph Hellwig
     [not found]   ` <20230606073950.225178-5-hch-jcswGhMUV9g@public.gmane.org>
2023-06-06 22:56     ` Phillip Potter
2023-06-07  8:17     ` Christian Brauner
2023-06-07 12:12   ` Hannes Reinecke
2023-06-06  7:39 ` [PATCH 05/31] cdrom: track if a cdrom_device_info was opened for data Christoph Hellwig
2023-06-06 22:59   ` Phillip Potter
2023-06-07  8:19   ` Christian Brauner
     [not found]   ` <20230606073950.225178-6-hch-jcswGhMUV9g@public.gmane.org>
2023-06-07 12:13     ` Hannes Reinecke
2023-06-07 12:20       ` Christoph Hellwig
2023-06-06  7:39 ` [PATCH 06/31] cdrom: remove the unused mode argument to cdrom_release Christoph Hellwig
     [not found]   ` <20230606073950.225178-7-hch-jcswGhMUV9g@public.gmane.org>
2023-06-06 23:00     ` Phillip Potter
2023-06-08  8:41       ` Christoph Hellwig
     [not found]         ` <20230608084129.GA14689-jcswGhMUV9g@public.gmane.org>
2023-06-08  8:47           ` Phillip Potter
2023-06-08  9:04             ` Christoph Hellwig
2023-06-08  9:44               ` Phillip Potter
2023-06-27  5:41     ` Guenter Roeck
2023-06-07  8:20   ` Christian Brauner
2023-06-07 12:14   ` Hannes Reinecke
2023-06-06  7:39 ` [PATCH 07/31] block: pass a gendisk on bdev_check_media_change Christoph Hellwig
     [not found]   ` <20230606073950.225178-8-hch-jcswGhMUV9g@public.gmane.org>
2023-06-07  8:25     ` Christian Brauner
2023-06-07 12:15   ` Hannes Reinecke
2023-06-06  7:39 ` [PATCH 08/31] block: share code between disk_check_media_change and disk_force_media_change Christoph Hellwig
2023-06-07  8:26   ` Christian Brauner
2023-06-07 12:19   ` Hannes Reinecke
2023-06-07 12:21     ` Christoph Hellwig
     [not found]       ` <20230607122131.GB14579-jcswGhMUV9g@public.gmane.org>
2023-06-07 13:18         ` Hannes Reinecke
2023-06-06  7:39 ` [PATCH 09/31] block: pass a gendisk to ->open Christoph Hellwig
2023-06-07  8:34   ` Christian Brauner
2023-06-07  9:42   ` Jinpu Wang
2023-06-07 12:19   ` Hannes Reinecke
2023-06-06  7:39 ` [PATCH 10/31] block: remove the unused mode argument to ->release Christoph Hellwig
2023-06-07  8:34   ` Christian Brauner
2023-06-07  9:41   ` Jinpu Wang
2023-06-07 12:20   ` Hannes Reinecke
2023-06-06  7:39 ` [PATCH 11/31] block: rename blkdev_close to blkdev_release Christoph Hellwig
2023-06-07  8:35   ` Christian Brauner
2023-06-07 12:21   ` Hannes Reinecke
2023-06-06  7:39 ` [PATCH 12/31] swsusp: don't pass a stack address to blkdev_get_by_path Christoph Hellwig
2023-06-07 12:22   ` Hannes Reinecke
2023-06-06  7:39 ` [PATCH 13/31] bcache: " Christoph Hellwig
2023-06-07 12:23   ` Hannes Reinecke
2023-06-06  7:39 ` [PATCH 14/31] rnbd-srv: don't pass a holder for non-exclusive blkdev_get_by_path Christoph Hellwig
     [not found]   ` <20230606073950.225178-15-hch-jcswGhMUV9g@public.gmane.org>
2023-06-07  8:39     ` Christian Brauner
2023-06-07  9:38     ` Jinpu Wang
2023-06-07 12:24   ` Hannes Reinecke
2023-06-06  7:39 ` [PATCH 15/31] btrfs: " Christoph Hellwig
2023-06-07  8:40   ` Christian Brauner
2023-06-07 12:24   ` Hannes Reinecke
2023-06-07 13:32   ` David Sterba
2023-06-06  7:39 ` [PATCH 16/31] block: use the holder as indication for exclusive opens Christoph Hellwig
2023-06-07  8:49   ` Christian Brauner
2023-06-07  9:40   ` Jinpu Wang
2023-06-07 12:29   ` Hannes Reinecke
2023-06-07 13:53   ` David Sterba
2023-06-06  7:39 ` [PATCH 17/31] block: add a sb_open_mode helper Christoph Hellwig
2023-06-07  8:55   ` Christian Brauner
2023-06-07 12:30   ` Hannes Reinecke
2023-06-06  7:39 ` [PATCH 18/31] fs: remove sb->s_mode Christoph Hellwig
2023-06-07  8:56   ` Christian Brauner
2023-06-07 13:01   ` Hannes Reinecke
2023-06-06  7:39 ` [PATCH 19/31] scsi: replace the fmode_t argument to scsi_cmd_allowed with a simple bool Christoph Hellwig
2023-06-07  8:57   ` Christian Brauner
     [not found]   ` <20230606073950.225178-20-hch-jcswGhMUV9g@public.gmane.org>
2023-06-07 13:02     ` Hannes Reinecke
2023-06-08  1:18   ` Martin K. Petersen
2023-06-06  7:39 ` [PATCH 20/31] scsi: replace the fmode_t argument to scsi_ioctl " Christoph Hellwig
2023-06-07  8:58   ` Christian Brauner
2023-06-07 13:04   ` Hannes Reinecke
2023-06-08  1:17   ` Martin K. Petersen
2023-06-06  7:39 ` [PATCH 21/31] scsi: replace the fmode_t argument to ->sg_io_fn " Christoph Hellwig
2023-06-07  8:58   ` Christian Brauner
2023-06-07 13:05   ` Hannes Reinecke
2023-06-08  1:18   ` Martin K. Petersen
2023-06-06  7:39 ` [PATCH 22/31] nvme: replace the fmode_t argument to the nvme ioctl handlers " Christoph Hellwig
2023-06-07  8:59   ` Christian Brauner
     [not found]   ` <20230606073950.225178-23-hch-jcswGhMUV9g@public.gmane.org>
2023-06-07 13:06     ` Hannes Reinecke
2023-06-06  7:39 ` [PATCH 23/31] mtd: block: use a simple bool to track open for write Christoph Hellwig
2023-06-06  8:24   ` Richard Weinberger
2023-06-07  9:00   ` Christian Brauner
2023-06-07 13:07   ` Hannes Reinecke
2023-06-06  7:39 ` [PATCH 24/31] rnbd-srv: replace sess->open_flags with a "bool readonly" Christoph Hellwig
2023-06-07  9:01   ` Christian Brauner
     [not found]   ` <20230606073950.225178-25-hch-jcswGhMUV9g@public.gmane.org>
2023-06-07  9:43     ` Jinpu Wang
2023-06-07 13:07   ` Hannes Reinecke
2023-06-06  7:39 ` [PATCH 25/31] ubd: remove commented out code in ubd_open Christoph Hellwig
2023-06-06  8:20   ` Richard Weinberger
2023-06-07  9:02   ` Christian Brauner
2023-06-07 13:08   ` Hannes Reinecke
2023-06-06  7:39 ` [PATCH 26/31] block: move a few internal definitions out of blkdev.h Christoph Hellwig
2023-06-07  9:03   ` Christian Brauner
2023-06-07 13:09   ` Hannes Reinecke
2023-06-06  7:39 ` [PATCH 27/31] block: remove unused fmode_t arguments from ioctl handlers Christoph Hellwig
2023-06-07  9:03   ` Christian Brauner
2023-06-07 13:10   ` Hannes Reinecke
2023-06-06  7:39 ` [PATCH 28/31] block: replace fmode_t with a block-specific type for block open flags Christoph Hellwig
     [not found]   ` <20230606073950.225178-29-hch-jcswGhMUV9g@public.gmane.org>
2023-06-07  9:21     ` Christian Brauner
2023-06-07  9:32       ` Christian Brauner
2023-06-07 12:16       ` Christoph Hellwig
2023-06-07 12:47         ` Christian Brauner
2023-06-07  9:45     ` Jinpu Wang
2023-06-06  7:39 ` [PATCH 29/31] block: always use I_BDEV on file->f_mapping->host to find the bdev Christoph Hellwig
2023-06-07  9:23   ` Christian Brauner
     [not found]   ` <20230606073950.225178-30-hch-jcswGhMUV9g@public.gmane.org>
2023-06-07 13:11     ` Hannes Reinecke
2023-06-06  7:39 ` [PATCH 30/31] block: store the holder in file->private_data Christoph Hellwig
2023-06-07  9:24   ` Christian Brauner
2023-06-07 12:18     ` Christoph Hellwig
     [not found]   ` <20230606073950.225178-31-hch-jcswGhMUV9g@public.gmane.org>
2023-06-07 13:14     ` Hannes Reinecke
2023-06-06  7:39 ` [PATCH 31/31] fs: remove the now unused FMODE_* flags Christoph Hellwig
2023-06-07  9:25   ` Christian Brauner
     [not found]   ` <20230606073950.225178-32-hch-jcswGhMUV9g@public.gmane.org>
2023-06-07 13:15     ` Hannes Reinecke
2023-06-06  8:27 ` decouple block open flags from fmode_t Christian Brauner
2023-06-06  8:40   ` Christoph Hellwig
2023-06-07  9:27     ` Christian Brauner

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