From: yebin <yebin10@huawei.com>
To: Theodore Ts'o <tytso@mit.edu>
Cc: <adilger.kernel@dilger.ca>, <linux-ext4@vger.kernel.org>,
<jaegeuk@kernel.org>, <chao@kernel.org>,
<linux-f2fs-devel@lists.sourceforge.net>,
<linux-kernel@vger.kernel.org>, <jack@suse.cz>,
<lczerner@redhat.com>
Subject: Re: [PATCH -next v2] ext4:fix file system corrupted when rmdir non empty directory with IO error
Date: Sat, 26 Feb 2022 10:56:27 +0800 [thread overview]
Message-ID: <621996DB.1030501@huawei.com> (raw)
In-Reply-To: <YhmPKVrVHhTeKOzl@mit.edu>
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_empty_dir' just assume
>> directory isn't empty. To avoid making things worse when file system is already
>> corrupted, 'ext4_empty_dir' also assume directory isn't empty.
>> To distinguish the error type, return the exact error code to the caller.
>>
> Does the same issue exist for f2fs and ubifs? We could solve the
> specific bug much more simply by having ext4_empty_dir() return FALSE
> if we aren't able to read the directory block. Yes, it means that we
> don't return as specific an error code in the case of an I/O error ---
> although I believe we do syslog a warning --- but it makes for a much
> simpler patch that doesn't requiring getting acked-by's from the
> fscrypt, f2fs and ubifs folks.
>
> - Ted
> .
In fact, I only modified ext4 as you suggested in my v1 patch.
[-next] ext4:fix file system corrupted when rmdir non empty directory
with IO error :
https://patchwork.ozlabs.org/project/linux-ext4/patch/20220209112819.3072220-1-yebin10@huawei.com/
>
WARNING: multiple messages have this Message-ID (diff)
From: yebin via Linux-f2fs-devel <linux-f2fs-devel@lists.sourceforge.net>
To: Theodore Ts'o <tytso@mit.edu>
Cc: jack@suse.cz, linux-kernel@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net, adilger.kernel@dilger.ca,
lczerner@redhat.com, jaegeuk@kernel.org,
linux-ext4@vger.kernel.org
Subject: Re: [f2fs-dev] [PATCH -next v2] ext4:fix file system corrupted when rmdir non empty directory with IO error
Date: Sat, 26 Feb 2022 10:56:27 +0800 [thread overview]
Message-ID: <621996DB.1030501@huawei.com> (raw)
In-Reply-To: <YhmPKVrVHhTeKOzl@mit.edu>
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_empty_dir' just assume
>> directory isn't empty. To avoid making things worse when file system is already
>> corrupted, 'ext4_empty_dir' also assume directory isn't empty.
>> To distinguish the error type, return the exact error code to the caller.
>>
> Does the same issue exist for f2fs and ubifs? We could solve the
> specific bug much more simply by having ext4_empty_dir() return FALSE
> if we aren't able to read the directory block. Yes, it means that we
> don't return as specific an error code in the case of an I/O error ---
> although I believe we do syslog a warning --- but it makes for a much
> simpler patch that doesn't requiring getting acked-by's from the
> fscrypt, f2fs and ubifs folks.
>
> - Ted
> .
In fact, I only modified ext4 as you suggested in my v1 patch.
[-next] ext4:fix file system corrupted when rmdir non empty directory
with IO error :
https://patchwork.ozlabs.org/project/linux-ext4/patch/20220209112819.3072220-1-yebin10@huawei.com/
>
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
next prev parent reply other threads:[~2022-02-26 2:56 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-11 9:35 [PATCH -next v2] ext4:fix file system corrupted when rmdir non empty directory with IO error Ye Bin
2022-02-11 9:35 ` [f2fs-dev] " Ye Bin via Linux-f2fs-devel
2022-02-25 8:22 ` yebin
2022-02-25 8:22 ` [f2fs-dev] " yebin via Linux-f2fs-devel
2022-02-25 8:38 ` Chao Yu via Linux-f2fs-devel
2022-02-25 8:38 ` Chao Yu
2022-02-26 2:23 ` Theodore Ts'o
2022-02-26 2:23 ` [f2fs-dev] " Theodore Ts'o
2022-02-26 2:56 ` yebin [this message]
2022-02-26 2:56 ` yebin via Linux-f2fs-devel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=621996DB.1030501@huawei.com \
--to=yebin10@huawei.com \
--cc=adilger.kernel@dilger.ca \
--cc=chao@kernel.org \
--cc=jack@suse.cz \
--cc=jaegeuk@kernel.org \
--cc=lczerner@redhat.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.