Re: [f2fs-dev] [PATCH -next v2] ext4:fix file system corrupted when rmdir non empty directory with IO error

2022-02-25 Thread yebin via Linux-f2fs-devel
On 2022/2/26 10:23, Theodore Ts'o wrote: On Fri, Feb 11, 2022 at 05:35:27PM +0800, Ye Bin wrote: Now if read directory block failed, 'ext4_empty_dir' will return true, assume directory is empty. Obviously, it will lead to above issue. To solve this issue, if read directory block failed 'ext4_

Re: [f2fs-dev] [PATCH -next v2] ext4:fix file system corrupted when rmdir non empty directory with IO error

2022-02-25 Thread Theodore Ts'o
On Fri, Feb 11, 2022 at 05:35:27PM +0800, Ye Bin wrote: > Now if read directory block failed, 'ext4_empty_dir' will return true, assume > directory is empty. Obviously, it will lead to above issue. > To solve this issue, if read directory block failed 'ext4_empty_dir' just > assume > directory isn

Re: [f2fs-dev] [PATCH 2/2 v2] f2fs: avoid an infinite loop in f2fs_sync_dirty_inodes

2022-02-25 Thread Jaegeuk Kim
On 02/25, Chao Yu wrote: > On 2022/2/15 7:27, Jaegeuk Kim wrote: > > If one read IO is always failing, we can fall into an infinite loop in > > f2fs_sync_dirty_inodes. This happens during xfstests/generic/475. > > > > [ 142.803335] Buffer I/O error on dev dm-1, logical block 8388592, async > > p

Re: [f2fs-dev] [PATCH] f2fs: avoid sb_start_intwrite during eviction

2022-02-25 Thread Jaegeuk Kim
On 02/25, Chao Yu wrote: > On 2022/2/16 6:00, Jaegeuk Kim wrote: > > 1. this thread is stuck in f2fs_evict_inode by #2: > > [210757.653718] __schedule+0x2e3/0x740 > > [210757.654811] schedule+0x42/0xb0 > > [210757.655829] rwsem_down_read_slowpath+0x16c/0x4a0 > > Who has held sb->s_writers.rw_se

Re: [f2fs-dev] [PATCH v2] mkfs.f2fs: set project quota by default for -g android

2022-02-25 Thread Jaegeuk Kim
On 02/25, Chao Yu wrote: > On 2022/2/9 7:39, Jaegeuk Kim wrote: > > With this patch, "-g android" enables usr/grp/proj quota by default. > > > > 1) -O quota : enables usr/grp > > 2) -O project_quota -O extra_attr : enabled prj > > 3) -O quota -O project_quota -O extra_attr : enables usr/grp/proj >

Re: [f2fs-dev] [PATCH -next v2] ext4:fix file system corrupted when rmdir non empty directory with IO error

2022-02-25 Thread Chao Yu via Linux-f2fs-devel
On 2022/2/25 16:22, yebin via Linux-f2fs-devel wrote: diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c index a0e51937d92e..3de5a1343070 100644 --- a/fs/f2fs/dir.c +++ b/fs/f2fs/dir.c @@ -953,7 +953,7 @@ void f2fs_delete_entry(struct f2fs_dir_entry *dentry, struct page *page,   f2fs_drop_nlink(

Re: [f2fs-dev] [PATCH] f2fs: move f2fs to use reader-unfair rwsems

2022-02-25 Thread Hillf Danton
On Fri, 25 Feb 2022 09:47:16 +0800 Hillf Danton wrote: > On Thu, 24 Feb 2022 16:47:30 +0800 Hillf Danton wrote: > > On Sat, 8 Jan 2022 08:46:17 -0800 > > > From: Tim Murray > > > > > > f2fs rw_semaphores work better if writers can starve readers, > > > especially for the checkpoint thread, becau

Re: [f2fs-dev] [PATCH -next v2] ext4:fix file system corrupted when rmdir non empty directory with IO error

2022-02-25 Thread yebin via Linux-f2fs-devel
ping... On 2022/2/11 17:35, Ye Bin wrote: We inject IO error when rmdir non empty direcory, then got issue as follows: step1: mkfs.ext4 -F /dev/sda step2: mount /dev/sda test step3: cd test step4: mkdir -p 1/2 step5: rmdir 1 [ 110.920551] ext4_empty_dir: inject fault [ 110.9219