Re: [f2fs-dev] [PATCH 1/2] f2fs: swap: remove dead codes

2021-05-26 Thread Chao Yu
On 2021/5/27 9:40, Jaegeuk Kim wrote: On 05/26, Chao Yu wrote: On 2021/5/26 21:30, Jaegeuk Kim wrote: On 05/26, Chao Yu wrote: After commit af4b6b8edf6a ("f2fs: introduce check_swap_activate_fast()"), we will never run into original logic of check_swap_activate() before f2fs supports non

Re: [f2fs-dev] [PATCH v6] f2fs: compress: add compress_inode to cache compressed blocks

2021-05-26 Thread Chao Yu
On 2021/5/27 9:41, Jaegeuk Kim wrote: On 05/27, Chao Yu wrote: On 2021/5/27 9:29, Jaegeuk Kim wrote: On 05/27, Chao Yu wrote: On 2021/5/26 23:46, Jaegeuk Kim wrote: On 05/26, Chao Yu wrote: On 2021/5/26 21:26, Jaegeuk Kim wrote: On 05/26, Chao Yu wrote: On 2021/5/25 22:01, Jaegeuk Kim

Re: [f2fs-dev] [PATCH v6] f2fs: compress: add compress_inode to cache compressed blocks

2021-05-26 Thread Jaegeuk Kim
On 05/27, Chao Yu wrote: > On 2021/5/27 9:29, Jaegeuk Kim wrote: > > On 05/27, Chao Yu wrote: > > > On 2021/5/26 23:46, Jaegeuk Kim wrote: > > > > On 05/26, Chao Yu wrote: > > > > > On 2021/5/26 21:26, Jaegeuk Kim wrote: > > > > > > On 05/26, Chao Yu wrote: > > > > > > > On 2021/5/25 22:01,

Re: [f2fs-dev] [PATCH 1/2] f2fs: swap: remove dead codes

2021-05-26 Thread Jaegeuk Kim
On 05/26, Chao Yu wrote: > On 2021/5/26 21:30, Jaegeuk Kim wrote: > > On 05/26, Chao Yu wrote: > > > After commit af4b6b8edf6a ("f2fs: introduce check_swap_activate_fast()"), > > > we will never run into original logic of check_swap_activate() before > > > f2fs supports non 4k-sized page, so let's

Re: [f2fs-dev] [PATCH v6] f2fs: compress: add compress_inode to cache compressed blocks

2021-05-26 Thread Chao Yu
On 2021/5/27 9:29, Jaegeuk Kim wrote: On 05/27, Chao Yu wrote: On 2021/5/26 23:46, Jaegeuk Kim wrote: On 05/26, Chao Yu wrote: On 2021/5/26 21:26, Jaegeuk Kim wrote: On 05/26, Chao Yu wrote: On 2021/5/25 22:01, Jaegeuk Kim wrote: On 05/25, Chao Yu wrote: On 2021/5/25 21:02, Jaegeuk Kim

Re: [f2fs-dev] [PATCH 2/2 v3] f2fs: support RO feature

2021-05-26 Thread Jaegeuk Kim
On 05/27, Chao Yu wrote: > On 2021/5/26 22:43, Jaegeuk Kim wrote: > > Given RO feature in superblock, we don't need to check provisioning/reserve > > spaces and SSA area. > > > > Signed-off-by: Jaegeuk Kim > > --- > > Change log from v2: > > - allow curseg updates > > - fix some bugs > > >

Re: [f2fs-dev] [PATCH v6] f2fs: compress: add compress_inode to cache compressed blocks

2021-05-26 Thread Jaegeuk Kim
On 05/27, Chao Yu wrote: > On 2021/5/26 23:46, Jaegeuk Kim wrote: > > On 05/26, Chao Yu wrote: > > > On 2021/5/26 21:26, Jaegeuk Kim wrote: > > > > On 05/26, Chao Yu wrote: > > > > > On 2021/5/25 22:01, Jaegeuk Kim wrote: > > > > > > On 05/25, Chao Yu wrote: > > > > > > > On 2021/5/25 21:02,

Re: [f2fs-dev] [PATCH v6] f2fs: compress: add compress_inode to cache compressed blocks

2021-05-26 Thread Chao Yu
On 2021/5/26 23:46, Jaegeuk Kim wrote: On 05/26, Chao Yu wrote: On 2021/5/26 21:26, Jaegeuk Kim wrote: On 05/26, Chao Yu wrote: On 2021/5/25 22:01, Jaegeuk Kim wrote: On 05/25, Chao Yu wrote: On 2021/5/25 21:02, Jaegeuk Kim wrote: On 05/25, Jaegeuk Kim wrote: On 05/25, Chao Yu wrote:

Re: [f2fs-dev] [PATCH 2/2 v3] f2fs: support RO feature

2021-05-26 Thread Chao Yu
On 2021/5/26 22:43, Jaegeuk Kim wrote: Given RO feature in superblock, we don't need to check provisioning/reserve spaces and SSA area. Signed-off-by: Jaegeuk Kim --- Change log from v2: - allow curseg updates - fix some bugs fs/f2fs/f2fs.h| 2 ++ fs/f2fs/segment.c | 4

[f2fs-dev] [PATCH] f2fs: logging neatening

2021-05-26 Thread Joe Perches
Update the logging uses that have unnecessary newlines as the f2fs_printk function and so its f2fs_ macro callers already adds one. This allows searching single line logging entries with an easier grep and also avoids unnecessary blank lines in the logging. Miscellanea: o Coalesce formats o

Re: [f2fs-dev] [PATCH v6] f2fs: compress: add compress_inode to cache compressed blocks

2021-05-26 Thread Jaegeuk Kim
On 05/26, Chao Yu wrote: > On 2021/5/26 21:26, Jaegeuk Kim wrote: > > On 05/26, Chao Yu wrote: > > > On 2021/5/25 22:01, Jaegeuk Kim wrote: > > > > On 05/25, Chao Yu wrote: > > > > > On 2021/5/25 21:02, Jaegeuk Kim wrote: > > > > > > On 05/25, Jaegeuk Kim wrote: > > > > > > > On 05/25, Chao Yu

Re: [f2fs-dev] [PATCH 2/2] f2fs: support RO feature

2021-05-26 Thread Jaegeuk Kim
On 05/26, Chao Yu wrote: > On 2021/5/26 21:58, Jaegeuk Kim wrote: > > On 05/26, Chao Yu wrote: > > > On 2021/5/22 3:02, Jaegeuk Kim wrote: > > > > Given RO feature in superblock, we don't need to check > > > > provisioning/reserve > > > > spaces and SSA area. > > > > > > > > Signed-off-by:

Re: [f2fs-dev] [PATCH 07/13] xfs: Convert to use invalidate_lock

2021-05-26 Thread Darrick J. Wong
On Wed, May 26, 2021 at 12:18:40PM +0200, Jan Kara wrote: > On Tue 25-05-21 14:37:29, Darrick J. Wong wrote: > > On Tue, May 25, 2021 at 03:50:44PM +0200, Jan Kara wrote: > > > Use invalidate_lock instead of XFS internal i_mmap_lock. The intended > > > purpose of invalidate_lock is exactly the

Re: [f2fs-dev] [PATCH 04/13] mm: Add functions to lock invalidate_lock for two mappings

2021-05-26 Thread Darrick J. Wong
On Wed, May 26, 2021 at 03:45:18PM +0200, Jan Kara wrote: > On Wed 26-05-21 12:11:43, Damien Le Moal wrote: > > On 2021/05/26 19:07, Jan Kara wrote: > > > On Tue 25-05-21 13:48:05, Darrick J. Wong wrote: > > >> On Tue, May 25, 2021 at 03:50:41PM +0200, Jan Kara wrote: > > >>> Some operations such

Re: [f2fs-dev] [PATCH 2/2] f2fs: support RO feature

2021-05-26 Thread Chao Yu
On 2021/5/26 21:58, Jaegeuk Kim wrote: On 05/26, Chao Yu wrote: On 2021/5/22 3:02, Jaegeuk Kim wrote: Given RO feature in superblock, we don't need to check provisioning/reserve spaces and SSA area. Signed-off-by: Jaegeuk Kim --- fs/f2fs/f2fs.h| 2 ++ fs/f2fs/segment.c | 3 +++

Re: [f2fs-dev] [PATCH 1/2] f2fs: swap: remove dead codes

2021-05-26 Thread Chao Yu
On 2021/5/26 21:30, Jaegeuk Kim wrote: On 05/26, Chao Yu wrote: After commit af4b6b8edf6a ("f2fs: introduce check_swap_activate_fast()"), we will never run into original logic of check_swap_activate() before f2fs supports non 4k-sized page, so let's delete those dead codes. Why not keeping

Re: [f2fs-dev] [PATCH v6] f2fs: compress: add compress_inode to cache compressed blocks

2021-05-26 Thread Chao Yu
On 2021/5/26 21:26, Jaegeuk Kim wrote: On 05/26, Chao Yu wrote: On 2021/5/25 22:01, Jaegeuk Kim wrote: On 05/25, Chao Yu wrote: On 2021/5/25 21:02, Jaegeuk Kim wrote: On 05/25, Jaegeuk Kim wrote: On 05/25, Chao Yu wrote: Also, and queue this? Easy to get this? need GFP_NOFS? Not

Re: [f2fs-dev] [PATCH 2/2 v3] f2fs: support RO feature

2021-05-26 Thread Jaegeuk Kim
Given RO feature in superblock, we don't need to check provisioning/reserve spaces and SSA area. Signed-off-by: Jaegeuk Kim --- Change log from v2: - allow curseg updates - fix some bugs fs/f2fs/f2fs.h| 2 ++ fs/f2fs/segment.c | 4 fs/f2fs/super.c | 37

Re: [f2fs-dev] [PATCH 2/2 v2] f2fs: support RO feature

2021-05-26 Thread Jaegeuk Kim
On 05/26, Jaegeuk Kim wrote: > Given RO feature in superblock, we don't need to check provisioning/reserve > spaces and SSA area. > > Signed-off-by: Jaegeuk Kim > --- > fs/f2fs/f2fs.h| 2 ++ > fs/f2fs/segment.c | 4 > fs/f2fs/super.c | 35 ++- > 3

Re: [f2fs-dev] [PATCH 1/2] f2fs: immutable file can have null address in compressed chunk

2021-05-26 Thread Jaegeuk Kim
On 05/26, Chao Yu wrote: > On 2021/5/22 3:02, Jaegeuk Kim wrote: > > If we released compressed blocks having an immutable bit, we can see less > > number of compressed block addresses. Let's fix wrong BUG_ON. > > > > Signed-off-by: Jaegeuk Kim > > It looks it will be better to merge this into >

Re: [f2fs-dev] [PATCH 2/2 v2] f2fs: support RO feature

2021-05-26 Thread Jaegeuk Kim
Given RO feature in superblock, we don't need to check provisioning/reserve spaces and SSA area. Signed-off-by: Jaegeuk Kim --- fs/f2fs/f2fs.h| 2 ++ fs/f2fs/segment.c | 4 fs/f2fs/super.c | 35 ++- 3 files changed, 36 insertions(+), 5 deletions(-)

Re: [f2fs-dev] [PATCH 2/2] f2fs: support RO feature

2021-05-26 Thread Jaegeuk Kim
On 05/26, Chao Yu wrote: > On 2021/5/22 3:02, Jaegeuk Kim wrote: > > Given RO feature in superblock, we don't need to check provisioning/reserve > > spaces and SSA area. > > > > Signed-off-by: Jaegeuk Kim > > --- > > fs/f2fs/f2fs.h| 2 ++ > > fs/f2fs/segment.c | 3 +++ > >

Re: [f2fs-dev] [PATCH 04/13] mm: Add functions to lock invalidate_lock for two mappings

2021-05-26 Thread Jan Kara
On Wed 26-05-21 12:11:43, Damien Le Moal wrote: > On 2021/05/26 19:07, Jan Kara wrote: > > On Tue 25-05-21 13:48:05, Darrick J. Wong wrote: > >> On Tue, May 25, 2021 at 03:50:41PM +0200, Jan Kara wrote: > >>> Some operations such as reflinking blocks among files will need to lock > >>>

Re: [f2fs-dev] [PATCH 07/13] xfs: Convert to use invalidate_lock

2021-05-26 Thread Jan Kara
On Wed 26-05-21 12:20:59, Jan Kara wrote: > On Wed 26-05-21 07:40:41, Dave Chinner wrote: > > On Tue, May 25, 2021 at 03:50:44PM +0200, Jan Kara wrote: > > > Use invalidate_lock instead of XFS internal i_mmap_lock. The intended > > > purpose of invalidate_lock is exactly the same. Note that the

Re: [f2fs-dev] [PATCH 1/2] f2fs: swap: remove dead codes

2021-05-26 Thread Jaegeuk Kim
On 05/26, Chao Yu wrote: > After commit af4b6b8edf6a ("f2fs: introduce check_swap_activate_fast()"), > we will never run into original logic of check_swap_activate() before > f2fs supports non 4k-sized page, so let's delete those dead codes. Why not keeping this for large page support in future

Re: [f2fs-dev] [PATCH v6] f2fs: compress: add compress_inode to cache compressed blocks

2021-05-26 Thread Jaegeuk Kim
On 05/26, Chao Yu wrote: > On 2021/5/25 22:01, Jaegeuk Kim wrote: > > On 05/25, Chao Yu wrote: > > > On 2021/5/25 21:02, Jaegeuk Kim wrote: > > > > On 05/25, Jaegeuk Kim wrote: > > > > > On 05/25, Chao Yu wrote: > > > > > > Also, and queue this? > > > > > > > > > > Easy to get this? > > > > > >

Re: [f2fs-dev] [PATCH 04/13] mm: Add functions to lock invalidate_lock for two mappings

2021-05-26 Thread Damien Le Moal
On 2021/05/26 19:07, Jan Kara wrote: > On Tue 25-05-21 13:48:05, Darrick J. Wong wrote: >> On Tue, May 25, 2021 at 03:50:41PM +0200, Jan Kara wrote: >>> Some operations such as reflinking blocks among files will need to lock >>> invalidate_lock for two mappings. Add helper functions to do that.

Re: [f2fs-dev] [PATCH 07/13] xfs: Convert to use invalidate_lock

2021-05-26 Thread Jan Kara
On Wed 26-05-21 07:40:41, Dave Chinner wrote: > On Tue, May 25, 2021 at 03:50:44PM +0200, Jan Kara wrote: > > Use invalidate_lock instead of XFS internal i_mmap_lock. The intended > > purpose of invalidate_lock is exactly the same. Note that the locking in > > __xfs_filemap_fault() slightly

Re: [f2fs-dev] [PATCH 07/13] xfs: Convert to use invalidate_lock

2021-05-26 Thread Jan Kara
On Tue 25-05-21 14:37:29, Darrick J. Wong wrote: > On Tue, May 25, 2021 at 03:50:44PM +0200, Jan Kara wrote: > > Use invalidate_lock instead of XFS internal i_mmap_lock. The intended > > purpose of invalidate_lock is exactly the same. Note that the locking in > > __xfs_filemap_fault() slightly

Re: [f2fs-dev] [PATCH 04/13] mm: Add functions to lock invalidate_lock for two mappings

2021-05-26 Thread Jan Kara
On Tue 25-05-21 13:48:05, Darrick J. Wong wrote: > On Tue, May 25, 2021 at 03:50:41PM +0200, Jan Kara wrote: > > Some operations such as reflinking blocks among files will need to lock > > invalidate_lock for two mappings. Add helper functions to do that. > > > > Signed-off-by: Jan Kara > > ---

Re: [f2fs-dev] [PATCH 03/13] mm: Protect operations adding pages to page cache with invalidate_lock

2021-05-26 Thread Jan Kara
On Tue 25-05-21 14:01:49, Darrick J. Wong wrote: > On Tue, May 25, 2021 at 03:50:40PM +0200, Jan Kara wrote: > > Currently, serializing operations such as page fault, read, or readahead > > against hole punching is rather difficult. The basic race scheme is > > like: > > > >

Re: [f2fs-dev] [PATCH 10/13] f2fs: Convert to using invalidate_lock

2021-05-26 Thread Chao Yu
On 2021/5/25 21:50, Jan Kara wrote: Use invalidate_lock instead of f2fs' private i_mmap_sem. The intended purpose is exactly the same. By this conversion we fix a long standing race between hole punching and read(2) / readahead(2) paths that can lead to stale page cache contents. CC: Jaegeuk

Re: [f2fs-dev] [PATCH 2/2] f2fs: support RO feature

2021-05-26 Thread Chao Yu
On 2021/5/22 3:02, Jaegeuk Kim wrote: Given RO feature in superblock, we don't need to check provisioning/reserve spaces and SSA area. Signed-off-by: Jaegeuk Kim --- fs/f2fs/f2fs.h| 2 ++ fs/f2fs/segment.c | 3 +++ fs/f2fs/super.c | 35 +++ 3 files

Re: [f2fs-dev] [PATCH 1/2] f2fs: immutable file can have null address in compressed chunk

2021-05-26 Thread Chao Yu
On 2021/5/22 3:02, Jaegeuk Kim wrote: If we released compressed blocks having an immutable bit, we can see less number of compressed block addresses. Let's fix wrong BUG_ON. Signed-off-by: Jaegeuk Kim It looks it will be better to merge this into ("f2fs: compress: remove unneeded

Re: [f2fs-dev] [PATCH 1/2] f2fs: let's allow compression for mmap files

2021-05-26 Thread Chao Yu
On 2021/5/26 4:49, Jaegeuk Kim wrote: This patch allows to compress mmap files. E.g., for so files. Signed-off-by: Jaegeuk Kim Reviewed-by: Chao Yu Thanks, ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net

Re: [f2fs-dev] [PATCH 1/2] f2fs_io: add to show immutable bit

2021-05-26 Thread Chao Yu
On 2021/5/22 3:00, Jaegeuk Kim wrote: Signed-off-by: Jaegeuk Kim Reviewed-by: Chao Yu Thanks, ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

[f2fs-dev] [PATCH v2 2/2] f2fs: swap: support migrating swapfile in aligned write mode

2021-05-26 Thread Chao Yu
This patch supports to migrate swapfile in aligned write mode during swapon in order to keep swapfile being aligned to section as much as possible, then pinned swapfile will locates fully filled section which may not affected by GC. However, for the case that swapfile's size is not aligned to

Re: [f2fs-dev] [PATCH v6] f2fs: compress: add compress_inode to cache compressed blocks

2021-05-26 Thread Chao Yu
On 2021/5/25 22:01, Jaegeuk Kim wrote: On 05/25, Chao Yu wrote: On 2021/5/25 21:02, Jaegeuk Kim wrote: On 05/25, Jaegeuk Kim wrote: On 05/25, Chao Yu wrote: Also, and queue this? Easy to get this? need GFP_NOFS? Not sure, I use __GFP_IO intentionally here to avoid __GFP_RECLAIM from

Re: [f2fs-dev] [PATCH v8 0/8] add support for direct I/O with fscrypt using blk-crypto

2021-05-26 Thread Lee Jones
On Tue, 25 May 2021, Satya Tangirala wrote: 65;6200;1c > On Tue, May 25, 2021 at 01:57:28PM +0100, Lee Jones wrote: > > On Thu, 21 Jan 2021 at 23:06, Satya Tangirala wrote: > > > > > This patch series adds support for direct I/O with fscrypt using > > > blk-crypto. > > > > > > > Is there an

[f2fs-dev] [PATCH 2/2] f2fs: swap: support migrating swapfile in aligned write mode

2021-05-26 Thread Chao Yu
This patch supports to migrate swapfile in aligned write mode during swapon in order to keep swapfile being aligned to section as much as possible, then pinned swapfile will locates fully filled section which may not affected by GC. However, for the case that swapfile's size is not aligned to

[f2fs-dev] [PATCH 1/2] f2fs: swap: remove dead codes

2021-05-26 Thread Chao Yu
After commit af4b6b8edf6a ("f2fs: introduce check_swap_activate_fast()"), we will never run into original logic of check_swap_activate() before f2fs supports non 4k-sized page, so let's delete those dead codes. Signed-off-by: Chao Yu --- fs/f2fs/data.c | 171