From: Chao Yu <yuchao0@huawei.com>
To: Jaegeuk Kim <jaegeuk@kernel.org>, Chao Yu <chao@kernel.org>
Cc: <linux-kernel@vger.kernel.org>, <linux-f2fs-devel@lists.sourceforge.net>
Subject: Re: [f2fs-dev] [PATCH 6/7] f2fs: flush quota blocks after turnning it off
Date: Wed, 13 Feb 2019 11:27:25 +0800 [thread overview]
Message-ID: <499c3f3c-3ef4-5412-d4df-8bcfc7a558be@huawei.com> (raw)
In-Reply-To: <20190204165934.GB15646@jaegeuk-macbookpro.roam.corp.google.com>
On 2019/2/5 0:59, Jaegeuk Kim wrote:
> On 02/02, Chao Yu wrote:
>> On 2019-1-29 7:47, Jaegeuk Kim wrote:
>>> After quota_off, we'll get some dirty blocks. If put_super don't have a chance
>>> to flush them by checkpoint, it causes NULL pointer exception in end_io after
>>> iput(node_inode). (e.g., by checkpoint=disable)
>>>
>>> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
>>> ---
>>> fs/f2fs/super.c | 6 ++++++
>>> 1 file changed, 6 insertions(+)
>>>
>>> diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
>>> index 5e1f8573a17f..7694cb350734 100644
>>> --- a/fs/f2fs/super.c
>>> +++ b/fs/f2fs/super.c
>>> @@ -2026,6 +2026,12 @@ void f2fs_quota_off_umount(struct super_block *sb)
>>> set_sbi_flag(F2FS_SB(sb), SBI_QUOTA_NEED_REPAIR);
>>> }
>>> }
>>> + /*
>>> + * In case of checkpoint=disable, we must flush quota blocks.
>>
>> checkpoint=disable is one of the cases, right? e.g. IO error can be another case?
>>
>> So here I guess we need to change the comments a bit for that.
>
> I didn't test other cases, but checkpoint=disable could give real errors through
> some tests. So, basically, I'd like to keep known cases only here.
Alright, not a big deal. :)
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Thanks,
>
>>
>> Thanks,
>>
>>> + * This can cause NULL exception for node_inode in end_io, since
>>> + * put_super already dropped it.
>>> + */
>>> + sync_filesystem(sb);
>>> }
>>>
>>> static void f2fs_truncate_quota_inode_pages(struct super_block *sb)
>>>
>
>
> _______________________________________________
> 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:[~2019-02-13 3:27 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-28 23:47 [PATCH 1/7] f2fs: run discard jobs when put_super Jaegeuk Kim
2019-01-28 23:47 ` [PATCH 2/7] f2fs: add quick mode of checkpoint=disable for QA Jaegeuk Kim
2019-02-01 15:48 ` [f2fs-dev] " Chao Yu
2019-02-04 16:55 ` Jaegeuk Kim
2019-02-13 3:26 ` Chao Yu
2019-01-28 23:47 ` [PATCH 3/7] f2fs: try to keep CP_TRIMMED_FLAG after successful umount Jaegeuk Kim
2019-02-01 15:58 ` [f2fs-dev] " Chao Yu
2019-01-28 23:47 ` [PATCH 4/7] f2fs: don't wake up too frequently, if there is lots of IOs Jaegeuk Kim
2019-02-01 15:58 ` [f2fs-dev] " Chao Yu
2019-01-28 23:47 ` [PATCH 5/7] f2fs: avoid null pointer exception in dcc_info Jaegeuk Kim
2019-02-01 16:00 ` [f2fs-dev] " Chao Yu
2019-01-28 23:47 ` [PATCH 6/7] f2fs: flush quota blocks after turnning it off Jaegeuk Kim
2019-02-01 16:08 ` [f2fs-dev] " Chao Yu
2019-02-04 16:59 ` Jaegeuk Kim
2019-02-13 3:27 ` Chao Yu [this message]
2019-01-28 23:47 ` [PATCH 7/7] f2fs: sync filesystem after roll-forward recovery Jaegeuk Kim
2019-02-01 14:12 ` [f2fs-dev] [PATCH 1/7] f2fs: run discard jobs when put_super Chao Yu
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=499c3f3c-3ef4-5412-d4df-8bcfc7a558be@huawei.com \
--to=yuchao0@huawei.com \
--cc=chao@kernel.org \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®