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

2019-12-12 Thread Chao Yu
Hi Jaegeuk, On 2019-12-11 9:27, Jaegeuk Kim wrote: Hi Chao, Let me know, if it's okay to integrate compression patch all together. I don't have a critical bug to fix w/ them now. Cool, let me send a new RFC with below fix applied. Thanks, Another fix: --- fs/f2fs/compress.c | 101 +++

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

2019-12-10 Thread Jaegeuk Kim
Hi Chao, Let me know, if it's okay to integrate compression patch all together. I don't have a critical bug to fix w/ them now. Another fix: --- fs/f2fs/compress.c | 101 - fs/f2fs/data.c | 15 --- fs/f2fs/f2fs.h | 1 - 3 files changed,

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

2019-11-25 Thread Jaegeuk Kim
Fix having my additional fixes: --- fs/f2fs/compress.c | 114 ++-- fs/f2fs/data.c | 158 ++--- fs/f2fs/f2fs.h | 29 +++-- fs/f2fs/file.c | 25 +++ fs/f2fs/inode.c| 7 +- fs/f2fs/namei.c| 7 +- 6

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

2019-11-18 Thread Jaegeuk Kim
On 11/18, Jaegeuk Kim wrote: > On 11/13, Chao Yu wrote: > > Hi Jaegeuk, > > > > I've split workqueue for fsverity, please test compression based on last > > patch. > > > > I shutdown F2FS_FS_COMPRESSION config, it looks all verity testcases can > > pass, will > > do more test for compress/encry

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

2019-11-18 Thread Jaegeuk Kim
On 11/13, Chao Yu wrote: > Hi Jaegeuk, > > I've split workqueue for fsverity, please test compression based on last > patch. > > I shutdown F2FS_FS_COMPRESSION config, it looks all verity testcases can > pass, will > do more test for compress/encrypt/fsverity combination later. Thanks, I appli

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

2019-11-13 Thread Chao Yu
Hi Jaegeuk, I've split workqueue for fsverity, please test compression based on last patch. I shutdown F2FS_FS_COMPRESSION config, it looks all verity testcases can pass, will do more test for compress/encrypt/fsverity combination later. The diff is as below, code base is last g-dev-test branch

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() if it fails. >> >> Okay, it's fine to

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

2019-10-31 Thread Jaegeuk Kim
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() if it fails. > > Okay, it's fine to me, let me fix this in another patch. I've fixed some bugs.

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) >> { >> -/* >> - * We use different work queues for decryption and for verity >> because >

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 2/2] f2fs: support data compression

2019-10-30 Thread Jaegeuk Kim
On 10/30, Eric Biggers wrote: > On Wed, Oct 30, 2019 at 04:43:52PM +0800, Chao Yu wrote: > > 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 *pag

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

2019-10-30 Thread Gao Xiang via Linux-f2fs-devel
Hi Eric, (add some mm folks...) On Wed, Oct 30, 2019 at 09:50:56AM -0700, Eric Biggers wrote: > > >>> > > >>> It isn't really appropriate to create fake pagecache pages like this. > > >>> Did you > > >>> consider changing f2fs to use fscrypt_decrypt_block_inplace() instead? > > >> > > >> We

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

2019-10-30 Thread Eric Biggers
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) > { > -/* > - * We use different work queues for decryption and for verity > because > - * verity may require readi

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

2019-10-30 Thread Eric Biggers
On Wed, Oct 30, 2019 at 04:43:52PM +0800, Chao Yu wrote: > 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 (!page_p

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 (!page_private(page)) + return false; + if (IS_ATOMIC_WRITTEN_P

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

2019-10-29 Thread Eric Biggers
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 (!page_private(page)) > >> + return false; > >> + if (IS_ATOMIC_WRITTEN_PAGE(page) || IS_DUMMY_WRITTEN_PAGE(page)) >

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 *)page_privat

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

2019-10-27 Thread Eric Biggers
On Tue, Oct 22, 2019 at 10:16:02AM -0700, Jaegeuk Kim wrote: > diff --git a/Documentation/filesystems/f2fs.txt > b/Documentation/filesystems/f2fs.txt > index 29020af0cff9..d1accf665c86 100644 > --- a/Documentation/filesystems/f2fs.txt > +++ b/Documentation/filesystems/f2fs.txt > @@ -235,6 +235,13

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, ___ Linux

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 2/2] f2fs: support data compression

2019-10-22 Thread Ju Hyung Park
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 is it per-extension basis for now? On Wed, Oct 23, 2019 at 2:16 AM Jaeg

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

2019-10-22 Thread Jaegeuk Kim
From: Chao Yu 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. One cluster includes 4 << n (n >= 0) logical pages, compression size is also cluster size, each of cluster can be