[f2fs-dev] [PATCH v3 1/2] f2fs: don't allow unaligned truncation to smaller/equal size on pinned file

2025-06-17 Thread wangzijie
To prevent scattered pin block generation, don't allow non-section aligned truncation to smaller or equal size on pinned file. But for truncation to larger size, after commit 3fdd89b452c2("f2fs: prevent writing without fallocate() for pinned files"), we only support overwrite IO to pinned file,

[f2fs-dev] [PATCH v3] f2fs: enable tuning of boost_zoned_gc_percent via sysfs

2025-06-17 Thread yohan.joung
to allow users to dynamically tune the boost_zoned_gc_percent parameter Signed-off-by: yohan.joung --- fs/f2fs/gc.h| 3 ++- fs/f2fs/sysfs.c | 7 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/gc.h b/fs/f2fs/gc.h index 5c1eaf55e127..11fba7636af7 100644 --- a/fs/

[f2fs-dev] Pytanie o samochód

2025-06-17 Thread Adam Drzewiecki via Linux-f2fs-devel
Dzień dobry, Czy interesuje Państwa rozwiązanie umożliwiające monitorowanie samochodów firmowych oraz optymalizację kosztów ich utrzymania? Pozdrawiam Adam Drzewiecki ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://

Re: [f2fs-dev] [PATCH 1/2] f2fs: avoid non-section-aligned size pinned file generation

2025-06-17 Thread wangzijie
> On 6/17/25 11:57, wangzijie wrote: > > To prevent non-section-aligned size pinned file generated from truncation, > > add check condition in setattr. > > > > Signed-off-by: wangzijie > > --- > > fs/f2fs/file.c | 6 ++ > > 1 file changed, 6 insertions(+) > > > > diff --git a/fs/f2fs/file.c

[f2fs-dev] [PATCH v2 1/2] f2fs: don't allow unaligned truncation to smaller size on pinned file

2025-06-17 Thread wangzijie
> To prevent scattered pin block generation, don't allow non-section aligned > truncation > to smaller size on pinned file. But for truncation to larger size, after > commit 3fdd89b452c2("f2fs: prevent writing without fallocate() for pinned > files"), > we only support overwrite IO to pinned file

Re: [f2fs-dev] [PATCH] f2fs: avoid splitting bio when reading multiple pages

2025-06-17 Thread Sheng Yong
On 6/17/25 19:37, Chao Yu via Linux-f2fs-devel wrote: On 6/17/25 13:55, Jianan Huang wrote: When fewer pages are read, nr_pages may be smaller than nr_cpages. Due to the nr_vecs limit, the compressed pages will be split into multiple bios and then merged at the block level. In this case, nr_cpag

[f2fs-dev] [PATCH v2 2/2] f2fs: cleanup F2FS_I_SB in f2fs_setattr()

2025-06-17 Thread wangzijie
After introduce sbi in f2fs_setattr(), cleanup F2FS_I_SB. No logic change. Signed-off-by: wangzijie --- fs/f2fs/file.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 09be6e849..3e610db59 100644 --- a/fs/f2fs/file.c +++ b/fs

[f2fs-dev] [PATCH v2 1/2] f2fs: don't allow unaligned truncation to smaller size on pinned file

2025-06-17 Thread wangzijie
To prevent scattered pin block generation, don't allow non-section aligned truncation to smaller size on pinned file. But for truncation to larger size, after commit 3fdd89b452c2("f2fs: prevent writing without fallocate() for pinned files"), we only support overwrite IO to pinned file, so we don'

Re: [f2fs-dev] [PATCH 00/10] convert the majority of file systems to mmap_prepare

2025-06-17 Thread Lorenzo Stoakes via Linux-f2fs-devel
On Tue, Jun 17, 2025 at 03:05:59PM +0100, David Howells wrote: > Lorenzo Stoakes wrote: > > > This is preferred to the existing f_op->mmap() hook as it does require a > > VMA to be established yet, > > Did you mean ".. doesn't require a VMA to be established yet, ..." > > David > Yeah apologies,

[f2fs-dev] [PATCH v3] f2fs_io: add test_create_perf command

2025-06-17 Thread Daniel Lee via Linux-f2fs-devel
A new command 'test_create_perf', has been introduced to measure the performance of creating and deleting many files. Signed-off-by: Daniel Lee --- v3: make sync optional for deletion phase v2: Rename command and make fsync optional --- tools/f2fs_io/f2fs_io.c | 146 +

Re: [f2fs-dev] [PATCH 00/10] convert the majority of file systems to mmap_prepare

2025-06-17 Thread Christian Brauner via Linux-f2fs-devel
On Mon, Jun 16, 2025 at 04:11:11PM -0700, Andrew Morton wrote: > On Mon, 16 Jun 2025 20:33:19 +0100 Lorenzo Stoakes > wrote: > > > I am basing this on the mm-new branch in Andrew's tree, so let me know if I > > should rebase anything here. Given the mm bits touched I did think perhaps > > we sho

Re: [f2fs-dev] [PATCH] f2fs: avoid splitting bio when reading multiple pages

2025-06-17 Thread Chao Yu via Linux-f2fs-devel
On 6/17/25 13:55, Jianan Huang wrote: > When fewer pages are read, nr_pages may be smaller than nr_cpages. Due > to the nr_vecs limit, the compressed pages will be split into multiple > bios and then merged at the block level. In this case, nr_cpages should > be used to pre-allocate bvecs. > > Sig

Re: [f2fs-dev] [PATCH v2] f2fs_io: add test_create_perf command

2025-06-17 Thread Daniel Lee via Linux-f2fs-devel
On Tue, Jun 17, 2025 at 2:33 PM Chao Yu wrote: > > On 6/14/25 07:05, Daniel Lee wrote: > > A new command 'test_create_perf', has been introduced to measure > > the performance of creating and deleting many files. > > > > Signed-off-by: Daniel Lee > > --- > > v2: Rename command and make fsync opti

Re: [f2fs-dev] [PATCH 00/10] convert the majority of file systems to mmap_prepare

2025-06-17 Thread David Howells via Linux-f2fs-devel
Lorenzo Stoakes wrote: > This is preferred to the existing f_op->mmap() hook as it does require a > VMA to be established yet, Did you mean ".. doesn't require a VMA to be established yet, ..." David ___ Linux-f2fs-devel mailing list Linux-f2fs-dev

Re: [f2fs-dev] [PATCH 08/10] fs: convert simple use of generic_file_*_mmap() to .mmap_prepare()

2025-06-17 Thread Dave Kleikamp via Linux-f2fs-devel
On 6/16/25 2:33PM, Lorenzo Stoakes wrote: Since commit c84bf6dd2b83 ("mm: introduce new .mmap_prepare() file callback"), the f_op->mmap() hook has been deprecated in favour of f_op->mmap_prepare(). We have provided generic .mmap_prepare() equivalents, so update all file systems that specify thes

Re: [f2fs-dev] [PATCH 00/10] convert the majority of file systems to mmap_prepare

2025-06-17 Thread Jeff Layton via Linux-f2fs-devel
On Mon, 2025-06-16 at 21:41 +0100, Al Viro wrote: > On Mon, Jun 16, 2025 at 08:33:19PM +0100, Lorenzo Stoakes wrote: > > REVIEWER'S NOTES > > > > > > I am basing this on the mm-new branch in Andrew's tree, so let me know if I > > should rebase anything here. Given the mm bits touc

Re: [f2fs-dev] [PATCH 00/10] convert the majority of file systems to mmap_prepare

2025-06-17 Thread Lorenzo Stoakes via Linux-f2fs-devel
On Tue, Jun 17, 2025 at 09:45:32AM -0400, Jeff Layton wrote: > On Mon, 2025-06-16 at 21:41 +0100, Al Viro wrote: > > On Mon, Jun 16, 2025 at 08:33:19PM +0100, Lorenzo Stoakes wrote: > > > REVIEWER'S NOTES > > > > > > > > > I am basing this on the mm-new branch in Andrew's tree, so

Re: [f2fs-dev] [External Mail]Re: [PATCH] f2fs: avoid splitting bio when reading multiple pages

2025-06-17 Thread Huang Jianan via Linux-f2fs-devel
On 2025/6/17 21:13, Sheng Yong wrote: > > On 6/17/25 19:37, Chao Yu via Linux-f2fs-devel wrote: >> On 6/17/25 13:55, Jianan Huang wrote: >>> When fewer pages are read, nr_pages may be smaller than nr_cpages. Due >>> to the nr_vecs limit, the compressed pages will be split into multiple >>> bios an

Re: [f2fs-dev] [PATCH 01/10] mm: rename call_mmap/mmap_prepare to vfs_mmap/mmap_prepare

2025-06-17 Thread Vlastimil Babka
On 6/16/25 21:33, Lorenzo Stoakes wrote: > The call_mmap() function violates the existing convention in > include/linux/fs.h whereby invocations of virtual file system hooks is > performed by functions prefixed with vfs_xxx(). > > Correct this by renaming call_mmap() to vfs_mmap(). This also avoid

Re: [f2fs-dev] [PATCH 02/10] mm/nommu: use file_has_valid_mmap_hooks() helper

2025-06-17 Thread Vlastimil Babka
On 6/16/25 21:33, Lorenzo Stoakes wrote: > Since commit c84bf6dd2b83 ("mm: introduce new .mmap_prepare() file > callback"), the f_op->mmap() hook has been deprecated in favour of > f_op->mmap_prepare(). > > Therefore, update the check for file operations supporting mmap() by using > the file_has_v

Re: [f2fs-dev] [PATCH 07/10] mm/filemap: introduce generic_file_*_mmap_prepare() helpers

2025-06-17 Thread Vlastimil Babka
On 6/16/25 21:33, Lorenzo Stoakes wrote: > Since commit c84bf6dd2b83 ("mm: introduce new .mmap_prepare() file > callback"), the f_op->mmap() hook has been deprecated in favour of > f_op->mmap_prepare(). > > The generic mmap handlers are very simple, so we can very easily convert > these in advance

[f2fs-dev] [PATCH] f2fs: Fix the typos in comments

2025-06-17 Thread Swarna Prabhu
This patch fixes minor typos in comments in f2fs. Signed-off-by: Swarna Prabhu --- fs/f2fs/f2fs.h | 6 +++--- fs/f2fs/node.h | 2 +- fs/f2fs/super.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 9333a22b9a01..fdf69330582b 100644 --

Re: [f2fs-dev] [PATCH] f2fs: Fix the typos in comments

2025-06-17 Thread Luis Chamberlain via Linux-f2fs-devel
On Tue, Jun 17, 2025 at 05:40:47PM +, Swarna Prabhu wrote: > This patch fixes minor typos in comments in f2fs. > > Signed-off-by: Swarna Prabhu Reviewed-by: Luis Chamberlain Luis ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.source

Re: [f2fs-dev] [PATCH 1/2] f2fs: avoid non-section-aligned size pinned file generation

2025-06-17 Thread Chao Yu via Linux-f2fs-devel
On 6/17/25 15:36, wangzijie wrote: >> On 6/17/25 11:57, wangzijie wrote: >>> To prevent non-section-aligned size pinned file generated from truncation, >>> add check condition in setattr. >>> >>> Signed-off-by: wangzijie >>> --- >>> fs/f2fs/file.c | 6 ++ >>> 1 file changed, 6 insertions(+) >

Re: [f2fs-dev] [PATCH 06/10] fs/xfs: transition from deprecated .mmap hook to .mmap_prepare

2025-06-17 Thread Christian Brauner via Linux-f2fs-devel
On Mon, Jun 16, 2025 at 10:08:03PM -0700, Christoph Hellwig wrote: > On Mon, Jun 16, 2025 at 08:33:25PM +0100, Lorenzo Stoakes wrote: > > STATIC int > > -xfs_file_mmap( > > - struct file *file, > > - struct vm_area_struct *vma) > > +xfs_file_mmap_prepare( > > + struct vm_area_d

Re: [f2fs-dev] [PATCH 03/10] fs: consistently use file_has_valid_mmap_hooks() helper

2025-06-17 Thread Christian Brauner via Linux-f2fs-devel
On Tue, Jun 17, 2025 at 12:08:13PM +0200, Jan Kara wrote: > On Tue 17-06-25 06:25:34, Lorenzo Stoakes wrote: > > On Mon, Jun 16, 2025 at 10:11:28PM -0700, Christoph Hellwig wrote: > > > On Mon, Jun 16, 2025 at 08:33:22PM +0100, Lorenzo Stoakes wrote: > > > > Since commit c84bf6dd2b83 ("mm: introduc

Re: [f2fs-dev] [PATCH 04/10] fs/dax: make it possible to check dev dax support without a VMA

2025-06-17 Thread Christian Brauner via Linux-f2fs-devel
On Mon, Jun 16, 2025 at 09:26:54PM +0100, Matthew Wilcox wrote: > On Mon, Jun 16, 2025 at 08:33:23PM +0100, Lorenzo Stoakes wrote: > > fs/ext4/file.c | 2 +- > > fs/xfs/xfs_file.c | 3 ++- > > Both of these already have the inode from the file ... > > > +static inline bool daxdev_mapping

Re: [f2fs-dev] [PATCH 09/10] fs: convert most other generic_file_*mmap() users to .mmap_prepare()

2025-06-17 Thread Christian Brauner via Linux-f2fs-devel
On Tue, Jun 17, 2025 at 12:23:41PM +0200, Jan Kara wrote: > On Mon 16-06-25 20:33:28, Lorenzo Stoakes wrote: > > Update nearly all generic_file_mmap() and generic_file_readonly_mmap() > > callers to use generic_file_mmap_prepare() and > > generic_file_readonly_mmap_prepare() respectively. > > > >

Re: [f2fs-dev] [PATCH 02/10] mm/nommu: use file_has_valid_mmap_hooks() helper

2025-06-17 Thread Jan Kara
On Mon 16-06-25 20:33:21, Lorenzo Stoakes wrote: > Since commit c84bf6dd2b83 ("mm: introduce new .mmap_prepare() file > callback"), the f_op->mmap() hook has been deprecated in favour of > f_op->mmap_prepare(). > > Therefore, update the check for file operations supporting mmap() by using > the fi

Re: [f2fs-dev] [PATCH 05/10] fs/ext4: transition from deprecated .mmap hook to .mmap_prepare

2025-06-17 Thread Jan Kara
On Mon 16-06-25 20:33:24, Lorenzo Stoakes wrote: > Since commit c84bf6dd2b83 ("mm: introduce new .mmap_prepare() file > callback"), the f_op->mmap() hook has been deprecated in favour of > f_op->mmap_prepare(). > > This callback is invoked in the mmap() logic far earlier, so error handling > can b

Re: [f2fs-dev] [PATCH 07/10] mm/filemap: introduce generic_file_*_mmap_prepare() helpers

2025-06-17 Thread Jan Kara
On Mon 16-06-25 20:33:26, Lorenzo Stoakes wrote: > Since commit c84bf6dd2b83 ("mm: introduce new .mmap_prepare() file > callback"), the f_op->mmap() hook has been deprecated in favour of > f_op->mmap_prepare(). > > The generic mmap handlers are very simple, so we can very easily convert > these in

Re: [f2fs-dev] [PATCH 08/10] fs: convert simple use of generic_file_*_mmap() to .mmap_prepare()

2025-06-17 Thread Jan Kara
On Mon 16-06-25 20:33:27, Lorenzo Stoakes wrote: > Since commit c84bf6dd2b83 ("mm: introduce new .mmap_prepare() file > callback"), the f_op->mmap() hook has been deprecated in favour of > f_op->mmap_prepare(). > > We have provided generic .mmap_prepare() equivalents, so update all file > systems

Re: [f2fs-dev] [PATCH 10/10] fs: replace mmap hook with .mmap_prepare for simple mappings

2025-06-17 Thread Jan Kara
On Mon 16-06-25 20:33:29, Lorenzo Stoakes wrote: > Since commit c84bf6dd2b83 ("mm: introduce new .mmap_prepare() file > callback"), the f_op->mmap() hook has been deprecated in favour of > f_op->mmap_prepare(). > > This callback is invoked in the mmap() logic far earlier, so error handling > can b

Re: [f2fs-dev] [PATCH 03/10] fs: consistently use file_has_valid_mmap_hooks() helper

2025-06-17 Thread Jan Kara
On Tue 17-06-25 06:25:34, Lorenzo Stoakes wrote: > On Mon, Jun 16, 2025 at 10:11:28PM -0700, Christoph Hellwig wrote: > > On Mon, Jun 16, 2025 at 08:33:22PM +0100, Lorenzo Stoakes wrote: > > > Since commit c84bf6dd2b83 ("mm: introduce new .mmap_prepare() file > > > callback"), the f_op->mmap() hook

Re: [f2fs-dev] [PATCH 1/2] f2fs: avoid non-section-aligned size pinned file generation

2025-06-17 Thread wangzijie
>On 6/17/25 15:36, wangzijie wrote: >>> On 6/17/25 11:57, wangzijie wrote: To prevent non-section-aligned size pinned file generated from truncation, add check condition in setattr. Signed-off-by: wangzijie --- fs/f2fs/file.c | 6 ++ 1 file changed, 6 insert

Re: [f2fs-dev] [PATCH 09/10] fs: convert most other generic_file_*mmap() users to .mmap_prepare()

2025-06-17 Thread Jan Kara
On Mon 16-06-25 20:33:28, Lorenzo Stoakes wrote: > Update nearly all generic_file_mmap() and generic_file_readonly_mmap() > callers to use generic_file_mmap_prepare() and > generic_file_readonly_mmap_prepare() respectively. > > We update blkdev, 9p, afs, erofs, ext2, nfs, ntfs3, smb, ubifs and vbo

Re: [f2fs-dev] [PATCH 10/10] fs: replace mmap hook with .mmap_prepare for simple mappings

2025-06-17 Thread Christian Brauner via Linux-f2fs-devel
On Tue, Jun 17, 2025 at 12:28:17PM +0200, Jan Kara wrote: > On Mon 16-06-25 20:33:29, Lorenzo Stoakes wrote: > > Since commit c84bf6dd2b83 ("mm: introduce new .mmap_prepare() file > > callback"), the f_op->mmap() hook has been deprecated in favour of > > f_op->mmap_prepare(). > > > > This callback

Re: [f2fs-dev] [PATCH 00/10] convert the majority of file systems to mmap_prepare

2025-06-17 Thread Christian Brauner via Linux-f2fs-devel
On Mon, 16 Jun 2025 20:33:19 +0100, Lorenzo Stoakes wrote: > REVIEWER'S NOTES > > > I am basing this on the mm-new branch in Andrew's tree, so let me know if I > should rebase anything here. Given the mm bits touched I did think perhaps > we should take it through the mm tree, how