[PATCH 28/31] block: replace fmode_t with a block-specific type for block open flags
Jinpu Wang
jinpu.wang at ionos.com
Wed Jun 7 02:45:39 PDT 2023
On Tue, Jun 6, 2023 at 9:41 AM Christoph Hellwig <hch at lst.de> 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_*, ->open and ->ioctl and
> stop abusing fmode_t.
>
> Signed-off-by: Christoph Hellwig <hch at lst.de>
> ---
> 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 | 26 +++++++++++++-----
> 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 +--
Acked-by: Jack Wang <jinpu.wang at ionos.com> # for rnbd.
More information about the Linux-nvme
mailing list