On 2023/3/24 6:03, Jaegeuk Kim wrote:
On 03/23, Chao Yu wrote:
On 2023/3/13 17:48, Yonggil Song wrote:
When using f2fs on a zoned block device with 2MiB zone size, IO errors
occurs because f2fs tries to write data to a zone that has not been reset.
The cause is that f2fs tries to discard
On 2023/3/8 22:06, Yangtao Li wrote:
BIW reduce the s_flag array size and make s_flag constant.
Signed-off-by: Yangtao Li
Reviewed-by: Chao Yu
Thanks,
___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https
On 2023/3/2 17:55, Yangtao Li wrote:
It seems inappropriate that the current logic does not handle
filemap_fdatawrite() errors, so let's fix it.
Signed-off-by: Yangtao Li
Reviewed-by: Chao Yu
Thanks,
___
Linux-f2fs-devel mailing list
Linux-f2fs
On 2023/3/13 17:48, Yonggil Song wrote:
When using f2fs on a zoned block device with 2MiB zone size, IO errors
occurs because f2fs tries to write data to a zone that has not been reset.
The cause is that f2fs tries to discard multiple zones at once. This is
caused by a condition in
+Shilong,
Hi, Shilong,
Could you please help to check this patch? in original patch, it tries to
ignore such error intentionally? or it is a bug?
On 2023/2/21 22:45, Yangtao Li wrote:
We should set the error code when dqget() failed.
Fixes: 2c1d03056991 ("f2fs: support
;
};
unsigned long long key;
} __packed;
Cc:
Fixes: 13054c548a1c ("f2fs: introduce infra macro and data structure of rb-tree
extent cache")
Signed-off-by: Jaegeuk Kim
Reviewed-by: Chao Yu
Thanks,
___
;
};
unsigned long long key;
} __packed;
Cc:
Fixes: 004b68621897 ("f2fs: use rb-tree to track pending discard commands")
Signed-off-by: Jaegeuk Kim
Reviewed-by: Chao Y
;
};
[16] unsigned long long mtime; [12] unsigned long long key;
} __packed;
Cc:
Fixes: 093749e296e2 ("f2fs: support age threshold based garbage collection")
Signed-off-by: Jaegeuk Kim
Reviewed-by: Chao Y
On 2023/3/7 5:51, Jaegeuk Kim wrote:
Applied with the below fix.
Fixes: 6f8d4455060d ("f2fs: avoid fi->i_gc_rwsem[WRITE] lock in f2fs_gc"
')' was missed.
Signed-off-by: Yonggil Song
Reviewed-by: Chao Yu
Thanks,
___
Lin
On 2023/3/8 1:26, Jaegeuk Kim wrote:
Cc'ed stable. Thanks.
Oh, thanks for adding the missed tag! Jaegeuk.
Thanks,
On 03/07, Chao Yu wrote:
F2FS-fs (dm-x): inconsistent rbtree, cur(3470333575168) next(3320009719808)
[ cut here ]
kernel BUG at fs/f2fs/gc.c:602
On 2023/2/16 21:53, Yangtao Li wrote:
Let's use BIT() and GENMASK() instead of open it.
Signed-off-by: Yangtao Li
Reviewed-by: Chao Yu
Thanks,
___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https
On 2023/2/16 22:09, Yangtao Li wrote:
This patch export below sysfs entries for better control cached
compress page count.
/sys/fs/f2fs//compress_watermark
/sys/fs/f2fs//compress_percent
Signed-off-by: Yangtao Li
Reviewed-by: Chao Yu
Thanks
ot;)
Fixes: 13054c548a1c ("f2fs: introduce infra macro and data structure of rb-tree
extent cache")
Fixes: 093749e296e2 ("f2fs: support age threshold based garbage collection")
Signed-off-by: Zhiguo Niu
Signed-off-by: Chao Yu
---
fs/f2fs/f2fs.h | 6 +++---
fs/f2fs/gc.h
inode_meta()
to static.
Signed-off-by: Li Zetao
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
;
Instead of 12:
field:nid_t nid[3]; offset:24; size:12;signed:0;
This also fixes the reported offset of subsequent fields so that they
match with the actual struct layout.
Signed-off-by: Douglas Raillard
Reviewed-by: Chao Yu
Thanks
On 2023/2/15 14:17, Yangtao Li wrote:
They are not used, let's remove them.
Signed-off-by: Yangtao Li
Reviewed-by: Chao Yu
Thanks,
___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists
On 2023/2/15 10:48, Yonggil Song wrote:
When f2fs skipped a gc round during victim migration, there was a bug which
would skip all upcoming gc rounds unconditionally because skipped_gc_rwsem
was not initialized. It fixes the bug by correctly initializing the
skipped_gc_rwsem inside the gc loop.
this.
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
On 2023/2/15 2:07, Jaegeuk Kim wrote:
On 02/14, Chao Yu wrote:
On 2023/2/14 1:51, Jaegeuk Kim wrote:
On 02/13, Chao Yu wrote:
On 2023/2/9 11:20, Thomas Weißschuh wrote:
Since commit ee6d3dd4ed48 ("driver core: make kobj_type constant.")
the driver core allows the usage of co
: 3db1de0e582c ("f2fs: change the current atomic write way")
Signed-off-by: Daeho Jeong
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
On 2023/2/14 4:14, Daeho Jeong wrote:
diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c
index 28c9c72dda2a..7bf660d4cad9 100644
--- a/fs/f2fs/inode.c
+++ b/fs/f2fs/inode.c
@@ -777,11 +777,18 @@ int f2fs_write_inode(struct inode *inode, struct
writeback_control *wbc)
void f2fs_evict_inode(struct
On 2023/2/14 1:51, Jaegeuk Kim wrote:
On 02/13, Chao Yu wrote:
On 2023/2/9 11:20, Thomas Weißschuh wrote:
Since commit ee6d3dd4ed48 ("driver core: make kobj_type constant.")
the driver core allows the usage of const struct kobj_type.
Take advantage of this to constify the
On 2023/2/14 1:48, Jaegeuk Kim wrote:
On 02/13, Chao Yu wrote:
On 2023/2/11 5:32, Jaegeuk Kim wrote:
MAIN_SEGS is for data area, while TOTAL_SEGS includes data and metadata.
Good catch!
Could you please add fixes line?
It seems this is not a bug case, and exisits from the first F2FS patch
On 2023/2/13 22:18, Yangtao Li wrote:
For each loop add a local f2fs_sb_info pointer insted of looking it up.
Signed-off-by: Yangtao Li
Reviewed-by: Chao Yu
Thanks,
___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https
On 2023/2/13 22:18, Yangtao Li wrote:
Export ipu_policy as a string in debugfs for better readability and
it can help us better understand some strategies of the file system.
Signed-off-by: Yangtao Li
Reviewed-by: Chao Yu
Thanks,
___
Linux-f2fs
On 2023/2/9 5:25, Jaegeuk Kim wrote:
We need to check the first disk only, and trim the other disks.
I'm confused, why we don't need to trim first disk?
Thanks,
Signed-off-by: Jaegeuk Kim
---
mkfs/f2fs_format_utils.c | 4
1 file changed, 4 insertions(+)
diff --git
On 2023/2/10 2:18, Daeho Jeong wrote:
From: Daeho Jeong
To fix a race condition between atomic write aborts, I use the inode
lock and make COW inode to be re-usable thoroughout the whole
atomic file inode lifetime.
Reported-by: syzbot+823000d23b3400619...@syzkaller.appspotmail.com
Fixes:
On 2023/2/11 5:34, Jaegeuk Kim wrote:
TOTAL_SEGS should include metadata segments and main segments.
Signed-off-by: Jaegeuk Kim
Reviewed-by: Chao Yu
Thanks,
___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https
On 2023/2/11 5:32, Jaegeuk Kim wrote:
MAIN_SEGS is for data area, while TOTAL_SEGS includes data and metadata.
Good catch!
Could you please add fixes line?
Thanks,
Signed-off-by: Jaegeuk Kim
---
fs/f2fs/segment.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
On 2023/2/10 18:42, Yangtao Li wrote:
Export ipu_policy as a string in debugfs for better readability and
it can help us better understand some strategies of the file system.
Oh, I missed v2, how about making another patch to replace si->sbi w/ sbi?
Thanks,
On 2023/2/10 1:26, Jaegeuk Kim wrote:
On 02/09, Yangtao Li wrote:
Export ipu_policy as a string in debugfs for better readability and
it can help us better understand some strategies of the file system.
Since we use ipu_policy as a bitmap, and the bitmap API parameter is
unsigned long type
by: Thomas Weißschuh
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
In do_read_inode(), sanity check for extent cache should be called after
f2fs_init_read_extent_tree(), fix it.
Fixes: 728400a1 ("f2fs: allocate the extent_cache by default")
Signed-off-by: Chao Yu
---
v2:
- just relocate sanity check on extent cache.
fs/f2fs/extent_ca
On 2023/2/7 10:47, 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
ranularity =
MIN_DISCARD_GRANULARITY;
+ if (!f2fs_lfs_mode(sbi))
+ SM_I(sbi)->ipu_policy = BIT(F2FS_IPU_FORCE) |
BIT(F2FS_IPU_HONOR_OPU_WRITE);
SM_I(sbi)->ipu_policy = BIT(F2FS_IPU_FORCE) |
BIT(F2FS
On 2023/2/6 19:56, Jinyoung CHOI wrote:
This patch is to fix typos in f2fs files.
Signed-off-by: Jinyoung Choi
Reviewed-by: Chao Yu
Thanks,
___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net
x4c/0xf0 [f2fs]
? __pfx_autoremove_wake_function+0x10/0x10
kthread+0xff/0x130
? __pfx_kthread+0x10/0x10
ret_from_fork+0x2c/0x50
Cc: sta...@vger.kernel.org # v5.18+
Fixes: 64bf0eef0171 ("f2fs: pass the bio operation to bio_alloc_bioset")
Signed-off-by: Jaegeuk Kim
Reviewe
On 2023/2/6 11:42, Jaegeuk Kim wrote:
Let's remove this.
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
On 2023/2/6 11:41, Jaegeuk Kim wrote:
On 02/01, Chao Yu wrote:
On 2023/2/1 2:56, Jaegeuk Kim wrote:
I wanted to avoid a deep if/else statement.
So how about this:
Nothing impressive.
Oops...
Thanks,
___
Linux-f2fs-devel mailing list
Linux
(struct f2fs_attr *a,
return count;
}
+ if (!strcmp(a->attr.name, "last_age_weight")) {
+ if (t < 0 || t > 100)
t is unsigned long variable, should never be less than 0.
Otherwise, it looks good to me, maybe Jaegeuk could fix it manually.
Re
On 2023/2/2 16:48, Yangtao Li wrote:
IPU policy can be disabled, let's add description for it and other policy.
Signed-off-by: Yangtao Li
Reviewed-by: Chao Yu
Thanks,
___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
On 2023/2/2 16:48, Yangtao Li wrote:
For LFS mode, it should update outplace and no need inplace update.
When using LFS mode for small-volume devices, IPU will not be used,
and the OPU writing method is actually used, but F2FS_IPU_FORCE can
be read from the ipu_policy node, which is different
the pagecache page to
wbc_account_cgroup_owner().
Fixes: 578c647879f7 ("f2fs: implement cgroup writeback support")
Cc: sta...@vger.kernel.org
Reported-by: Matthew Wilcox (Oracle)
Signed-off-by: Eric Biggers
Reviewed-by: Chao Yu
Thanks,
___
On 2023/2/2 16:20, qixiaoyu1 wrote:
Signed-off-by: qixiaoyu1
Signed-off-by: xiongping1
---
Documentation/ABI/testing/sysfs-fs-f2fs | 5 +
fs/f2fs/extent_cache.c | 15 +--
fs/f2fs/f2fs.h | 1 +
fs/f2fs/sysfs.c
On 2023/2/2 16:20, qixiaoyu1 wrote:
Currently we wrongly calculate the new block age to
old * LAST_AGE_WEIGHT / 100.
Fix it to new * (100 - LAST_AGE_WEIGHT) / 100
+ old * LAST_AGE_WEIGHT / 100.
Signed-off-by: qixiaoyu1
Signed-off-by: xiongping1
Reviewed-by: Chao Yu
Keep sanity_check_raw_super flow in fsck.f2fs being consistent w/
sanity_check_raw_super() in f2fs kernel module, otherwise, it outputs
different error information when mounting/fscking the same image which
contains corrupted superblock.
Signed-off-by: Chao Yu
---
fsck/mount.c | 8
1
to match the definition.
Reported-by: kernel test robot
Reported-by: Dan Carpenter
Signed-off-by: Yangtao Li
Reviewed-by: Chao Yu
Thanks
___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists
On 2023/2/2 14:15, Nathan Chancellor wrote:
On Thu, Feb 02, 2023 at 02:13:18PM +0800, Chao Yu wrote:
On 2023/2/2 0:40, Nathan Chancellor wrote:
Clang warns:
../fs/f2fs/data.c:995:17: error: implicit truncation from 'int' to a
one-bit wide bit-field changes value from 1 to -1
[-Werror
-by: Chao Yu
---
v3:
- merge Nathan's patch which fixes a compile warning (single-bit-bitfield-
constant-conversion).
fs/f2fs/checkpoint.c | 6 +++---
fs/f2fs/compress.c | 5 +++--
fs/f2fs/data.c | 10 +-
fs/f2fs/f2fs.h | 18 +-
fs/f2fs/gc.c | 8
On 2023/2/2 0:40, Nathan Chancellor wrote:
Clang warns:
../fs/f2fs/data.c:995:17: error: implicit truncation from 'int' to a one-bit
wide bit-field changes value from 1 to -1
[-Werror,-Wsingle-bit-bitfield-constant-conversion]
fio->submitted = 1;
^ ~
On 2023/2/1 20:23, qixiaoyu wrote:
How about updating as below to avoid lossing accuracy if new is less than 100?
return div_u64(new * (100 - LAST_AGE_WEIGHT), 100) +
div_u64(old * LAST_AGE_WEIGHT, 100);
Thanks,
We want to avoid overflow by doing the division first. To keep
On 2023/2/1 2:56, Jaegeuk Kim wrote:
I wanted to avoid a deep if/else statement.
So how about this:
From 418b408420367ac5491c97a7c4d26e3d0e68ea57 Mon Sep 17 00:00:00 2001
From: Chao Yu
Date: Tue, 31 Jan 2023 22:46:59 +0800
Subject: [PATCH v2] f2fs: clean up __update_extent_tree_range
Hi Daeho,
On 2023/2/1 6:34, Daeho Jeong wrote:
On Tue, Jan 31, 2023 at 1:57 PM Daeho Jeong wrote:
On Tue, Jan 31, 2023 at 1:38 PM Daeho Jeong wrote:
On Tue, Jan 31, 2023 at 11:13 AM Daeho Jeong wrote:
Hi Chao,
On Tue, Jan 31, 2023 at 3:37 AM Chao Yu wrote:
Hi Daeho,
On 2023/1/31 0
We should update age extent in f2fs_do_zero_range() like we
did in f2fs_truncate_data_blocks_range().
Fixes: 71644dff4811 ("f2fs: add block_age-based extent cache")
Signed-off-by: Chao Yu
---
fs/f2fs/file.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/f2fs/file.c b/fs/f
No logic change, just avoid goto statement.
Signed-off-by: Chao Yu
---
fs/f2fs/extent_cache.c | 66 --
1 file changed, 31 insertions(+), 35 deletions(-)
diff --git a/fs/f2fs/extent_cache.c b/fs/f2fs/extent_cache.c
index d70ad6a44cbf..cf65a188d112 100644
nr_free may be less than len, we should update age extent cache
w/ range [fofs, len] rather than [fofs, nr_free].
Fixes: 71644dff4811 ("f2fs: add block_age-based extent cache")
Signed-off-by: Chao Yu
---
fs/f2fs/file.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
caching obsolete
page?
Thanks,
Thanks,
On Fri, Jan 27, 2023 at 6:07 PM Chao Yu wrote:
Hi Daeho, Jaegeuk,
Please take a look at patchset in below link:
https://lore.kernel.org/linux-f2fs-devel/20230109034453.490176-1-c...@kernel.org/T/#t
In PATCH 4/5, I'm trying to fix the same issue w
...@vger.kernel.org
Suggested-by: Randall Huang
Suggested-by: Chao Yu
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
Parsing sync/rw type from bio inside iostat_update_and_unbind_ctx()
to avoid unnecessary parameters.
Signed-off-by: Chao Yu
---
- this patch is based on
[PATCH v3] f2fs: use iostat_lat_type directly as a parameter in the
iostat_update_and_unbind_ctx()
fs/f2fs/data.c | 4 ++--
fs/f2fs
On 2023/1/21 13:12, Yangtao Li wrote:
For LFS mode, it should update outplace and no need inplace update.
When using LFS mode for small-volume devices, IPU will not be used,
and the OPU writing method is actually used, but F2FS_IPU_FORCE can
be read from the ipu_policy node, which is different
On 2023/1/31 6:23, Jaegeuk Kim wrote:
On 01/30, Jaegeuk Kim wrote:
On 01/28, Chao Yu wrote:
On 2023/1/5 12:22, Yangtao Li wrote:
Convert to use iostat_lat_type as parameter instead of raw number.
BTW, move NUM_PREALLOC_IOSTAT_CTXS to the header file, and rename
iotype to page_type to match
On 2023/1/31 5:35, Jaegeuk Kim wrote:
On 01/28, Chao Yu wrote:
On 2023/1/5 12:22, Yangtao Li wrote:
Convert to use iostat_lat_type as parameter instead of raw number.
BTW, move NUM_PREALLOC_IOSTAT_CTXS to the header file, and rename
iotype to page_type to match the definition.
Signed-off
On 2023/1/21 0:16, Yangtao Li wrote:
Convert to use iostat_lat_type as parameter instead of raw number.
BTW, move NUM_PREALLOC_IOSTAT_CTXS to the header file, and rename
iotype to page_type to match the definition.
Reported-by: kernel test robot
Reported-by: Dan Carpenter
Signed-off-by:
^
Mixup between META_FLUSH and NR_PAGE_TYPE leads to memory corruption.
Fixes: a4b6817625e7 ("f2fs: introduce periodic iostat io latency traces")
Reported-by: kernel test robot
Reported-by: Dan Carpenter
Suggested-by: Chao Yu
Suggested-by: Jaegeuk Kim
Signed-off-by: Yan
;/* require post read */
...
};
After this patch, size of struct f2fs_io_info reduces from 136 to 120.
Signed-off-by: Chao Yu
---
v2:
- fix compile warning caused by assigning bool type value to bitfield variable.
fs/f2fs/checkpoint.c | 6 +++---
fs/f2fs/compress.c | 5 +++--
fs/f2fs
;/* require post read */
...
};
After this patch, size of struct f2fs_io_info reduces from 136 to 120.
Signed-off-by: Chao Yu
---
fs/f2fs/f2fs.h | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index fa41c0dad308
On 2023/1/19 14:36, Christoph Hellwig wrote:
Just open code the logic in the only caller, where it is more
obvious.
Signed-off-by: Christoph Hellwig
Reviewed-by: Chao Yu
Thanks,
___
Linux-f2fs-devel mailing list
Linux-f2fs-devel
On 2023/1/19 14:36, Christoph Hellwig wrote:
Remove __refresh_next_blkoff by opencoding the SSR vs LFS segment check
in the only caller, and then add helpers for SSR block selection and
blkoff randomization instead.
Signed-off-by: Christoph Hellwig
Reviewed-by: Chao Yu
Thanks
On 2023/1/19 14:36, Christoph Hellwig wrote:
Just fold this trivial wrapper into the only caller.
Signed-off-by: Christoph Hellwig
Reviewed-by: Chao Yu
Thanks,
___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https
On 2023/1/19 14:36, Christoph Hellwig wrote:
Simplify the check whether to allocate a new segment or reuse an open
one.
Signed-off-by: Christoph Hellwig
Reviewed-by: Chao Yu
Thanks,
___
Linux-f2fs-devel mailing list
Linux-f2fs-devel
On 2023/1/19 14:36, Christoph Hellwig wrote:
Factor the logic to log a path for reads and writs into a helper
shared between the read_iter and write_iter methods.
Signed-off-by: Christoph Hellwig
---
fs/f2fs/file.c | 60 +-
1 file changed, 25
On 2023/1/19 14:36, Christoph Hellwig wrote:
Add a helper to return the valid blocks on log and SSR segments, and
replace the last two uses of curseg_blkoff with it.
Signed-off-by: Christoph Hellwig
Reviewed-by: Chao Yu
Thanks,
___
Linux-f2fs
On 2023/1/19 14:36, Christoph Hellwig wrote:
For each loop add a local curseg_info pointer insted of looking it up
for each of the three fields.
Signed-off-by: Christoph Hellwig
Reviewed-by: Chao Yu
Thanks,
___
Linux-f2fs-devel mailing list
On 2023/1/19 14:36, Christoph Hellwig wrote:
This function just assigns a summary entry. This can be done entirely
typesafe with an open code struct assignment that relies on array
indexing.
Signed-off-by: Christoph Hellwig
Reviewed-by: Chao Yu
Thanks
On 2023/1/24 23:33, Yangtao Li wrote:
f2fs supports lz4 compression algorithm and lz4hc compression algorithm,
which the level parameter needs to be passed in. When CONFIG_F2FS_FS_LZ4HC
is not enabled, even if there is no problem with the level parameter, add
the level parameter to the lz4
On 2023/1/23 17:46, Yangtao Li wrote:
Files created by truncate have a size but no blocks, so
they can be allowed to set compression option.
Fixes: e1e8debec656 ("f2fs: add F2FS_IOC_SET_COMPRESS_OPTION ioctl")
Signed-off-by: Yangtao Li
Reviewed-by: Chao Y
ed initializing when converting inline
dentry")
Cc: # v4.3+
Signed-off-by: Eric Biggers
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
On 2023/1/29 15:55, Yangtao Li wrote:
syzbot reported a bug which could cause shift-out-of-bounds issue:
UBSAN: shift-out-of-bounds in fs/f2fs/super.c:4184:41
shift exponent 613 is too large for 64-bit type 'loff_t' (aka 'long long')
CPU: 1 PID: 5467 Comm: syz-executor.0 Not tainted
On 2023/1/12 22:31, Yangtao Li wrote:
is_extension_exist() only return two values, 0 or 1.
So there is no need to use int type.
It's too trivial to do such change one by one, how about merging all
similar changes into one patch?
Thanks,
Signed-off-by: Yangtao Li
---
fs/f2fs/namei.c | 12
On 2023/1/12 22:22, Yangtao Li wrote:
There are very similar codes in release_compress_blocks() and
reserve_compress_blocks() which is used for data blocks check.
This patch introduces a new helper sanity_check_blocks()
to include those common codes, and used it instead for cleanup.
How about
On 2023/1/12 21:35, Yangtao Li wrote:
Added a new F2FS_IOC_SET_COMPRESS_OPTION_V2 ioctl to change file
compression option of a file.
struct f2fs_comp_option_v2 {
union {
struct {
__u8 algorithm;
__u8 log_cluster_size;
Otherwise, 32-bits binary call ioctl(F2FS_IOC_START_ATOMIC_REPLACE) will
fail in 64-bits kernel.
Fixes: 41e8f85a75fc ("f2fs: introduce F2FS_IOC_START_ATOMIC_REPLACE")
Signed-off-by: Chao Yu
---
fs/f2fs/file.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/f2fs/file.c b/fs/f
in-memory .i_compress_flag
- change type of in-memory .i_compress_flag from unsigned short to unsigned
char.
w/ above changes, we can avoid unneeded bit shift whenever during
.init_compress_ctx(), and shrink size of struct f2fs_inode_info.
Signed-off-by: Chao Yu
---
fs/f2fs/compress.c | 8 +++-
fs/f
On 2023/1/20 21:40, Yangtao Li wrote:
User can control f2fs ipu policy through /sys/fs/f2fs//ipu_policy,
export related definitions and introduce new macro to make it more
convenient for users to use.
Signed-off-by: Yangtao Li
---
Documentation/ABI/testing/sysfs-fs-f2fs | 25 ++--
On 2023/1/20 21:40, Yangtao Li wrote:
Add a ipu_mode sysfs node to show the current ipu policy as a string.
Why do we need to add another sysfs entry for ipu_policy? we can check
the description of ipu_policy bits in below sysfs document.
What: /sys/fs/f2fs//ipu_policy
Date:
On 2023/1/20 21:40, Yangtao Li wrote:
Disallow the value set beyond the range, and disallow to change
the value in lfs mode.
IMO, it's better to merge this patch into 1/4.
BTW, convert open code to use BIT().
How about using one patch to change 1 << xx to BIT(xx) for all cases
of f2fs
On 2023/1/20 21:40, Yangtao Li wrote:
For LFS mode, it should update outplace and no need inplace update.
When using LFS mode for small-volume devices, IPU will not be used,
and the OPU writing method is actually used, but F2FS_IPU_FORCE can
be read from the ipu_policy node, which is different
On 2023/1/12 21:34, Yangtao Li wrote:
commit 3fde13f817e2 ("f2fs: compress: support compress level") introduce
compress level, which macro(COMPRESS_LEVEL_OFFSET) is 8, But use wrong
comment about compress level.
Let's fix it.
Signed-off-by: Yangtao Li
Reviewed-by: Chao Y
On 2023/1/16 11:08, qixiaoyu1 wrote:
Currently we wrongly calculate the new block age to
old * LAST_AGE_WEIGHT / 100.
Fix it to new * (100 - LAST_AGE_WEIGHT) / 100
+ old * LAST_AGE_WEIGHT / 100.
Signed-off-by: qixiaoyu1
Signed-off-by: xiongping1
---
Change log v1 -> v2:
-
On 2023/1/5 12:22, Yangtao Li wrote:
Convert to use iostat_lat_type as parameter instead of raw number.
BTW, move NUM_PREALLOC_IOSTAT_CTXS to the header file, and rename
iotype to page_type to match the definition.
Signed-off-by: Yangtao Li
---
fs/f2fs/data.c | 5 +++--
fs/f2fs/iostat.c
On 2023/1/13 8:01, Jaegeuk Kim wrote:
On 01/12, Chao Yu wrote:
On 2023/1/12 2:50, Jaegeuk Kim wrote:
On 01/11, Chao Yu wrote:
On 2023/1/11 9:20, Jaegeuk Kim wrote:
In f2fs_update_inode_page, f2fs_get_node_page handles EIO along with
f2fs_handle_page_eio that stops checkpoint, if the disk
Hi Daeho, Jaegeuk,
Please take a look at patchset in below link:
https://lore.kernel.org/linux-f2fs-devel/20230109034453.490176-1-c...@kernel.org/T/#t
In PATCH 4/5, I'm trying to fix the same issue w/ alternative way, let me
know your preference. :)
One comment as below.
On 2023/1/13 8:49,
On 2023/1/16 21:02, Yangtao Li wrote:
Add iotype sanity check to avoid potential memory corruption.
This is to fix the compile error below:
fs/f2fs/iostat.c:231 __update_iostat_latency() error: buffer overflow
'io_lat->peak_lat[type]' 3 <= 3
vim +228 fs/f2fs/iostat.c
211 static inline
to be after the last
found folio, not necessarily the last used page.
Signed-off-by: Vishal Moola (Oracle)
Acked-by: Chao Yu
Thanks,
___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo
On 2023/1/12 2:50, Jaegeuk Kim wrote:
On 01/11, Chao Yu wrote:
On 2023/1/11 9:20, Jaegeuk Kim wrote:
In f2fs_update_inode_page, f2fs_get_node_page handles EIO along with
f2fs_handle_page_eio that stops checkpoint, if the disk couldn't be recovered.
As a result, we don't need to stop checkpoint
i->iostat_bytes[type], \
+ sbi->iostat_count[type],
\
+ iostat_get_avg_bytes(sbi, type))
\
'\' doesn't align in column, otherwise it looks good to me.
Reviewed-by: Chao Yu
Thanks,
___
On 2023/1/4 19:40, Yangtao Li wrote:
The current discard_io_aware_gran is a fixed value, change it to be
configurable through the sys node.
Signed-off-by: Yangtao Li
---
v3: remove DEFAULT_IO_AWARE_DISCARD_GRANULARITY
Documentation/ABI/testing/sysfs-fs-f2fs | 9 +
fs/f2fs/f2fs.h
:
- sizeof(struct discard_cmd_control): 8384
Signed-off-by: Yangtao Li
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
On 2022/12/17 13:24, Yangtao Li wrote:
Commit 1cd2e6d54435 ("f2fs: define MIN_DISCARD_GRANULARITY macro")
introduce it, let's convert to use MIN_DISCARD_GRANULARITY macro.
Signed-off-by: Yangtao Li
Reviewed-by: Chao Yu
Thanks,
___
, we no longer need the f2fs_show_injection_info() function,
and let's remove it.
Suggested-by: Chao Yu
Signed-off-by: Yangtao Li
Reviewed-by: Chao Yu
Thanks,
___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https
801 - 900 of 6638 matches
Mail list logo