[f2fs-dev] [PATCH v1] f2fs: avoid victim selection from previous victim section

2022-11-21 Thread Yonggil Song
When f2fs chooses GC victim in large section & LFS mode, next_victim_seg[gc_type] is referenced first. After segment is freed, next_victim_seg[gc_type] has the next segment number. However, next_victim_seg[gc_type] still has the last segment number even after the last segment of section is freed. 

Re: [f2fs-dev] [PATCH 1/5] fs: ext4: initialize fsdata in pagecache_write()

2022-11-21 Thread Andrew Morton
On Mon, 21 Nov 2022 12:21:30 +0100 Alexander Potapenko wrote: > When aops->write_begin() does not initialize fsdata, KMSAN reports > an error passing the latter to aops->write_end(). > > Fix this by unconditionally initializing fsdata. > > ... > I'm assuming that this is not-a-bug, and that

Re: [f2fs-dev] [PATCH 3/5] fs: f2fs: initialize fsdata in pagecache_write()

2022-11-21 Thread Eric Biggers
On Mon, Nov 21, 2022 at 12:21:32PM +0100, Alexander Potapenko wrote: > When aops->write_begin() does not initialize fsdata, KMSAN may report > an error passing the latter to aops->write_end(). > > Fix this by unconditionally initializing fsdata. > > Suggested-by: Eric Biggers > Fixes:

Re: [f2fs-dev] [PATCH 1/5] fs: ext4: initialize fsdata in pagecache_write()

2022-11-21 Thread Eric Biggers
On Mon, Nov 21, 2022 at 12:21:30PM +0100, Alexander Potapenko wrote: > When aops->write_begin() does not initialize fsdata, KMSAN reports > an error passing the latter to aops->write_end(). > > Fix this by unconditionally initializing fsdata. > > Cc: Eric Biggers > Fixes: c93d8f885809 ("ext4:

Re: [f2fs-dev] [PATCH 2/5] fs: affs: initialize fsdata in affs_truncate()

2022-11-21 Thread Eric Biggers
On Mon, Nov 21, 2022 at 12:21:31PM +0100, Alexander Potapenko wrote: > When aops->write_begin() does not initialize fsdata, KMSAN may report > an error passing the latter to aops->write_end(). > > Fix this by unconditionally initializing fsdata. > > Suggested-by: Eric Biggers > Fixes:

[f2fs-dev] [PATCH] f2fs: continuous counting for 'issued' in __issue_discard_cmd_orderly()

2022-11-21 Thread Yuwei Guan
As the 'dcc->discard_granularity' and 'dcc->max_ordered_discard' can be set at the user space, and if the 'dcc->max_ordered_discard' is set larger than 'dcc->discard_granularity' in DPOLICY_BG mode, or it's a volume device, discard_granularity can be tuned to 1 in f2fs_tuning_parameters(), it will

[f2fs-dev] [PATCH 1/5] fs: ext4: initialize fsdata in pagecache_write()

2022-11-21 Thread Alexander Potapenko via Linux-f2fs-devel
When aops->write_begin() does not initialize fsdata, KMSAN reports an error passing the latter to aops->write_end(). Fix this by unconditionally initializing fsdata. Cc: Eric Biggers Fixes: c93d8f885809 ("ext4: add basic fs-verity support") Reported-by:

[f2fs-dev] [PATCH 2/5] fs: affs: initialize fsdata in affs_truncate()

2022-11-21 Thread Alexander Potapenko via Linux-f2fs-devel
When aops->write_begin() does not initialize fsdata, KMSAN may report an error passing the latter to aops->write_end(). Fix this by unconditionally initializing fsdata. Suggested-by: Eric Biggers Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Alexander Potapenko --- fs/affs/file.c |

[f2fs-dev] [PATCH 5/5] fs: hfsplus: initialize fsdata in hfsplus_file_truncate()

2022-11-21 Thread Alexander Potapenko via Linux-f2fs-devel
When aops->write_begin() does not initialize fsdata, KMSAN may report an error passing the latter to aops->write_end(). Fix this by unconditionally initializing fsdata. Suggested-by: Eric Biggers Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Alexander Potapenko ---

[f2fs-dev] [PATCH 4/5] fs: hfs: initialize fsdata in hfs_file_truncate()

2022-11-21 Thread Alexander Potapenko via Linux-f2fs-devel
When aops->write_begin() does not initialize fsdata, KMSAN may report an error passing the latter to aops->write_end(). Fix this by unconditionally initializing fsdata. Suggested-by: Eric Biggers Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Alexander Potapenko --- fs/hfs/extent.c |

[f2fs-dev] [PATCH 3/5] fs: f2fs: initialize fsdata in pagecache_write()

2022-11-21 Thread Alexander Potapenko via Linux-f2fs-devel
When aops->write_begin() does not initialize fsdata, KMSAN may report an error passing the latter to aops->write_end(). Fix this by unconditionally initializing fsdata. Suggested-by: Eric Biggers Fixes: 95ae251fe828 ("f2fs: add fs-verity support") Signed-off-by: Alexander Potapenko ---

[f2fs-dev] [PATCH] f2fs: introduce discard_submit sysfs node

2022-11-21 Thread Yangtao Li via Linux-f2fs-devel
'discard_submit' sysfs node controls whether discard threads are allowed to submit discard commands. And writing a non-zero value to this node will force the discard thread to wake up immediately. Some scenarios where this node can be used: 1. A large number of unsubmitted discards have