[f2fs-dev] [PATCH] f2fs-tools: fix cannot get bdev information

2022-06-16 Thread Ben Chang
Some device like android phone doesn't show the dev number path in /dev/block/, but most of devices show in /sys/dev/block Signed-off-by: Ben Chang --- tools/fibmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/fibmap.c b/tools/fibmap.c index 3238f29..9f94b53 100644

Re: [f2fs-dev] [PATCH] Fix file too large causing overflow

2022-06-16 Thread Chao Yu
On 2022/6/17 1:17, Jaegeuk Kim wrote: On 06/16, Dylan Chang wrote: fibmap: Fix file too large causing file_pos overflow fibmap show file_pos with incorrectly value when passing a large file. Before: file info--- /data/media/0/data1 : ---

Re: [f2fs-dev] [PATCH] f2fs: fix iostat related lock protection

2022-06-16 Thread Chao Yu
On 2022/6/17 0:22, Jaegeuk Kim wrote: On 06/16, Chao Yu wrote: On 2022/6/16 0:54, Jaegeuk Kim wrote: On 06/15, Chao Yu wrote: On 2022/6/11 2:32, Daeho Jeong wrote: From: Daeho Jeong Made iostat related locks safe to be called from irq context again. Will be better to add a 'Fixes' line?

[f2fs-dev] [man-pages RFC PATCH] statx.2, open.2: document STATX_DIOALIGN

2022-06-16 Thread Eric Biggers
From: Eric Biggers Document the proposed STATX_DIOALIGN support for statx() (https://lore.kernel.org/linux-fsdevel/[email protected]). Signed-off-by: Eric Biggers --- man2/open.2 | 43 --- man2/statx.2 | 32

[f2fs-dev] [PATCH v3 2/8] vfs: support STATX_DIOALIGN on block devices

2022-06-16 Thread Eric Biggers
From: Eric Biggers Add support for STATX_DIOALIGN to block devices, so that direct I/O alignment restrictions are exposed to userspace in a generic way. Note that this breaks the tradition of stat operating only on the block device node, not the block device itself. However, it was felt that do

[f2fs-dev] [PATCH v3 3/8] fscrypt: change fscrypt_dio_supported() to prepare for STATX_DIOALIGN

2022-06-16 Thread Eric Biggers
From: Eric Biggers To prepare for STATX_DIOALIGN support, make two changes to fscrypt_dio_supported(). First, remove the filesystem-block-alignment check and make the filesystems handle it instead. It previously made sense to have it in fs/crypto/; however, to support STATX_DIOALIGN the alignme

[f2fs-dev] [PATCH v3 5/8] f2fs: move f2fs_force_buffered_io() into file.c

2022-06-16 Thread Eric Biggers
From: Eric Biggers f2fs_force_buffered_io() is only used in file.c, so move it into there. No behavior change. This makes it easier to review later patches. Signed-off-by: Eric Biggers --- fs/f2fs/f2fs.h | 45 - fs/f2fs/file.c | 45 +

[f2fs-dev] [PATCH v3 0/8] make statx() return DIO alignment information

2022-06-16 Thread Eric Biggers
This patchset makes the statx() system call return direct I/O (DIO) alignment information. This allows userspace to easily determine whether a file supports DIO, and if so with what alignment restrictions. Patch 1 adds the basic VFS support for STATX_DIOALIGN. Patch 2 wires it up for all block d

[f2fs-dev] [PATCH v3 7/8] f2fs: simplify f2fs_force_buffered_io()

2022-06-16 Thread Eric Biggers
From: Eric Biggers f2fs only allows direct I/O that is aligned to the filesystem block size. Given that fact, simplify f2fs_force_buffered_io() by removing the redundant call to block_unaligned_IO(). This makes it easier to reuse this code for STATX_DIOALIGN. Signed-off-by: Eric Biggers ---

[f2fs-dev] [PATCH v3 1/8] statx: add direct I/O alignment information

2022-06-16 Thread Eric Biggers
From: Eric Biggers Traditionally, the conditions for when DIO (direct I/O) is supported were fairly simple. For both block devices and regular files, DIO had to be aligned to the logical block size of the block device. However, due to filesystem features that have been added over time (e.g. mul

[f2fs-dev] [PATCH v3 6/8] f2fs: don't allow DIO reads but not DIO writes

2022-06-16 Thread Eric Biggers
From: Eric Biggers Currently, if an f2fs filesystem is mounted with the mode=lfs and io_bits mount options, DIO reads are allowed but DIO writes are not. Allowing DIO reads but not DIO writes is an unusual restriction, which is likely to be surprising to applications, namely any application that

[f2fs-dev] [PATCH v3 4/8] ext4: support STATX_DIOALIGN

2022-06-16 Thread Eric Biggers
From: Eric Biggers Add support for STATX_DIOALIGN to ext4, so that direct I/O alignment restrictions are exposed to userspace in a generic way. Signed-off-by: Eric Biggers --- fs/ext4/ext4.h | 1 + fs/ext4/file.c | 15 --- fs/ext4/inode.c | 29 + 3 fi

[f2fs-dev] [PATCH v3 8/8] f2fs: support STATX_DIOALIGN

2022-06-16 Thread Eric Biggers
From: Eric Biggers Add support for STATX_DIOALIGN to f2fs, so that direct I/O alignment restrictions are exposed to userspace in a generic way. Signed-off-by: Eric Biggers --- fs/f2fs/file.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c in

Re: [f2fs-dev] [PATCH] Fix file too large causing overflow

2022-06-16 Thread Jaegeuk Kim
On 06/16, Dylan Chang wrote: > fibmap: Fix file too large causing file_pos overflow > > fibmap show file_pos with incorrectly value when passing a large file. > > Before: > > file info--- > /data/media/0/data1 : > > dev

Re: [f2fs-dev] [GIT PULL] f2fs for 5.18

2022-06-16 Thread Jaegeuk Kim
On 06/15, Pavel Machek wrote: > Hi! > > > > > AFAICS, the read-unfair rwsem code is created to resolve a potential > > > > lock starvation problem that they found on linux-5.10.y stable tree. I > > > > believe I have fixed that in the v5.11 kernel, see commit 2f06f702925 > > > > ("locking/rwsem: P

Re: [f2fs-dev] [PATCH] f2fs: fix iostat related lock protection

2022-06-16 Thread Jaegeuk Kim
On 06/16, Chao Yu wrote: > On 2022/6/16 0:54, Jaegeuk Kim wrote: > > On 06/15, Chao Yu wrote: > > > On 2022/6/11 2:32, Daeho Jeong wrote: > > > > From: Daeho Jeong > > > > > > > > Made iostat related locks safe to be called from irq context again. > > > > > > > > > > Will be better to add a 'Fi