Re: [f2fs-dev] mm: mkfs.ext4 invoked oom-killer on i386 - pagecache_get_page

2020-05-29 Thread Michal Hocko
On Fri 29-05-20 02:56:44, Chris Down wrote: > Yafang Shao writes: > > Look at this patch[1] carefully you will find that it introduces the > > same issue that I tried to fix in another patch [2]. Even more sad is > > these two patches are in the same patchset. Although this issue isn't > > related

Re: [f2fs-dev] [PATCH 3/3] f2fs: fix to cover meta flush with cp_lock

2020-05-29 Thread Chao Yu
On 2020/5/29 3:00, Jaegeuk Kim wrote: > On 05/28, Chao Yu wrote: >> On 2020/5/28 9:26, Jaegeuk Kim wrote: >>> On 05/28, Chao Yu wrote: On 2020/5/28 5:02, Jaegeuk Kim wrote: > On 05/27, Chao Yu wrote: >> meta inode page should be flushed under cp_lock, fix it. > > It doesn't

[f2fs-dev] [PATCH] Revert "f2fs: fix quota_sync failure due to f2fs_lock_op"

2020-05-29 Thread Chao Yu
Under heavy fsstress, we may triggle panic while issuing discard, because __check_sit_bitmap() detects that discard command may earse valid data blocks, the root cause is as below race stack described, since we removed lock when flushing quota data, quota data writeback may race with

Re: [f2fs-dev] Can F2FS roll forward after fdatasync()?

2020-05-29 Thread Hongwei
Hi, >On 05/28, Hongwei wrote: >> Hi F2FS experts, >> As written in f2fs_do_sync_file(): >> "Both of fdatasync() and fsync() are able to be recovered from >> sudden-power-off." >> >> Please consider this workflow: >> 1. Start atomic write >> 2. Multiple file writes >> 3. Commit atomic write >> 4.

Re: [f2fs-dev] [PATCH v2] blkdev: Replace blksize_bits() with ilog2()

2020-05-29 Thread Christoph Hellwig
> ns->size = i_size_read(ns->bdev->bd_inode); > - ns->blksize_shift = blksize_bits(bdev_logical_block_size(ns->bdev)); > + ns->blksize_shift = ilog2(bdev_logical_block_size(ns->bdev)); This should just be: ns->blksize_shift = ns->bdev->bd_inode->i_blkbits; > diff --git

[f2fs-dev] [PATCH v2] blkdev: Replace blksize_bits() with ilog2()

2020-05-29 Thread Kaitao Cheng
There is a function named ilog2() exist which can replace blksize. The generated code will be shorter and more efficient on some architecture, such as arm64. And ilog2() can be optimized according to different architecture. Signed-off-by: Kaitao Cheng --- changes in v2: Remove all

Re: [f2fs-dev] [PATCH v2] blkdev: Replace blksize_bits() with ilog2()

2020-05-29 Thread Jens Axboe
On 5/29/20 8:11 AM, Kaitao Cheng wrote: > There is a function named ilog2() exist which can replace blksize. > The generated code will be shorter and more efficient on some > architecture, such as arm64. And ilog2() can be optimized according > to different architecture. When you posted this last

[f2fs-dev] [PATCH] fsck.f2fs: fix dirent position check for encrypted+casefolded dentries

2020-05-29 Thread Eric Biggers
From: Eric Biggers fsck.f2fs reports corruption if the filesystem contains any encrypted + casefolded directories with any substantial number of dentries: [ASSERT] (f2fs_check_dirent_position:1374) --> Wrong position of dirent pino:8, name:۟�[I�^*�(�5~�}�D��#]7�8�ˎ�, level:1, dir_level:0,

Re: [f2fs-dev] [PATCH v2] blkdev: Replace blksize_bits() with ilog2()

2020-05-29 Thread Matthew Wilcox
On Fri, May 29, 2020 at 10:11:00PM +0800, Kaitao Cheng wrote: > There is a function named ilog2() exist which can replace blksize. > The generated code will be shorter and more efficient on some > architecture, such as arm64. And ilog2() can be optimized according > to different architecture.

Re: [f2fs-dev] [PATCH] Revert "f2fs: fix quota_sync failure due to f2fs_lock_op"

2020-05-29 Thread Jaegeuk Kim
On 05/29, Chao Yu wrote: > Under heavy fsstress, we may triggle panic while issuing discard, > because __check_sit_bitmap() detects that discard command may earse > valid data blocks, the root cause is as below race stack described, > since we removed lock when flushing quota data, quota data

Re: [f2fs-dev] [PATCH] Revert "f2fs: fix quota_sync failure due to f2fs_lock_op"

2020-05-29 Thread Chao Yu
On 2020/5/30 6:34, Jaegeuk Kim wrote: > On 05/29, Chao Yu wrote: >> Under heavy fsstress, we may triggle panic while issuing discard, >> because __check_sit_bitmap() detects that discard command may earse >> valid data blocks, the root cause is as below race stack described, >> since we removed

Re: [f2fs-dev] [PATCH] Revert "f2fs: fix quota_sync failure due to f2fs_lock_op"

2020-05-29 Thread Jaegeuk Kim
On 05/30, Chao Yu wrote: > On 2020/5/30 6:34, Jaegeuk Kim wrote: > > On 05/29, Chao Yu wrote: > >> Under heavy fsstress, we may triggle panic while issuing discard, > >> because __check_sit_bitmap() detects that discard command may earse > >> valid data blocks, the root cause is as below race

Re: [f2fs-dev] [PATCH v2] blkdev: Replace blksize_bits() with ilog2()

2020-05-29 Thread Bart Van Assche
On 2020-05-29 13:27, Matthew Wilcox wrote: > On Fri, May 29, 2020 at 10:11:00PM +0800, Kaitao Cheng wrote: >> There is a function named ilog2() exist which can replace blksize. >> The generated code will be shorter and more efficient on some >> architecture, such as arm64. And ilog2() can be

Re: [f2fs-dev] [PATCH v2] blkdev: Replace blksize_bits() with ilog2()

2020-05-29 Thread Jens Axboe
On 5/29/20 4:27 PM, Bart Van Assche wrote: > On 2020-05-29 13:27, Matthew Wilcox wrote: >> On Fri, May 29, 2020 at 10:11:00PM +0800, Kaitao Cheng wrote: >>> There is a function named ilog2() exist which can replace blksize. >>> The generated code will be shorter and more efficient on some >>>

Re: [f2fs-dev] [PATCH] Revert "f2fs: fix quota_sync failure due to f2fs_lock_op"

2020-05-29 Thread Chao Yu
On 2020/5/30 9:49, Jaegeuk Kim wrote: > On 05/30, Chao Yu wrote: >> On 2020/5/30 6:34, Jaegeuk Kim wrote: >>> On 05/29, Chao Yu wrote: Under heavy fsstress, we may triggle panic while issuing discard, because __check_sit_bitmap() detects that discard command may earse valid data