Re: [dm-devel] [PATCH 27/30] block: replace fmode_t with a block-specific type for block open flags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/8/23 13:02, Christoph Hellwig wrote:
The only overlap between the block open flags mapped into the fmode_t and
other uses of fmode_t are FMODE_READ and FMODE_WRITE.  Define a new
blk_mode_t instead for use in blkdev_get_by_{dev,path}, ->open and
->ioctl and stop abusing fmode_t.

Signed-off-by: Christoph Hellwig <hch@xxxxxx>
Acked-by: Jack Wang <jinpu.wang@xxxxxxxxx>		[rnbd]
---
  arch/um/drivers/ubd_kern.c          |  8 +++---
  arch/xtensa/platforms/iss/simdisk.c |  2 +-
  block/bdev.c                        | 32 +++++++++++-----------
  block/blk-zoned.c                   |  8 +++---
  block/blk.h                         | 11 ++++----
  block/fops.c                        | 32 +++++++++++++++++-----
  block/genhd.c                       |  8 +++---
  block/ioctl.c                       | 42 +++++++++--------------------
  drivers/block/amiflop.c             | 12 ++++-----
  drivers/block/aoe/aoeblk.c          |  4 +--
  drivers/block/ataflop.c             | 25 +++++++++--------
  drivers/block/drbd/drbd_main.c      |  7 ++---
  drivers/block/drbd/drbd_nl.c        |  2 +-
  drivers/block/floppy.c              | 28 +++++++++----------
  drivers/block/loop.c                | 22 +++++++--------
  drivers/block/mtip32xx/mtip32xx.c   |  4 +--
  drivers/block/nbd.c                 |  4 +--
  drivers/block/pktcdvd.c             | 17 ++++++------
  drivers/block/rbd.c                 |  2 +-
  drivers/block/rnbd/rnbd-clt.c       |  4 +--
  drivers/block/rnbd/rnbd-srv.c       |  4 +--
  drivers/block/sunvdc.c              |  2 +-
  drivers/block/swim.c                | 16 +++++------
  drivers/block/swim3.c               | 24 ++++++++---------
  drivers/block/ublk_drv.c            |  2 +-
  drivers/block/xen-blkback/xenbus.c  |  2 +-
  drivers/block/xen-blkfront.c        |  2 +-
  drivers/block/z2ram.c               |  2 +-
  drivers/block/zram/zram_drv.c       |  6 ++---
  drivers/cdrom/cdrom.c               |  6 ++---
  drivers/cdrom/gdrom.c               |  4 +--
  drivers/md/bcache/bcache.h          |  2 +-
  drivers/md/bcache/request.c         |  4 +--
  drivers/md/bcache/super.c           |  6 ++---
  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                     | 10 +++----
  drivers/md/dm.h                     |  2 +-
  drivers/md/md.c                     |  8 +++---
  drivers/mmc/core/block.c            |  8 +++---
  drivers/mtd/devices/block2mtd.c     |  4 +--
  drivers/mtd/mtd_blkdevs.c           |  4 +--
  drivers/mtd/ubi/block.c             |  5 ++--
  drivers/nvme/host/core.c            |  2 +-
  drivers/nvme/host/ioctl.c           |  8 +++---
  drivers/nvme/host/multipath.c       |  2 +-
  drivers/nvme/host/nvme.h            |  4 +--
  drivers/nvme/target/io-cmd-bdev.c   |  2 +-
  drivers/s390/block/dasd.c           |  6 ++---
  drivers/s390/block/dasd_genhd.c     |  3 ++-
  drivers/s390/block/dasd_int.h       |  3 ++-
  drivers/s390/block/dasd_ioctl.c     |  2 +-
  drivers/s390/block/dcssblk.c        |  4 +--
  drivers/scsi/sd.c                   | 19 ++++++-------
  drivers/scsi/sr.c                   | 10 +++----
  drivers/target/target_core_iblock.c |  5 ++--
  drivers/target/target_core_pscsi.c  |  4 +--
  fs/btrfs/dev-replace.c              |  2 +-
  fs/btrfs/super.c                    |  8 +++---
  fs/btrfs/volumes.c                  | 16 +++++------
  fs/btrfs/volumes.h                  |  4 +--
  fs/erofs/super.c                    |  2 +-
  fs/ext4/super.c                     |  2 +-
  fs/f2fs/super.c                     |  2 +-
  fs/jfs/jfs_logmgr.c                 |  2 +-
  fs/nfs/blocklayout/dev.c            |  5 ++--
  fs/ocfs2/cluster/heartbeat.c        |  3 ++-
  fs/reiserfs/journal.c               |  4 +--
  fs/xfs/xfs_super.c                  |  2 +-
  include/linux/blkdev.h              | 30 ++++++++++++++++-----
  include/linux/cdrom.h               |  3 ++-
  include/linux/device-mapper.h       |  8 +++---
  kernel/power/swap.c                 |  6 ++---
  mm/swapfile.c                       |  2 +-
  82 files changed, 334 insertions(+), 315 deletions(-)

Reviewed-by: Hannes Reinecke <hare@xxxxxxx>

Cheers,

Hannes
--
Dr. Hannes Reinecke                Kernel Storage Architect
hare@xxxxxxx                              +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Ivo Totev, Andrew
Myers, Andrew McDonald, Martje Boudien Moerman




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux