[f2fs-dev] [PATCH 5/5] fscrypt: remove mention of symlink st_size quirk from documentation

2021-07-01 Thread Eric Biggers
From: Eric Biggers Now that the correct st_size is reported for encrypted symlinks on all filesystems, update the documentation accordingly. Signed-off-by: Eric Biggers --- Documentation/filesystems/fscrypt.rst | 5 - 1 file changed, 5 deletions(-) diff --git a/Documentation/filesystems/f

[f2fs-dev] [PATCH 0/5] fscrypt: report correct st_size for encrypted symlinks

2021-07-01 Thread Eric Biggers
This series makes the stat() family of syscalls start reporting the correct size for encrypted symlinks. See patch 1 for a detailed explanation of the problem and solution. Patch 1 adds a helper function that computes the correct size for an encrypted symlink. Patches 2-4 make the filesystems wi

[f2fs-dev] [PATCH 2/5] ext4: report correct st_size for encrypted symlinks

2021-07-01 Thread Eric Biggers
From: Eric Biggers The stat() family of syscalls report the wrong size for encrypted symlinks, which has caused breakage in several userspace programs. Fix this by calling fscrypt_symlink_getattr() after ext4_getattr() for encrypted symlinks. This function computes the correct size by reading a

[f2fs-dev] [PATCH 3/5] f2fs: report correct st_size for encrypted symlinks

2021-07-01 Thread Eric Biggers
From: Eric Biggers The stat() family of syscalls report the wrong size for encrypted symlinks, which has caused breakage in several userspace programs. Fix this by calling fscrypt_symlink_getattr() after f2fs_getattr() for encrypted symlinks. This function computes the correct size by reading a

[f2fs-dev] [PATCH 1/5] fscrypt: add fscrypt_symlink_getattr() for computing st_size

2021-07-01 Thread Eric Biggers
From: Eric Biggers Add a helper function fscrypt_symlink_getattr() which will be called from the various filesystems' ->getattr() methods to read and decrypt the target of encrypted symlinks in order to report the correct st_size. Detailed explanation: As required by POSIX and as documented in

[f2fs-dev] [PATCH 4/5] ubifs: report correct st_size for encrypted symlinks

2021-07-01 Thread Eric Biggers
From: Eric Biggers The stat() family of syscalls report the wrong size for encrypted symlinks, which has caused breakage in several userspace programs. Fix this by calling fscrypt_symlink_getattr() after ubifs_getattr() for encrypted symlinks. This function computes the correct size by reading

Re: [f2fs-dev] f2fs compress performance problem

2021-07-01 Thread Jaegeuk Kim
On 07/02, Fengnan Chang wrote: > Yes, I had enable compress_cache and extent_cache, compress_cache indeed can > improve random read performance, but couldn't improve other test case.And > extent_cache was default enabled in my test. Sorry, we enabled extent_cache for RO partition only. static inl

[f2fs-dev] [PATCH v2] f2fs: compress: allow write compress released file after truncate to zero

2021-07-01 Thread Fengnan Chang
We should allow write compress released file after truncate to zero. Signed-off-by: Fengnan Chang --- fs/f2fs/file.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 6afd4562335f..684fc2e8d8a4 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -74

Re: [f2fs-dev] f2fs compress performance problem

2021-07-01 Thread Fengnan Chang
Yes, I had enable compress_cache and extent_cache, compress_cache indeed can improve random read performance, but couldn't improve other test case.And extent_cache was default enabled in my test. Fix the description of the previous email: 4. 4K random overwrite has dropped to 1% of original,

Re: [f2fs-dev] [PATCH v6] f2fs: compress: add nocompress extensions support

2021-07-01 Thread Jaegeuk Kim
On 07/02, Chao Yu wrote: > On 2021/7/2 0:57, Jaegeuk Kim wrote: > > On 07/01, Chao Yu wrote: > > > Hi all, > > > > > > I think code in this patch is clear, not sure about the comments, > > > Jaegeuk, any comments on this patch, Fengnan has pinged many times > > > > > > Let me know, if you are

Re: [f2fs-dev] [PATCH v2 RFC] f2fs: fix to force keeping write barrier for strict fsync mode

2021-07-01 Thread Jaegeuk Kim
On 07/02, Chao Yu wrote: > On 2021/7/2 1:10, Jaegeuk Kim wrote: > > On 06/01, Chao Yu wrote: > > > [1] > > > https://www.mail-archive.com/linux-f2fs-devel@lists.sourceforge.net/msg15126.html > > > > > > As [1] reported, if lower device doesn't support write barrier, in below > > > case: > > > >

Re: [f2fs-dev] [PATCH v2 RFC] f2fs: fix to force keeping write barrier for strict fsync mode

2021-07-01 Thread Chao Yu
On 2021/7/2 1:10, Jaegeuk Kim wrote: On 06/01, Chao Yu wrote: [1] https://www.mail-archive.com/linux-f2fs-devel@lists.sourceforge.net/msg15126.html As [1] reported, if lower device doesn't support write barrier, in below case: - write page #0; persist - overwrite page #0 - fsync - write dat

Re: [f2fs-dev] [PATCH] f2fs: compress: allow write compress released file after truncate to zero

2021-07-01 Thread Chao Yu
On 2021/7/2 1:01, Jaegeuk Kim wrote: On 06/28, Fengnan Chang wrote: We should allow write compress released file after truncate to zero. Signed-off-by: Fengnan Chang --- fs/f2fs/file.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c i

Re: [f2fs-dev] [PATCH v6] f2fs: compress: add nocompress extensions support

2021-07-01 Thread Chao Yu
On 2021/7/2 0:57, Jaegeuk Kim wrote: On 07/01, Chao Yu wrote: Hi all, I think code in this patch is clear, not sure about the comments, Jaegeuk, any comments on this patch, Fengnan has pinged many times Let me know, if you are too busy to review this patch these days. I reviewed it, and

Re: [f2fs-dev] [PATCH v2 RFC] f2fs: fix to force keeping write barrier for strict fsync mode

2021-07-01 Thread Jaegeuk Kim
On 06/01, Chao Yu wrote: > [1] > https://www.mail-archive.com/linux-f2fs-devel@lists.sourceforge.net/msg15126.html > > As [1] reported, if lower device doesn't support write barrier, in below > case: > > - write page #0; persist > - overwrite page #0 > - fsync > - write data page #0 OPU into de

Re: [f2fs-dev] f2fs compress performance problem

2021-07-01 Thread Jaegeuk Kim
On 06/04, changfeng...@vivo.com wrote: > Hi: > > I've been working on f2fs compression for a while, I'm confused on f2fs > compression performance, after a while reserch, > I found some problem, maybe need some discuss. > I use AndroBench test performance on mobile, after enable compression, the

Re: [f2fs-dev] [PATCH] f2fs: compress: allow write compress released file after truncate to zero

2021-07-01 Thread Jaegeuk Kim
On 06/28, Fengnan Chang wrote: > We should allow write compress released file after truncate to zero. > > Signed-off-by: Fengnan Chang > --- > fs/f2fs/file.c | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c > index 6afd4562335f..b91ae

Re: [f2fs-dev] [PATCH v6] f2fs: compress: add nocompress extensions support

2021-07-01 Thread Jaegeuk Kim
On 07/01, Chao Yu wrote: > Hi all, > > I think code in this patch is clear, not sure about the comments, > Jaegeuk, any comments on this patch, Fengnan has pinged many times > > Let me know, if you are too busy to review this patch these days. I reviewed it, and looks good to me. Merged in -

Re: [f2fs-dev] [PATCH v2] fs: forbid invalid project ID

2021-07-01 Thread Wang Shilong
On Tue, Jun 29, 2021 at 6:34 AM Dave Chinner wrote: > > On Mon, Jun 28, 2021 at 08:38:01AM -0400, Wang Shilong wrote: > > fileattr_set_prepare() should check if project ID > > is valid, otherwise dqget() will return NULL for > > such project ID quota. > > > > Signed-off-by: Wang Shilong > > --- >

Re: [f2fs-dev] [PATCH v6] f2fs: compress: add nocompress extensions support

2021-07-01 Thread Chao Yu
Hi all, I think code in this patch is clear, not sure about the comments, Jaegeuk, any comments on this patch, Fengnan has pinged many times Let me know, if you are too busy to review this patch these days. Thanks On 2021/7/1 11:30, Fengnan Chang wrote: Hi chao & jaegeuk: Any comment

Re: [f2fs-dev] [PATCH v3 3/3] generic/260: f2fs is also special

2021-07-01 Thread Chao Yu
On 2021/6/30 19:37, Sun Ke wrote: It fail on f2fs: [+] Default length with start set (should succeed) [+] Length beyond the end of fs (should succeed) [+] Length beyond the end of fs with start set (should succeed) +After the full fs discard 0 bytes were discarded however the file system i

Re: [f2fs-dev] [PATCH v3 2/3] generic/103: special left calculation for f2fs

2021-07-01 Thread Chao Yu
On 2021/6/30 19:37, Sun Ke wrote: It failed on f2fs: QA output created by 103 +fallocate: No space left on device Silence is golden. ... f2fs uses index(radix) tree as mapping metadata, its space overhead is about one thousandth of the data. Suggested-by: Chao Yu Sign

Re: [f2fs-dev] [PATCH v3 1/3] generic/042: make a bigger img for f2fs

2021-07-01 Thread Chao Yu
On 2021/6/30 19:37, Sun Ke wrote: f2fs-utils 1.9.0 needs at least 38 MB space for f2fs image. However, f2fs-utils 1.14.0 needs at least 52 MB. Not sure if it will change again. So, just set it to 128M. Suggested-by: Chao Yu Signed-off-by: Sun Ke Reviewed-by: Chao Yu __