[f2fs-dev] [RFC PATCH v4] f2fs: support data compression

2019-11-13 Thread Chao Yu
ing to Eric's comments. 20191101 - apply fixes from Jaegeuk 20191113 - apply fixes from Jaegeuk - split workqueue for fsverity [Jaegeuk Kim] - add tracepoint for f2fs_{,de}compress_pages() - fix many bugs and add some compression stats Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim --- Document

Re: [f2fs-dev] [PATCH 2/2] f2fs: support data compression

2019-11-13 Thread Chao Yu
branch: >From 5b51682bc3013b8de6dee4906865181c3ded435f Mon Sep 17 00:00:00 2001 From: Chao Yu Date: Tue, 12 Nov 2019 10:03:21 +0800 Subject: [PATCH INCREMENT] f2fs: compress: split workqueue for fsverity Signed-off-by: Chao Yu --- fs/f2fs/compress.c | 16 +--- fs/f2fs/data.c |

Re: [f2fs-dev] [PATCH] f2fs: Fix deadlock under storage almost full/dirty condition

2019-11-10 Thread Chao Yu
Hi Sahitya, On 2019/11/11 14:44, Sahitya Tummala wrote: > Hi Chao, > > On Mon, Nov 11, 2019 at 02:28:47PM +0800, Chao Yu wrote: >> Hi Sahitya, >> >> On 2019/11/11 11:40, Sahitya Tummala wrote: >>> Hi Chao, >>> >>> On Mon, Nov 11, 2019 at 10

Re: [f2fs-dev] [PATCH] f2fs: Fix deadlock under storage almost full/dirty condition

2019-11-10 Thread Chao Yu
Hi Sahitya, On 2019/11/11 11:40, Sahitya Tummala wrote: > Hi Chao, > > On Mon, Nov 11, 2019 at 10:51:10AM +0800, Chao Yu wrote: >> On 2019/11/8 19:03, Sahitya Tummala wrote: >>> There could be a potential deadlock when the storage capacity >>> is almost full

Re: [f2fs-dev] [PATCH v2 2/2] f2fs: Check write pointer consistency of non-open zones

2019-11-10 Thread Chao Yu
On 2019/11/8 12:27, Shinichiro Kawasaki wrote: > On Nov 05, 2019 / 20:22, Chao Yu wrote: >> On 2019/10/28 14:58, Shin'ichiro Kawasaki wrote: >>> To catch f2fs bugs in write pointer handling code for zoned block >>> devices, check write pointers of non-open zon

Re: [f2fs-dev] [PATCH v6 7/8] fsck: Check write pointer consistency of open zones

2019-11-10 Thread Chao Yu
On 2019/11/6 17:45, Shinichiro Kawasaki wrote: > On Nov 05, 2019 / 19:06, Chao Yu wrote: >> On 2019/10/28 14:55, Shin'ichiro Kawasaki wrote: >>> On sudden f2fs shutdown, write pointers of zoned block devices can go >>> further but f2fs meta data keeps current s

Re: [f2fs-dev] [PATCH] f2fs: Fix deadlock under storage almost full/dirty condition

2019-11-10 Thread Chao Yu
On 2019/11/8 19:03, Sahitya Tummala wrote: > There could be a potential deadlock when the storage capacity > is almost full and theren't enough free segments available, due > to which FG_GC is needed in the atomic commit ioctl as shown in > the below callstack - > > schedule_timeout >

Re: [f2fs-dev] [PATCH] f2fs: fix to update dir's i_pino during cross_rename

2019-11-07 Thread Chao Yu
On 2019/11/8 1:05, Eric Biggers wrote: > On Thu, Nov 07, 2019 at 02:12:05PM +0800, Chao Yu wrote: >> As Eric reported: >> >> RENAME_EXCHANGE support was just added to fsstress in xfstests: >> >> commit 65dfd40a97b6bbbd2a22538977bab355c5bc0f06 >> Au

[f2fs-dev] [PATCH] f2fs: fix potential overflow

2019-11-07 Thread Chao Yu
e during fsync") Fixes: 0a2aa8fbb969 ("f2fs: refactor __exchange_data_block for speed up") Signed-off-by: Chao Yu --- fs/f2fs/data.c | 2 +- fs/f2fs/file.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 58f4bade6c2b..8f70

Re: [f2fs-dev] fsstress with RENAME_EXCHANGE causing filesystem corruption

2019-11-06 Thread Chao Yu
Eric, thanks for the report, I've made a patch, could you test with it? Thanks, On 2019/11/5 2:09, Eric Biggers wrote: > RENAME_EXCHANGE support was just added to fsstress in xfstests: > > commit 65dfd40a97b6bbbd2a22538977bab355c5bc0f06 > Author: kaixuxia > Date: Thu Oct 31

[f2fs-dev] [PATCH] f2fs: fix to update dir's i_pino during cross_rename

2019-11-06 Thread Chao Yu
da0 ("f2fs: support ->rename2()") Signed-off-by: Chao Yu --- fs/f2fs/namei.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c index 4faf06e8bf89..a1c507b0b4ac 100644 --- a/fs/f2fs/namei.c +++ b/fs/f2fs/namei.c

Re: [f2fs-dev] [PATCH 0/2] f2fs-tools: Introduce cache to speed up fsck

2019-11-05 Thread Chao Yu
Hi Robin, Could you explain what is the basic idea for this user-space cache? Thanks, On 2019/10/29 15:46, Robin Hsu wrote: > Implemented cache and related command line options. > > Robin Hsu (2): > libf2fs_io: Add user-space cache > fsck.f2fs: Enable user-space cache > > fsck/main.c

Re: [f2fs-dev] [PATCH v2 2/2] f2fs: Check write pointer consistency of non-open zones

2019-11-05 Thread Chao Yu
On 2019/10/28 14:58, Shin'ichiro Kawasaki wrote: > To catch f2fs bugs in write pointer handling code for zoned block > devices, check write pointers of non-open zones that current segments do > not point to. Do this check at mount time, after the fsync data recovery > and current segments' write

Re: [f2fs-dev] [PATCH v2 1/2] f2fs: Check write pointer consistency of open zones

2019-11-05 Thread Chao Yu
On 2019/10/28 14:58, Shin'ichiro Kawasaki wrote: > On sudden f2fs shutdown, write pointers of zoned block devices can go > further but f2fs meta data keeps current segments at positions before the > write operations. After remounting the f2fs, this inconsistency causes > write operations not at

Re: [f2fs-dev] [PATCH v6 8/8] fsck: Check write pointer consistency of non-open zones

2019-11-05 Thread Chao Yu
failed: %s\n", > +dev->path); > + return ret; > + } > + fsck->chk.wp_fixed = 1; > + return 0; > + } > + > + /* > + * If valid blocks exist in the zone beyond the write

Re: [f2fs-dev] [PATCH v6 7/8] fsck: Check write pointer consistency of open zones

2019-11-05 Thread Chao Yu
On 2019/10/28 14:55, Shin'ichiro Kawasaki wrote: > On sudden f2fs shutdown, write pointers of zoned block devices can go > further but f2fs meta data keeps current segments at positions before the > write operations. After remounting the f2fs, this inconsistency causes > write operations not at

Re: [f2fs-dev] [PATCH 10/10] errno.h: Provide EFSCORRUPTED for everybody

2019-11-04 Thread Chao Yu
re Ts'o > fs/erofs/internal.h | 2 -- > fs/f2fs/f2fs.h | 1 - Acked-by: Chao Yu Thanks, ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Re: [f2fs-dev] [PATCH 1/2] f2fs: support aligned pinned file

2019-11-04 Thread Chao Yu
On 2019/10/31 23:29, Jaegeuk Kim wrote: > On 10/31, Chao Yu wrote: >> On 2019/10/31 0:09, Jaegeuk Kim wrote: >>> On 10/26, Chao Yu wrote: >>>> On 2019/10/26 2:18, Jaegeuk Kim wrote: >>>>> On 10/24, Chao Yu wrote: >>>>>>

Re: [f2fs-dev] [PATCH 3/3] Revert "f2fs: use kvmalloc, if kmalloc is failed"

2019-11-04 Thread Chao Yu
On 2019/11/5 10:38, Eric Biggers wrote: > On Tue, Nov 05, 2019 at 10:17:41AM +0800, Chao Yu wrote: >> On 2019/11/5 8:02, Jaegeuk Kim wrote: >>> On 11/01, Chao Yu wrote: >>>> This reverts commit 5222595d093ebe80329d38d255d14316257afb3e. >>>> >>&

Re: [f2fs-dev] [PATCH] f2fs: avoid kernel panic on corruption test

2019-11-04 Thread Chao Yu
On 2019/11/2 0:36, Jaegeuk Kim wrote: > xfstests/generic/475 complains kernel warn/panic while testing corrupted disk. > > Signed-off-by: Jaegeuk Kim Reviewed-by: Chao Yu Thanks, ___ Linux-f2fs-devel mailing list Linux-f

Re: [f2fs-dev] [PATCH 3/3] Revert "f2fs: use kvmalloc, if kmalloc is failed"

2019-11-04 Thread Chao Yu
On 2019/11/5 8:02, Jaegeuk Kim wrote: > On 11/01, Chao Yu wrote: >> This reverts commit 5222595d093ebe80329d38d255d14316257afb3e. >> >> As discussed with Eric, as kvmalloc() will try kmalloc() first, so >> when we need allocate large size memory, it'd better to use

Re: [f2fs-dev] [PATCH 3/3] Revert "f2fs: use kvmalloc, if kmalloc is failed"

2019-11-04 Thread Chao Yu
lied to the wrong git tree, please drop us a note to help > improve the system. BTW, we also suggest to use '--base' option to specify the > base tree in git format-patch, please see > https://stackoverflow.com/a/37406982] > > url: > https://github.com/0day-ci/linux/commit

Re: [f2fs-dev] [PATCH] Revert "ext4 crypto: fix to check feature status before get policy"

2019-11-03 Thread Chao Yu
Sorry to introduce such issue... :( On 2019/10/31 3:02, Eric Biggers wrote: > On Wed, Oct 30, 2019 at 10:51:20AM -0700, Doug Anderson wrote: >> Hi, >> >> On Wed, Oct 30, 2019 at 10:38 AM Eric Biggers wrote: >>> >>> Hi Douglas, >>> >>> On Wed, Oct 30, 2019 at 10:06:25AM -0700, Douglas Anderson

Re: [f2fs-dev] [RFC PATCH v3] f2fs: support data compression

2019-11-01 Thread Chao Yu
On 2019-11-2 2:26, Jaegeuk Kim wrote: On 11/01, Jaegeuk Kim wrote: On 11/01, Jaegeuk Kim wrote: On 11/01, Chao Yu wrote: This patch tries to support compression in f2fs. - New term named cluster is defined as basic unit of compression, file can be divided into multiple clusters logically

[f2fs-dev] [PATCH v4] common/rc: generalize _get_filesize()

2019-11-01 Thread Chao Yu
There are some testcases use below two kind of commands to get file size, generalize the second way as global function _get_filesize() to simply codes. 1. ls -l $1 | $AWK_PROG '{print $5}' 2. stat -c %s $1 Signed-off-by: Chao Yu --- v4: - let _get_filesize() to cover more codes. common

[f2fs-dev] [RFC PATCH v3] f2fs: support data compression

2019-11-01 Thread Chao Yu
ing to Eric's comments. 20191101 - apply fixes from Jaegeuk [Jaegeuk Kim] - add tracepoint for f2fs_{,de}compress_pages() - fix many bugs and add some compression stats Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim --- Documentation/filesystems/f2fs.txt | 52 ++ fs/f2fs/Kconfig

Re: [f2fs-dev] [RFC PATCH v2] f2fs: support data compression

2019-11-01 Thread Chao Yu
On 2019/11/1 0:01, Jaegeuk Kim wrote: >> +f2fs-$(CONFIG_FS_COMPRESSION) += compress.o > CONFIG_F2FS_FS_COMPRESSION? Fixed. > >> +#ifdef F2FS_FS_COMPRESSION > Do we need this? Ditto. > >> +bool f2fs_is_compress_backend_ready(struct inode *inode) >> +{ >> +if (!f2fs_compressed_file(inode))

Re: [f2fs-dev] [PATCH 2/2] f2fs: support data compression

2019-11-01 Thread Chao Yu
Hi Jaegeuk, On 2019/10/31 23:35, Jaegeuk Kim wrote: > Hi Chao, > > On 10/31, Chao Yu wrote: >> On 2019/10/31 0:50, Eric Biggers wrote: >>> No, just use kvmalloc(). The whole point of kvmalloc() is that it tries >>> kmalloc() and then falls back to vmalloc() i

[f2fs-dev] [PATCH 3/3] Revert "f2fs: use kvmalloc, if kmalloc is failed"

2019-11-01 Thread Chao Yu
in f2fs_kmalloc(). In order to avoid allocation failure described in original commit, I change to use f2fs_kvmalloc() for .free_nid_bitmap bitmap memory. Signed-off-by: Chao Yu --- fs/f2fs/acl.c| 6 ++--- fs/f2fs/checkpoint.c | 2 +- fs/f2fs/data.c | 2 +- fs/f2fs/debug.c | 2

[f2fs-dev] [PATCH 1/3] f2fs: clean up check condition for writting beyond EOF

2019-11-01 Thread Chao Yu
dex >= nr_pages) goto out; Signed-off-by: Chao Yu --- fs/f2fs/data.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index ba3bcf4c7889..ca7161e38d1f 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -2204,6 +2204,7 @@ stat

[f2fs-dev] [PATCH 2/3] f2fs: show f2fs instance in printk_ratelimited

2019-11-01 Thread Chao Yu
As Eric mentioned, bare printk{,_ratelimited} won't show which filesystem instance these message is coming from, this patch tries to show fs instance with sb->s_id field in all places we missed before. Signed-off-by: Chao Yu --- fs/f2fs/checkpoint.c | 2 +- fs/f2fs/data.c |

Re: [f2fs-dev] [PATCH] f2fs: bio_alloc should never fail

2019-10-31 Thread Chao Yu
On 2019/10/31 0:33, Jaegeuk Kim wrote: > On 10/30, Theodore Y. Ts'o wrote: >> On Wed, Oct 30, 2019 at 11:50:37PM +0800, Gao Xiang wrote: >>> >>> So I'm curious about the original issue in commit 740432f83560 >>> ("f2fs: handle failed bio allocation"). Since f2fs manages multiple write >>> bios

Re: [f2fs-dev] [PATCH 1/2] f2fs: support aligned pinned file

2019-10-30 Thread Chao Yu
On 2019/10/31 0:09, Jaegeuk Kim wrote: > On 10/26, Chao Yu wrote: >> On 2019/10/26 2:18, Jaegeuk Kim wrote: >>> On 10/24, Chao Yu wrote: >>>> Hi Jaegeuk, >>>> >>>> On 2019/10/23 1:16, Jaegeuk Kim wrote: >>>>> This patch supp

Re: [f2fs-dev] [PATCH 2/2] f2fs: support data compression

2019-10-30 Thread Chao Yu
On 2019/10/31 1:02, Eric Biggers wrote: > On Wed, Oct 30, 2019 at 04:43:52PM +0800, Chao Yu wrote: >>>>>> static void bio_post_read_processing(struct bio_post_read_ctx *ctx) >>>>>> { >>>>>> -/* >>>>>> - *

Re: [f2fs-dev] [PATCH 2/2] f2fs: support data compression

2019-10-30 Thread Chao Yu
On 2019/10/31 0:50, Eric Biggers wrote: > No, just use kvmalloc(). The whole point of kvmalloc() is that it tries > kmalloc() and then falls back to vmalloc() if it fails. Okay, it's fine to me, let me fix this in another patch. Thanks, > > - Eric > . >

Re: [f2fs-dev] [PATCH] f2fs: bio_alloc should never fail

2019-10-30 Thread Chao Yu
On 2019/10/30 23:14, Theodore Y. Ts'o wrote: > On Wed, Oct 30, 2019 at 06:43:45PM +0800, Gao Xiang wrote: >>> You're right, in low memory scenario, allocation with bioset will be >>> faster, as >>> you mentioned offline, maybe we can add/use a priviate bioset like btrfs did >>> rather than using

Re: [f2fs-dev] [PATCH] f2fs: bio_alloc should never fail

2019-10-30 Thread Chao Yu
Hi Xiang, On 2019/10/30 17:15, Gao Xiang wrote: > Hi Chao, > > On Wed, Oct 30, 2019 at 04:56:17PM +0800, Chao Yu wrote: >> On 2019/10/30 11:55, Gao Xiang wrote: >>> remove such useless code and related fault injection. >> >> Hi Xiang, >> >> Althou

Re: [f2fs-dev] [PATCH] f2fs: bio_alloc should never fail

2019-10-30 Thread Chao Yu
On 2019/10/30 11:55, Gao Xiang wrote: > remove such useless code and related fault injection. Hi Xiang, Although, there is so many 'nofail' allocation in f2fs, I think we'd better avoid such allocation as much as possible (now for read path, we may allow to fail to allocate bio), I suggest to

Re: [f2fs-dev] [PATCH 2/2] f2fs: support data compression

2019-10-30 Thread Chao Yu
On 2019/10/30 10:55, Eric Biggers wrote: > On Tue, Oct 29, 2019 at 04:33:36PM +0800, Chao Yu wrote: >> On 2019/10/28 6:50, Eric Biggers wrote: >>>> +bool f2fs_is_compressed_page(struct page *page) >>>> +{ >>>> + if (!pag

Re: [f2fs-dev] Question about f2fs UDC(userdata checkpointing)

2019-10-29 Thread Chao Yu
> > Thanks, > Mao > > > At 2019-10-24 21:15:20, "王矛" wrote: > > Chao, > > Very appreciated for your kind and prompt reply. :) > > Let me try to spend more time on the f2fs UDC related code and get back > later if I have further

[f2fs-dev] [RFC PATCH v2] f2fs: support data compression

2019-10-29 Thread Chao Yu
to Eric's comments. [Jaegeuk Kim] - add tracepoint for f2fs_{,de}compress_pages() - fix many bugs and add some compression stats Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim --- Documentation/filesystems/f2fs.txt | 52 ++ fs/f2fs/Kconfig| 23 + fs/f2fs/Makefile

Re: [f2fs-dev] [PATCH 2/2] f2fs: support data compression

2019-10-29 Thread Chao Yu
On 2019/10/28 6:50, Eric Biggers wrote: >> +bool f2fs_is_compressed_page(struct page *page) >> +{ >> +if (!page_private(page)) >> +return false; >> +if (IS_ATOMIC_WRITTEN_PAGE(page) || IS_DUMMY_WRITTEN_PAGE(page)) >> +return false; >> +return *((u32

Re: [f2fs-dev] [PATCH 1/2] f2fs: delete duplicate information on sysfs nodes

2019-10-25 Thread Chao Yu
On 2019/10/26 2:23, Jaegeuk Kim wrote: > On 10/24, Chao Yu wrote: >> On 2019/10/24 5:48, Hridya Valsaraju wrote: >>> This patch merges the sysfs node documentation present in >>> Documentation/filesystems/f2fs.txt and >>> Documentation/ABI/testing/sysfs-f

Re: [f2fs-dev] [PATCH 2/2] f2fs: Add f2fs stats to sysfs

2019-10-25 Thread Chao Yu
On 2019/10/26 2:22, Jaegeuk Kim wrote: > On 10/25, Chao Yu wrote: >> On 2019/10/25 11:51, Hridya Valsaraju wrote: >>> On Thu, Oct 24, 2019 at 2:26 AM Chao Yu wrote: >>>> >>>> On 2019/10/24 5:48, Hridya Valsaraju wrote: >>>>> Currently f2fs

Re: [f2fs-dev] [PATCH 1/2] f2fs: support aligned pinned file

2019-10-25 Thread Chao Yu
On 2019/10/26 2:18, Jaegeuk Kim wrote: > On 10/24, Chao Yu wrote: >> Hi Jaegeuk, >> >> On 2019/10/23 1:16, Jaegeuk Kim wrote: >>> This patch supports 2MB-aligned pinned file, which can guarantee no GC at >>> all >>> by allocating fully valid

Re: [f2fs-dev] [PATCH 2/2] f2fs: support data compression

2019-10-25 Thread Chao Yu
On 2019/10/23 13:24, Eric Biggers wrote: > How was this tested? Shouldn't there a mount option analogous to This should be a pre-RFC version..., I only didn't simple test on it, will do more later with combination of other features. Thanks, ___

Re: [f2fs-dev] [PATCH 2/2] f2fs: Add f2fs stats to sysfs

2019-10-25 Thread Chao Yu
On 2019/10/25 11:51, Hridya Valsaraju wrote: > On Thu, Oct 24, 2019 at 2:26 AM Chao Yu wrote: >> >> On 2019/10/24 5:48, Hridya Valsaraju wrote: >>> Currently f2fs stats are only available from /d/f2fs/status. This patch >>> adds some of the f2fs stats to sysfs

Re: [f2fs-dev] [bug report] compiler warning: fs/f2fs/node.c: In function ‘__set_nat_cache_dirty’: ‘head’ may be used uninitialized

2019-10-25 Thread Chao Yu
On 2019/10/24 17:54, Ardelean, Alexandru wrote: > On Thu, 2019-10-24 at 17:12 +0800, Chao Yu wrote: >> [External] >> >> On 2019/10/23 22:02, Ardelean, Alexandru wrote: >>> Seems to have been introduced via: >>> >>> ---

Re: [f2fs-dev] [PATCH v5 6/8] fsck: Check fsync data always for zoned block devices

2019-10-24 Thread Chao Yu
On 2019/10/23 1:09, Jaegeuk Kim wrote: > On 10/22, Chao Yu wrote: >> On 2019/10/18 14:37, Shin'ichiro Kawasaki wrote: >>> Fsck checks fsync data when UMOUNT flag is not set. When the f2fs was not >>> cleanly unmouted, UMOUNT flag is not recorded in meta data and

Re: [f2fs-dev] [PATCH 2/2] f2fs: Add f2fs stats to sysfs

2019-10-24 Thread Chao Yu
On 2019/10/24 5:48, Hridya Valsaraju wrote: > Currently f2fs stats are only available from /d/f2fs/status. This patch > adds some of the f2fs stats to sysfs so that they are accessible even > when debugfs is not mounted. Why don't we mount debugfs first? Thanks,

Re: [f2fs-dev] [PATCH 1/2] f2fs: delete duplicate information on sysfs nodes

2019-10-24 Thread Chao Yu
On 2019/10/24 5:48, Hridya Valsaraju wrote: > This patch merges the sysfs node documentation present in > Documentation/filesystems/f2fs.txt and > Documentation/ABI/testing/sysfs-fs-f2fs > and deletes the duplicate information from > Documentation/filesystems/f2fs.txt. This is to prevent having to

Re: [f2fs-dev] [bug report] compiler warning: fs/f2fs/node.c: In function ‘__set_nat_cache_dirty’: ‘head’ may be used uninitialized

2019-10-24 Thread Chao Yu
On 2019/10/23 22:02, Ardelean, Alexandru wrote: > Seems to have been introduced via: > > > > commit 780de47cf6cb5f524cd98ec8ffbffc3da5696e17 > Author: Chao Yu > Date: Tue Mar 20 23:08:30 2018 +0800 > >

Re: [f2fs-dev] [PATCH 2/2] f2fs: support data compression

2019-10-24 Thread Chao Yu
Hi Ju Hyung, On 2019/10/23 1:53, Ju Hyung Park wrote: > Hi Jaegeuk and Chao, > > Nice to see this finally getting into shape :) Great work > I'm excited to see possible use-cases for this in the future. > > Would f2fs compress files automatically like how btrfs' "compress" option > works? > Or

Re: [f2fs-dev] [PATCH 1/2] f2fs: support aligned pinned file

2019-10-24 Thread Chao Yu
Hi Jaegeuk, On 2019/10/23 1:16, Jaegeuk Kim wrote: > This patch supports 2MB-aligned pinned file, which can guarantee no GC at all > by allocating fully valid 2MB segment. > > Signed-off-by: Jaegeuk Kim > --- > fs/f2fs/f2fs.h | 4 +++- > fs/f2fs/file.c | 39

[PATCH] f2fs: fix wrong description in document

2019-10-22 Thread Chao Yu
As reported in bugzilla, default value of DEF_RAM_THRESHOLD was fixed by commit 29710bcf9426 ("f2fs: fix wrong percentage"), however leaving wrong description in document, fix it. https://bugzilla.kernel.org/show_bug.cgi?id=205203 Signed-off-by: Chao Yu --- Documentation/filesystem

Re: [f2fs-dev] [PATCH v5 3/8] libf2fs_zoned: Introduce f2fs_reset_zone() helper function

2019-10-22 Thread Chao Yu
On 2019/10/22 17:10, Damien Le Moal wrote: > On 2019/10/22 17:59, Chao Yu wrote: >> On 2019/10/18 14:37, Shin'ichiro Kawasaki wrote: >>> To prepare for write pointer consistency fix by fsck, add >>> f2fs_reset_zone() helper function which calls RESET ZONE command. The &

Re: [f2fs-dev] [PATCH v5 6/8] fsck: Check fsync data always for zoned block devices

2019-10-22 Thread Chao Yu
On 2019/10/18 14:37, Shin'ichiro Kawasaki wrote: > Fsck checks fsync data when UMOUNT flag is not set. When the f2fs was not > cleanly unmouted, UMOUNT flag is not recorded in meta data and fsync data > can be left in the f2fs. The first fsck run checks fsync data to reflect > it on quota status

Re: [f2fs-dev] [PATCH v5 5/8] fsck: Introduce move_one_curseg_info() function

2019-10-22 Thread Chao Yu
current segment. Call > move_one_curseg_info() in place of move_curseg_info() from > update_curseg_info(). Good catch! > > Signed-off-by: Shin'ichiro Kawasaki Reviewed-by: Chao Yu Thanks, ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@

Re: [f2fs-dev] [PATCH v5 4/8] fsck: Find free zones instead of blocks to assign to current segments

2019-10-22 Thread Chao Yu
set() for the devices with ZONED_HM model for the > same reason. > > Signed-off-by: Shin'ichiro Kawasaki 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

Re: [f2fs-dev] [PATCH v5 3/8] libf2fs_zoned: Introduce f2fs_reset_zone() helper function

2019-10-22 Thread Chao Yu
On 2019/10/18 14:37, Shin'ichiro Kawasaki wrote: > To prepare for write pointer consistency fix by fsck, add > f2fs_reset_zone() helper function which calls RESET ZONE command. The > function is added to lib/libf2fs_zoned which gathers zoned block device > related functions. > > Signed-off-by:

Re: [f2fs-dev] [PATCH v5 2/8] libf2fs_zoned: Introduce f2fs_report_zone() helper function

2019-10-22 Thread Chao Yu
zoned block device related functions. > > Signed-off-by: Shin'ichiro Kawasaki 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

Re: [f2fs-dev] [PATCH v5 1/8] libf2fs_zoned: Introduce f2fs_report_zones() helper function

2019-10-22 Thread Chao Yu
ructure out of libf2fs_zoned, provide a callback > function in fsck to f2fs_report_zones() and call it for each zone. > > Add SECTOR_SHIFT definition in include/f2fs_fs.h to avoid a magic number > to convert bytes into 512B sectors. > > Signed-off-b

Re: [PATCH v2] f2fs: fix to avoid memory leakage in f2fs_listxattr

2019-10-22 Thread Chao Yu
On 2019/10/18 14:56, Randall Huang wrote: > In f2fs_listxattr, there is no boundary check before > memcpy e_name to buffer. > If the e_name_len is corrupted, > unexpected memory contents may be returned to the buffer. > > Signed-off-by: Randall Huang Reviewed-by: Chao Yu Thanks,

Re: [f2fs-dev] [PATCH v2 0/2] add a new fio cache for IPU.

2019-10-22 Thread Chao Yu
Hi Lihong, On 2019/10/16 18:11, Lihong Kou wrote: > Introdce a new fio cache for IPU. > After commit 8648de2c581(f2fs: add bio cache for IPU) > in the mainline, we still have the problem in SQLite. So I > reuse the fio data structs to cache the mergeale write IO in > wirtepages(). I have

Re: [f2fs-dev] [PATCH v3] common/rc: generalize _get_filesize()

2019-10-16 Thread Chao Yu
On 2019/10/16 11:43, Dave Chinner wrote: > On Wed, Oct 16, 2019 at 10:48:03AM +0800, Chao Yu wrote: >> There are some testcases use below command to get file size, generalize >> it as global function _get_filesize() >> >> ls -l $1 | $AWK_PROG '{print $5}' >> >

Re: [f2fs-dev] [PATCH v2] common/rc: generalize _get_filesize()

2019-10-15 Thread Chao Yu
On 2019/10/16 2:17, Darrick J. Wong wrote: > On Tue, Oct 15, 2019 at 06:11:49PM +0800, Chao Yu wrote: >> There are some testcases use below command to get file size, generalize >> it as global function _get_filesize() >> >> ls -l $1 | $AWK_PROG '{print $5}' >> >

[f2fs-dev] [PATCH v3] common/rc: generalize _get_filesize()

2019-10-15 Thread Chao Yu
ove unused _filesize in generic/013 Signed-off-by: Chao Yu --- v3: - avoid unneeded echo command in _get_filesize() pointed out by Darrick. common/defrag | 2 +- common/rc | 5 + tests/generic/013 | 5 - tests/generic/275 | 2 +- tests/generic/315 | 2 +- 5 files changed, 8 insert

Re: [f2fs-dev] [PATCH v2 1/2] common/defrag: support f2fs

2019-10-15 Thread Chao Yu
Jaegeuk, do you have time to check these two patches which are trying to adjust defrag/casefold testcase for f2fs? On 2019/10/15 18:09, Chao Yu wrote: > F2FS supports defragment based on file granularity, adjust test suit > to support f2fs. > > Signed-off-by: Chao Yu > --- >

[f2fs-dev] [PATCH v2] common/rc: generalize _get_filesize()

2019-10-15 Thread Chao Yu
ove unused _filesize in generic/013 Signed-off-by: Chao Yu --- v2: - As suggested by Eryu, let's use "stat -c %s" instead of original complicated one. common/defrag | 2 +- common/rc | 5 + tests/generic/013 | 5 - tests/generic/275 | 2 +- tests/generic/315 | 2 +-

[f2fs-dev] [PATCH v2 2/2] common/casefold: support f2fs

2019-10-15 Thread Chao Yu
Now, f2fs has ported casefold feature from ext4, let's enable the testcase. Signed-off-by: Chao Yu --- v2: - no changes. common/casefold | 9 + 1 file changed, 9 insertions(+) diff --git a/common/casefold b/common/casefold index 2a7ab3eb..9172d818 100644 --- a/common/casefold +++ b

[f2fs-dev] [PATCH v2 1/2] common/defrag: support f2fs

2019-10-15 Thread Chao Yu
F2FS supports defragment based on file granularity, adjust test suit to support f2fs. Signed-off-by: Chao Yu --- v2: - use local variable in function common/config | 2 ++ common/defrag | 11 ++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/common/config b/common

Re: [f2fs-dev] [PATCH] common/rc: generalize _get_filesize()

2019-10-15 Thread Chao Yu
On 2019/10/2 19:02, Eryu Guan wrote: > On Fri, Sep 27, 2019 at 06:07:42PM +0800, Chao Yu wrote: >> There are some testcases use below command to get file size, generalize >> it as global function _get_filesize() >> >> ls -l $1 | $AWK_PROG '{print $5}' >> >&

Re: [f2fs-dev] [PATCH 1/2] common/defrag: support f2fs

2019-10-15 Thread Chao Yu
On 2019/10/2 18:59, Eryu Guan wrote: > On Fri, Sep 27, 2019 at 06:06:26PM +0800, Chao Yu wrote: >> F2FS supports defragment based on file granularity, adjust test suit >> to support f2fs. >> >> Signed-off-by: Chao Yu >> --- >> common/config | 2 ++ >>

Re: [PATCH] f2fs: fix to avoid memory leakage in f2fs_listxattr

2019-10-15 Thread Chao Yu
Hi Randall, On 2019/10/9 11:20, Randall Huang wrote: > In f2fs_listxattr, there is no boundary check before > memcpy e_name to buffer. > If the e_name_len is corrupted, > unexpected memory contents may be returned to the buffer. > > Signed-off-by: Randall Huang > --- > fs/f2fs/xattr.c | 14

Re: [f2fs-dev] [PATCH] tools/fibmap: fix build error

2019-10-15 Thread Chao Yu
ot;f2fs-tools: Add support for Casefolding") > 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

Re: [f2fs-dev] [PATCH 1/2] f2fs_io: add helper functions for handling errors

2019-10-15 Thread Chao Yu
On 2019/10/5 6:43, Eric Biggers wrote: > From: Eric Biggers > > Add and use helper functions for: > > - Printing an error message (optionally with errno) and exiting. > - Allocating memory, exiting on error. > - Opening a file, exiting on error. > > Signed-off-by: Eric Biggers > --- >

[PATCH] f2fs: cache global IPU bio

2019-09-30 Thread Chao Yu
for merged IPU pages, then f2fs_wait_on_page_writeback() is able to submit bio if a writebacked page is cached in global bio cache. Signed-off-by: Chao Yu --- fs/f2fs/data.c| 179 +- fs/f2fs/f2fs.h| 11 +++ fs/f2fs/segment.c | 3 + fs/f2fs/super.c | 8 +++ 4 files ch

Re: [f2fs-dev] [PATCH] f2fs: fix comment of f2fs_evict_inode

2019-09-28 Thread Chao Yu
On 2019/9/29 10:20, Gao Xiang wrote: > On Sun, Sep 29, 2019 at 08:53:05AM +0800, Chao Yu wrote: >> Hi Jaegeuk, >> >> On 2019/9/28 2:31, Jaegeuk Kim wrote: >>> Hi Chao, >>> >>> On 09/25, Chao Yu wrote: >>>> evict() should be ca

Re: [f2fs-dev] [PATCH v4 2/2] fsck.f2fs: Check write pointer consistency with current segments

2019-09-28 Thread Chao Yu
On 2019/9/25 16:05, Shinichiro Kawasaki wrote: > On Sep 21, 2019 / 17:42, Chao Yu wrote: >> On 2019/9/18 11:07, Shinichiro Kawasaki wrote: >>> Thanks for the comments. I read f2fs code further, and think still the >>> SIT vs write pointer check can be implemented a

Re: [f2fs-dev] [PATCH] f2fs: fix a comment in f2fs_shrink_count()

2019-09-28 Thread Chao Yu
Hi Chengguang, Thanks a lot for the patch, previously I've sent a patch to fix most inconsistent comments including below one, could you check that? https://lore.kernel.org/linux-f2fs-devel/20190927102305.11587-1-yuch...@huawei.com/T/#u Thanks, On 2019/9/28 9:40, Chengguang Xu via

Re: [PATCH] f2fs: fix comment of f2fs_evict_inode

2019-09-28 Thread Chao Yu
Hi Jaegeuk, On 2019/9/28 2:31, Jaegeuk Kim wrote: > Hi Chao, > > On 09/25, Chao Yu wrote: >> evict() should be called once i_count is zero, rather than i_nlinke >> is zero. >> >> Reported-by: Gao Xiang >> Signed-off-by: Chao Yu >> --- >> fs/

[PATCH] f2fs: fix inconsistent comments

2019-09-27 Thread Chao Yu
Lack of maintenance on comments may mislead developers, fix them. Signed-off-by: Chao Yu --- fs/f2fs/checkpoint.c | 18 -- fs/f2fs/data.c | 19 ++- fs/f2fs/f2fs.h | 2 +- fs/f2fs/file.c | 1 - fs/f2fs/gc.c | 5 - fs/f2fs/inode.c

[f2fs-dev] [PATCH] common/rc: generalize _get_filesize()

2019-09-27 Thread Chao Yu
There are some testcases use below command to get file size, generalize it as global function _get_filesize() ls -l $1 | $AWK_PROG '{print $5}' - adjust common/defrag, generic/275 and generic/315 to use it - remove unused _filesize in generic/013 Signed-off-by: Chao Yu --- common/defrag

[f2fs-dev] [PATCH] generic/group: add missing dedupe tag for generic/493

2019-09-27 Thread Chao Yu
We missed to add the tag, fix it. Signed-off-by: Chao Yu --- tests/generic/group | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/generic/group b/tests/generic/group index 7cf4f6c4..18b5a545 100644 --- a/tests/generic/group +++ b/tests/generic/group @@ -495,7 +495,7

[f2fs-dev] [PATCH 2/2] common/casefold: support f2fs

2019-09-27 Thread Chao Yu
Now, f2fs has ported casefold feature from ext4, let's enable the testcase. Signed-off-by: Chao Yu --- common/casefold | 9 + 1 file changed, 9 insertions(+) diff --git a/common/casefold b/common/casefold index 2a7ab3eb..9172d818 100644 --- a/common/casefold +++ b/common/casefold

[f2fs-dev] [PATCH 1/2] common/defrag: support f2fs

2019-09-27 Thread Chao Yu
F2FS supports defragment based on file granularity, adjust test suit to support f2fs. Signed-off-by: Chao Yu --- common/config | 2 ++ common/defrag | 11 ++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/common/config b/common/config index 4c86a492..c43be339 100644

[PATCH] f2fs: fix to update time in lazytime mode

2019-09-27 Thread Chao Yu
So eventually, after evict(), we lose last atime for ever. To fix this issue, we need to check whether {a,c,m,cr}time is consistent in between inode cache and inode page, and only skip f2fs_update_inode() if f2fs inode is not dirty and time is consistent as well. Signed-off-by: Chao Yu --- fs/

Re: [f2fs-dev] [PATCH] f2fs: mark recovery flag correctly in read_raw_super_block()

2019-09-27 Thread Chao Yu
On 2019/9/27 9:35, Chengguang Xu via Linux-f2fs-devel wrote: > On the combination of first fail and second success, > we will miss to mark recovery flag because currently > we reuse err variable in the loop. > > Signed-off-by: Chengguang Xu Reviewed-by: C

Re: [f2fs-dev] [PATCH] mkfs/Makefile.am: fix build without blkid

2019-09-26 Thread Chao Yu
On 2019/9/23 2:41, Fabrice Fontaine wrote: > Commit d56232bc1640e2a3ffc412faff42cd8e77dbb8dd hardcoded -lblkid in > libf2fs_format_la_LDFLAGS which breaks the build with --without-blkid > option so use ${libblkid_LIBS} instead > > Signed-off-by: Fabrice Fontaine Reviewed-by: C

Re: [f2fs-dev] [PATCH] f2fs: fix comment of f2fs_evict_inode

2019-09-25 Thread Chao Yu
On 2019/9/25 21:47, Gao Xiang wrote: > Hi Chao, > > On Wed, Sep 25, 2019 at 05:30:50PM +0800, Chao Yu wrote: >> evict() should be called once i_count is zero, rather than i_nlinke >> is zero. >> >> Reported-by: Gao Xiang >> Signed-off-by: Chao Yu >&

[PATCH] f2fs: fix comment of f2fs_evict_inode

2019-09-25 Thread Chao Yu
evict() should be called once i_count is zero, rather than i_nlinke is zero. Reported-by: Gao Xiang Signed-off-by: Chao Yu --- fs/f2fs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c index db4fec30c30d..8262f4a483d3 100644 --- a/fs

Re: [f2fs-dev] [PATCH 1/1] fsck.f2fs: check total_segments from devices in raw_super

2019-09-23 Thread Chao Yu
+Cc f2fs mailing list On 2019/9/23 12:24, sunqiuyang wrote: > From: Qiuyang Sun > > For multi-device F2FS, we should check if the sum of total_segments from > all devices matches segment_count. > > Signed-off-by: Qiuyang Sun Reviewed-by: Chao Yu Thanks, > ---

Re: [PATCH 1/1] f2fs: check total_segments from devices in raw_super

2019-09-23 Thread Chao Yu
On 2019/9/23 12:22, sunqiuyang wrote: > From: Qiuyang Sun > > For multi-device F2FS, we should check if the sum of total_segments from > all devices matches segment_count. > > Signed-off-by: Qiuyang Sun Reviewed-by: Chao Yu Thanks,

Re: [PATCH v2 1/1] f2fs: update multi-dev metadata in resize_fs

2019-09-23 Thread Chao Yu
minor cleanup. > > Signed-off-by: Qiuyang Sun Reviewed-by: Chao Yu Thanks,

Re: [PATCH 1/1] f2fs: update multi-dev metadata in resize_fs

2019-09-22 Thread Chao Yu
On 2019/9/18 20:51, sunqiuyang wrote: > From: Qiuyang Sun > > Multi-device metadata should be updated in resize_fs as well. > > Also, we check that the new FS size still reaches the last device. > > Signed-off-by: Qiuyang Sun > --- > fs/f2fs/gc.c | 32 ++-- > 1

Re: [f2fs-dev] [PATCH v4 2/2] fsck.f2fs: Check write pointer consistency with current segments

2019-09-21 Thread Chao Yu
On 2019/9/18 11:07, Shinichiro Kawasaki wrote: > Thanks for the comments. I read f2fs code further, and think still the > SIT vs write pointer check can be implemented and meaningful. > > F2fs ensures consistency of SIT using two CP areas, two SIT areas and > sit_bitmap in CP. These metadata are

Re: [f2fs-dev] [PATCH 1/2] f2fs: do not select same victim right again

2019-09-18 Thread Chao Yu
On 2019/9/19 0:47, Jaegeuk Kim wrote: > On 09/18, Chao Yu wrote: >> On 2019/9/18 11:12, Jaegeuk Kim wrote: >>> On 09/18, Chao Yu wrote: >>>> On 2019/9/18 4:55, Jaegeuk Kim wrote: >>>>> On 09/17, Chao Yu wrote: >>>>>> On 2019

Re: [f2fs-dev] [PATCH 1/2] f2fs: do not select same victim right again

2019-09-17 Thread Chao Yu
On 2019/9/18 11:12, Jaegeuk Kim wrote: > On 09/18, Chao Yu wrote: >> On 2019/9/18 4:55, Jaegeuk Kim wrote: >>> On 09/17, Chao Yu wrote: >>>> On 2019/9/16 23:37, Jaegeuk Kim wrote: >>>>> On 09/16, Chao Yu wrote: >>>>>> On 201

Re: [f2fs-dev] [PATCH 1/2] f2fs: do not select same victim right again

2019-09-17 Thread Chao Yu
On 2019/9/18 4:55, Jaegeuk Kim wrote: > On 09/17, Chao Yu wrote: >> On 2019/9/16 23:37, Jaegeuk Kim wrote: >>> On 09/16, Chao Yu wrote: >>>> On 2019/9/9 20:04, Jaegeuk Kim wrote: >>>>> On 09/09, Chao Yu wrote: >>>>>> On 201

Re: [f2fs-dev] [PATCH v4] f2fs: Fix indefinite loop in f2fs_gc()

2019-09-17 Thread Chao Yu
Hi Sahitya, On 2019/9/17 13:33, Sahitya Tummala wrote: > Hi Chao, > > On Fri, Sep 06, 2019 at 07:00:32PM +0800, Chao Yu wrote: >> Hi Sahitya, >> >> Luckily, I can reproduce this issue with generic/269, and have sent another >> patch for the issue, could you plea

  1   2   3   4   5   6   7   8   9   10   >