Re: [f2fs-dev] [PATCH 05/31] cdrom: track if a cdrom_device_info was opened for data

2023-06-06 Thread Phillip Potter
On Tue, Jun 06, 2023 at 09:39:24AM +0200, Christoph Hellwig wrote: > Set a flag when a cdrom_device_info is opened for writing, instead of > trying to figure out this at release time. This will allow to eventually > remove the mode argument to the ->release block_device_operation as > nothing but

Re: [f2fs-dev] [PATCH 06/31] cdrom: remove the unused mode argument to cdrom_release

2023-06-06 Thread Phillip Potter
On Tue, Jun 06, 2023 at 09:39:25AM +0200, Christoph Hellwig wrote: > Signed-off-by: Christoph Hellwig > --- > drivers/cdrom/cdrom.c | 2 +- > drivers/cdrom/gdrom.c | 2 +- > drivers/scsi/sr.c | 2 +- > include/linux/cdrom.h | 2 +- > 4 files changed, 4 insertions(+), 4 deletions(-) > > diff

[f2fs-dev] [syzbot] Monthly f2fs report (Jun 2023)

2023-06-06 Thread syzbot
Hello f2fs maintainers/developers, This is a 31-day syzbot report for the f2fs subsystem. All related reports/information can be found at: https://syzkaller.appspot.com/upstream/s/f2fs During the period, 0 new issues were detected and 0 were fixed. In total, 16 issues are still open and 28 have b

Re: [f2fs-dev] [PATCH 04/31] cdrom: remove the unused cdrom_close_write release code

2023-06-06 Thread Phillip Potter
On Tue, Jun 06, 2023 at 09:39:23AM +0200, Christoph Hellwig wrote: > cdrom_close_write is empty, and the for_data flag it is keyed off is > never set. Remove all this clutter. > > Signed-off-by: Christoph Hellwig > --- > drivers/cdrom/cdrom.c | 15 --- > include/linux/cdrom.h | 1 -

Re: [f2fs-dev] [PATCH 03/31] cdrom: remove the unused mode argument to cdrom_ioctl

2023-06-06 Thread Phillip Potter
On Tue, Jun 06, 2023 at 09:39:22AM +0200, Christoph Hellwig wrote: > Signed-off-by: Christoph Hellwig > --- > drivers/cdrom/cdrom.c | 2 +- > drivers/cdrom/gdrom.c | 2 +- > drivers/scsi/sr.c | 2 +- > include/linux/cdrom.h | 4 ++-- > 4 files changed, 5 insertions(+), 5 deletions(-) > > dif

Re: [f2fs-dev] [PATCH 02/31] cdrom: remove the unused bdev argument to cdrom_open

2023-06-06 Thread Phillip Potter
On Tue, Jun 06, 2023 at 09:39:21AM +0200, Christoph Hellwig wrote: > Signed-off-by: Christoph Hellwig > --- > drivers/cdrom/cdrom.c | 3 +-- > drivers/cdrom/gdrom.c | 2 +- > drivers/scsi/sr.c | 2 +- > include/linux/cdrom.h | 3 +-- > 4 files changed, 4 insertions(+), 6 deletions(-) > > dif

[f2fs-dev] [PATCH] f2fs: compress tmp files given extension

2023-06-06 Thread Jaegeuk Kim
Let's compress tmp files for the given extension list. Signed-off-by: Jaegeuk Kim --- fs/f2fs/namei.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c index 3e35eb7dbb8f..cdc94c8e60f7 100644 --- a/fs/f2fs/namei.c +++ b/fs/f2fs/namei.c @@ -161,

[f2fs-dev] [PATCH] f2fs-tools: fix wrong write pointer check for non-zoned areas

2023-06-06 Thread Daeho Jeong
From: Daeho Jeong Do not check F2FS_ZONED_HM for the whole device. We need to do this for each area of devices. Signed-off-by: Daeho Jeong --- fsck/mount.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fsck/mount.c b/fsck/mount.c index 851a62b..0ebbfcf 100644 --- a/

Re: [f2fs-dev] [PATCH] f2fs: enable nowait async buffered writes

2023-06-06 Thread Yangtao Li via Linux-f2fs-devel
On 2023/6/6 14:43, Chao Yu wrote: On 2023/5/31 22:40, Yangtao Li wrote: This adds the async buffered write support to f2fs, the following is the relevant test data. Yangtao, Could you please provide detailed test command? Use fio to test, the following is the configuration: # io_uring [g

Re: [f2fs-dev] decouple block open flags from fmode_t

2023-06-06 Thread Christoph Hellwig
On Tue, Jun 06, 2023 at 10:27:14AM +0200, Christian Brauner wrote: > On Tue, Jun 06, 2023 at 09:39:19AM +0200, Christoph Hellwig wrote: > > Hi all, > > > > this series adds a new blk_mode_t for block open flags instead of abusing > > Trying to look at this series applied but doesn't apply cleanly

Re: [f2fs-dev] [PATCH 25/31] ubd: remove commented out code in ubd_open

2023-06-06 Thread Richard Weinberger
- Ursprüngliche Mail - > Von: "hch" > This code has been dead forever, make sure it doesn't show up in code > searches. > > Signed-off-by: Christoph Hellwig > --- > arch/um/drivers/ubd_kern.c | 7 --- > 1 file changed, 7 deletions(-) > > diff --git a/arch/um/drivers/ubd_kern.c b/arch

Re: [f2fs-dev] [PATCH 23/31] mtd: block: use a simple bool to track open for write

2023-06-06 Thread Richard Weinberger
- Ursprüngliche Mail - > Von: "hch" > Instead of propagating the fmode_t, just use a bool to track if a mtd > block device was opened for writing. > > Signed-off-by: Christoph Hellwig > --- > drivers/mtd/mtd_blkdevs.c| 2 +- > drivers/mtd/mtdblock.c | 2 +- > include/linux/mtd/bl

Re: [f2fs-dev] decouple block open flags from fmode_t

2023-06-06 Thread Christian Brauner
On Tue, Jun 06, 2023 at 09:39:19AM +0200, Christoph Hellwig wrote: > Hi all, > > this series adds a new blk_mode_t for block open flags instead of abusing Trying to look at this series applied but doesn't apply cleanly for anything v6.4-rc* related. What tree is this on? ___

[f2fs-dev] [PATCH 28/31] block: replace fmode_t with a block-specific type for block open flags

2023-06-06 Thread Christoph Hellwig
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 --- arch/um/drivers/ubd_kern.

[f2fs-dev] [PATCH 30/31] block: store the holder in file->private_data

2023-06-06 Thread Christoph Hellwig
Store the file struct used as the holder in file->private_data as an indicator that this file descriptor was opened exclusively to remove the last use of FMODE_EXCL. Signed-off-by: Christoph Hellwig --- block/fops.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --gi

[f2fs-dev] [PATCH 31/31] fs: remove the now unused FMODE_* flags

2023-06-06 Thread Christoph Hellwig
FMODE_NDELAY, FMODE_EXCL and FMODE_WRITE_IOCTL were only used for block internal purposed and are now entirely unused, so remove them. Signed-off-by: Christoph Hellwig --- include/linux/fs.h | 7 --- 1 file changed, 7 deletions(-) diff --git a/include/linux/fs.h b/include/linux/fs.h index a

[f2fs-dev] [PATCH 29/31] block: always use I_BDEV on file->f_mapping->host to find the bdev

2023-06-06 Thread Christoph Hellwig
Always use I_BDEV(file->f_mapping->host) to find the bdev for a file to free up file->private_data for other uses. Signed-off-by: Christoph Hellwig --- block/fops.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/block/fops.c b/block/fops.c index 928c37a21

[f2fs-dev] [PATCH 25/31] ubd: remove commented out code in ubd_open

2023-06-06 Thread Christoph Hellwig
This code has been dead forever, make sure it doesn't show up in code searches. Signed-off-by: Christoph Hellwig --- arch/um/drivers/ubd_kern.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c index 8b79554968addb..20c1a16199c503 1

[f2fs-dev] [PATCH 26/31] block: move a few internal definitions out of blkdev.h

2023-06-06 Thread Christoph Hellwig
All these helpers are only used in core block code, so move them out of the public header. Signed-off-by: Christoph Hellwig --- block/blk.h| 23 +-- include/linux/blkdev.h | 27 --- 2 files changed, 21 insertions(+), 29 deletions(-) diff -

[f2fs-dev] [PATCH 27/31] block: remove unused fmode_t arguments from ioctl handlers

2023-06-06 Thread Christoph Hellwig
A few ioctl handlers have fmode_t arguments that are entirely unused, remove them. Signed-off-by: Christoph Hellwig --- block/blk-zoned.c | 4 ++-- block/blk.h | 6 +++--- block/ioctl.c | 14 +++--- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/block/blk-zo

[f2fs-dev] [PATCH 24/31] rnbd-srv: replace sess->open_flags with a "bool readonly"

2023-06-06 Thread Christoph Hellwig
Stop passing the fmode_t around and just use a simple bool to track if an export is read-only. Signed-off-by: Christoph Hellwig --- drivers/block/rnbd/rnbd-srv-sysfs.c | 3 +-- drivers/block/rnbd/rnbd-srv.c | 15 +++ drivers/block/rnbd/rnbd-srv.h | 2 +- 3 files changed

[f2fs-dev] [PATCH 22/31] nvme: replace the fmode_t argument to the nvme ioctl handlers with a simple bool

2023-06-06 Thread Christoph Hellwig
Instead of passing a fmode_t and only checking it fo0r FMODE_WRITE, pass a bool open_for_write to prepare for callers that won't have the fmode_t. Signed-off-by: Christoph Hellwig --- drivers/nvme/host/ioctl.c | 62 +-- 1 file changed, 34 insertions(+), 28 del

[f2fs-dev] [PATCH 16/31] block: use the holder as indication for exclusive opens

2023-06-06 Thread Christoph Hellwig
The current interface for exclusive opens is rather confusing as it requires both the FMODE_EXCL flag and a holder. Remove the need to pass FMODE_EXCL and just key off the exclusive open off a non-NULL holder. For blkdev_put this requires adding the holder argument, which provides better debug ch

[f2fs-dev] [PATCH 20/31] scsi: replace the fmode_t argument to scsi_ioctl with a simple bool

2023-06-06 Thread Christoph Hellwig
Instead of passing a fmode_t and only checking it for FMODE_WRITE, pass a bool open_for_write to prepare for callers that won't have the fmode_t. Signed-off-by: Christoph Hellwig --- drivers/scsi/ch.c | 3 ++- drivers/scsi/scsi_ioctl.c | 34 +- drivers/sc

[f2fs-dev] [PATCH 23/31] mtd: block: use a simple bool to track open for write

2023-06-06 Thread Christoph Hellwig
Instead of propagating the fmode_t, just use a bool to track if a mtd block device was opened for writing. Signed-off-by: Christoph Hellwig --- drivers/mtd/mtd_blkdevs.c| 2 +- drivers/mtd/mtdblock.c | 2 +- include/linux/mtd/blktrans.h | 2 +- 3 files changed, 3 insertions(+), 3 delet

[f2fs-dev] [PATCH 21/31] scsi: replace the fmode_t argument to ->sg_io_fn with a simple bool

2023-06-06 Thread Christoph Hellwig
Instead of passing a fmode_t and only checking it for FMODE_WRITE, pass a bool open_for_write to prepare for callers that won't have the fmode_t. Signed-off-by: Christoph Hellwig --- block/bsg-lib.c | 2 +- block/bsg.c | 8 +--- drivers/scsi/scsi_bsg.c | 4 ++-- include/l

[f2fs-dev] [PATCH 18/31] fs: remove sb->s_mode

2023-06-06 Thread Christoph Hellwig
There is no real need to store the open mode in the super_block now. It is only used by f2fs, which can easily recalculate it. Signed-off-by: Christoph Hellwig --- fs/f2fs/super.c| 10 ++ fs/nilfs2/super.c | 1 - fs/super.c | 2 -- include/linux/fs.h | 1 - 4 files change

[f2fs-dev] [PATCH 17/31] block: add a sb_open_mode helper

2023-06-06 Thread Christoph Hellwig
Add a helper to return the open flags for blkdev_get_by* for passed in super block flags instead of open coding the logic in many places. Signed-off-by: Christoph Hellwig --- fs/btrfs/super.c | 5 + fs/nilfs2/super.c | 7 ++- fs/super.c | 15 --- incl

[f2fs-dev] [PATCH 19/31] scsi: replace the fmode_t argument to scsi_cmd_allowed with a simple bool

2023-06-06 Thread Christoph Hellwig
Instead of passing a fmode_t and only checking it for FMODE_WRITE, pass a bool open_for_write to prepare for callers that won't have the fmode_t. Signed-off-by: Christoph Hellwig --- drivers/scsi/scsi_bsg.c | 2 +- drivers/scsi/scsi_ioctl.c | 8 drivers/scsi/sg.c | 2 +- inclu

[f2fs-dev] [PATCH 14/31] rnbd-srv: don't pass a holder for non-exclusive blkdev_get_by_path

2023-06-06 Thread Christoph Hellwig
Passing a holder to blkdev_get_by_path when FMODE_EXCL isn't set doesn't make sense, so pass NULL instead. Signed-off-by: Christoph Hellwig --- drivers/block/rnbd/rnbd-srv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/block/rnbd/rnbd-srv.c b/drivers/block/rnbd/rnb

[f2fs-dev] [PATCH 13/31] bcache: don't pass a stack address to blkdev_get_by_path

2023-06-06 Thread Christoph Hellwig
sb is just an on-stack pointer that can easily be reused by other calls. Switch to use the bcache-wide bcache_kobj instead as there is no need to claim per-bcache device anyway. Signed-off-by: Christoph Hellwig --- drivers/md/bcache/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[f2fs-dev] [PATCH 10/31] block: remove the unused mode argument to ->release

2023-06-06 Thread Christoph Hellwig
The mode argument to the ->release block_device_operation is never used, so remove it. Signed-off-by: Christoph Hellwig --- arch/um/drivers/ubd_kern.c | 4 ++-- arch/xtensa/platforms/iss/simdisk.c | 2 +- block/bdev.c| 14 +++--- drivers/block/amiflop.c

[f2fs-dev] [PATCH 15/31] btrfs: don't pass a holder for non-exclusive blkdev_get_by_path

2023-06-06 Thread Christoph Hellwig
Passing a holder to blkdev_get_by_path when FMODE_EXCL isn't set doesn't make sense, so pass NULL instead and remove the holder argument from the call chains the only end up in non-FMODE_EXCL blkdev_get_by_path calls. Signed-off-by: Christoph Hellwig --- fs/btrfs/super.c | 16 ++--

[f2fs-dev] [PATCH 12/31] swsusp: don't pass a stack address to blkdev_get_by_path

2023-06-06 Thread Christoph Hellwig
holder is just an on-stack pointer that can easily be reused by other calls, replace it with a static variable that doesn't change. Signed-off-by: Christoph Hellwig --- kernel/power/swap.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kernel/power/swap.c b/kernel/power

[f2fs-dev] [PATCH 11/31] block: rename blkdev_close to blkdev_release

2023-06-06 Thread Christoph Hellwig
Make the function name match the method name. Signed-off-by: Christoph Hellwig --- block/fops.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/fops.c b/block/fops.c index 6a3087b750a6cd..26af2b39c758e1 100644 --- a/block/fops.c +++ b/block/fops.c @@ -500,7 +500,7 @

[f2fs-dev] [PATCH 07/31] block: pass a gendisk on bdev_check_media_change

2023-06-06 Thread Christoph Hellwig
bdev_check_media_change should only ever be called for the whole device. Pass a gendisk to make that explicit and rename the function to disk_check_media_change. Signed-off-by: Christoph Hellwig --- block/disk-events.c | 18 +- drivers/block/amiflop.c | 2 +- drivers/block/a

[f2fs-dev] [PATCH 04/31] cdrom: remove the unused cdrom_close_write release code

2023-06-06 Thread Christoph Hellwig
cdrom_close_write is empty, and the for_data flag it is keyed off is never set. Remove all this clutter. Signed-off-by: Christoph Hellwig --- drivers/cdrom/cdrom.c | 15 --- include/linux/cdrom.h | 1 - 2 files changed, 16 deletions(-) diff --git a/drivers/cdrom/cdrom.c b/drivers/

[f2fs-dev] [PATCH 09/31] block: pass a gendisk to ->open

2023-06-06 Thread Christoph Hellwig
->open is only called on the whole device. Make that explicit by passing a gendisk instead of the block_device. Signed-off-by: Christoph Hellwig --- arch/um/drivers/ubd_kern.c | 5 ++--- arch/xtensa/platforms/iss/simdisk.c | 4 ++-- block/bdev.c| 2 +- driver

[f2fs-dev] [PATCH 03/31] cdrom: remove the unused mode argument to cdrom_ioctl

2023-06-06 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- drivers/cdrom/cdrom.c | 2 +- drivers/cdrom/gdrom.c | 2 +- drivers/scsi/sr.c | 2 +- include/linux/cdrom.h | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c index e3eab319cb0474..245e5bb

[f2fs-dev] [PATCH 05/31] cdrom: track if a cdrom_device_info was opened for data

2023-06-06 Thread Christoph Hellwig
Set a flag when a cdrom_device_info is opened for writing, instead of trying to figure out this at release time. This will allow to eventually remove the mode argument to the ->release block_device_operation as nothing but the CDROM drivers uses that argument. Signed-off-by: Christoph Hellwig --

[f2fs-dev] [PATCH 01/31] block: also call ->open for incremental partition opens

2023-06-06 Thread Christoph Hellwig
For whole devices ->open is called for each open, but for partitions it is only called on the first open of a partition. This is problematic as various block drivers look at open flags and might not do all setup for ioctl only or NDELAY opens. Signed-off-by: Christoph Hellwig --- block/bdev.c |

[f2fs-dev] decouple block open flags from fmode_t

2023-06-06 Thread Christoph Hellwig
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-

[f2fs-dev] [PATCH 08/31] block: share code between disk_check_media_change and disk_force_media_change

2023-06-06 Thread Christoph Hellwig
Factor the common logic between disk_check_media_change and disk_force_media_change into a helper. Signed-off-by: Christoph Hellwig --- block/disk-events.c | 37 - 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/block/disk-events.c b/block/disk

[f2fs-dev] [PATCH 06/31] cdrom: remove the unused mode argument to cdrom_release

2023-06-06 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- drivers/cdrom/cdrom.c | 2 +- drivers/cdrom/gdrom.c | 2 +- drivers/scsi/sr.c | 2 +- include/linux/cdrom.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c index adebac1bd210d9..998b03fe9

[f2fs-dev] [PATCH 02/31] cdrom: remove the unused bdev argument to cdrom_open

2023-06-06 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- drivers/cdrom/cdrom.c | 3 +-- drivers/cdrom/gdrom.c | 2 +- drivers/scsi/sr.c | 2 +- include/linux/cdrom.h | 3 +-- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c index 416f723a2dbb33..e3eab31