Re: [f2fs-dev] [RFC] errno.h: Provide EFSCORRUPTED for everybody

2019-10-30 Thread Darrick J. Wong
On Wed, Oct 30, 2019 at 09:07:33PM -0400, Valdis Kletnieks wrote: > Three questions: (a) ACK/NAK on this patch, Acked-by: Darrick J. Wong > (b) should it be all in one patch, or one to add to errno.h and 6 > patches for 6 filesystems?), and I don't particularly care, but I've a slight

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 supports 2MB-aligned pinned file, which can guarantee no GC at > all

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] 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

[f2fs-dev] [RFC] errno.h: Provide EFSCORRUPTED for everybody

2019-10-30 Thread Valdis Kletnieks
Three questions: (a) ACK/NAK on this patch, (b) should it be all in one patch, or one to add to errno.h and 6 patches for 6 filesystems?), and (c) if one patch, who gets to shepherd it through? There's currently 6 filesystems that have the same #define. Move it into errno.h so it's defined in

[f2fs-dev] [PATCH] docs: fs-verity: document first supported kernel version

2019-10-30 Thread Eric Biggers
From: Eric Biggers I had meant to replace these TODOs with the actual version when applying the patches, but forgot to do so. Do it now. Signed-off-by: Eric Biggers --- Documentation/filesystems/fsverity.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

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

2019-10-30 Thread Doug Anderson
Hi, On Wed, Oct 30, 2019 at 1:57 PM Eric Biggers wrote: > > FWIW, from reading the Chrome OS code, I think the code you linked to isn't > where the breakage actually is. I think it's actually at >

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

2019-10-30 Thread Eric Biggers
From: Douglas Anderson This reverts commit 0642ea2409f3 ("ext4 crypto: fix to check feature status before get policy"). The commit made a clear and documented ABI change that is not backward compatible. There exists userspace code [1][2] that relied on the old behavior and is now broken.

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

2019-10-30 Thread Eric Biggers
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 wrote: > > > This reverts commit 0642ea2409f3 ("ext4 crypto: fix to check feature >

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

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] f2fs: bio_alloc should never fail

2019-10-30 Thread Gao Xiang via Linux-f2fs-devel
On Wed, Oct 30, 2019 at 09:33:13AM -0700, 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

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

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

Re: [f2fs-dev] [PATCH 1/2] libf2fs_io: Add user-space cache

2019-10-30 Thread Jaegeuk Kim
Hi Robin, Could you please address this build errors for mac build? libf2fs_io.c:85:38: error: use of undeclared identifier 'false' static bool dcache_exit_registered = false; ^ libf2fs_io.c:95:34: error: use of undeclared identifier 'false' static bool

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

2019-10-30 Thread Jaegeuk Kim
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 with its internal fio but it seems the

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

2019-10-30 Thread Theodore Y. Ts'o
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 with its internal fio but it seems the commit is not helpful to > resolve potential

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

2019-10-30 Thread Jaegeuk Kim
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 supports 2MB-aligned pinned file, which can guarantee no GC at > >>> all > >>> by allocating fully valid 2MB segment. >

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

2019-10-30 Thread Gao Xiang via Linux-f2fs-devel
Hi Ted, On Wed, Oct 30, 2019 at 11:14:45AM -0400, 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

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

2019-10-30 Thread Theodore Y. Ts'o
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 global one, however, we'd better check how

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

2019-10-30 Thread Gao Xiang
On Wed, Oct 30, 2019 at 05:27:54PM +0800, Chao Yu wrote: > 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. > >>

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, >> >> Although, there is so many 'nofail' allocation in f2fs,

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

2019-10-30 Thread Gao Xiang
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, > > Although, there is so many 'nofail' allocation in f2fs, I think we'd better > avoid such allocation as much as

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