From: Chao Yu <yuchao0@huawei.com>
To: 王矛 <spearmao@126.com>
Cc: "linux-f2fs-devel@lists.sourceforge.net"
<linux-f2fs-devel@lists.sourceforge.net>
Subject: Re: [f2fs-dev] F2fs panic | update_sit_entry() | no free segment | se invalid
Date: Mon, 17 Feb 2020 11:50:56 +0800 [thread overview]
Message-ID: <cc33bd7d-a2df-ee10-db58-445cfbfeef07@huawei.com> (raw)
In-Reply-To: <381334f9.10021.1704dcbf102.Coremail.spearmao@126.com>
Hi 王矛,
On 2020/2/16 19:39, 王矛 wrote:
> *So the problem is:*
>
> 1. in new_curseg(), if the segno allocated is invalid(no free segment, max segno
> is returned).
>
> F2fs should do something to indicate this exception.
>
> 2. otherwise, we may hit the f2fs panic(se invalid).
>
> Maybe we should do sanity check in update_sit_entry() to see if segno is really
> out of range and caused this panic.
I'm afraid it's too late to handle such error in update_sit_entry(), since we
expect all procedures in do_write_page() will be successful, it's a little hard
to handle such error in that context.
So the problem here is why we can not find any free segments w/ LFS allocation,
because in case of lack of free segments (check via has_not_enough_free_secs()),
f2fs will force to trigger f2fs_gc() to recycle free sections.
I doubt there may be some corner case we haven't considered, result all free
segments (including reserved free segments) was exhausted by data/node writes
when last checkpoint is triggered during umount.
If this issue can be reproduced (during umount, free_segments() <
reserved_segments()), we can add some logs to see why f2fs_balance_fs() fail to
recycle enough free segments previously.
Thanks,
>
>
> Thanks,
> Mao
>
>
>
>
>
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
next parent reply other threads:[~2020-02-17 3:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <381334f9.10021.1704dcbf102.Coremail.spearmao@126.com>
2020-02-17 3:50 ` Chao Yu [this message]
[not found] ` <6d0f19c8.9bd4.170518c5bf1.Coremail.spearmao@126.com>
2020-02-17 7:10 ` [f2fs-dev] F2fs panic | update_sit_entry() | no free segment | se invalid Chao Yu
[not found] ` <20200217052829.GD20234@codeaurora.org>
[not found] ` <4a686a8b.6490.1709f940c2a.Coremail.spearmao@126.com>
2020-03-03 11:38 ` 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=cc33bd7d-a2df-ee10-db58-445cfbfeef07@huawei.com \
--to=yuchao0@huawei.com \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=spearmao@126.com \
/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;
as well as URLs for NNTP newsgroup(s).