Linux-f2fs-devel Archive on lore.kernel.org
 help / color / Atom feed
From: Chao Yu <yuchao0@huawei.com>
To: "Michael Laß" <bevan@bi-co.net>, "Norbert Lange" <nolange79@gmail.com>
Cc: jaegeuk@kernel.org, linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] Possible issues with fsck of f2fs root
Date: Fri, 31 Jul 2020 17:08:13 +0800
Message-ID: <f2ccd10d-8a14-be42-d122-0822dc8137bb@huawei.com> (raw)
In-Reply-To: <8e0c3d4372c46ba587e26f5633d3eadf21fb648c.camel@bi-co.net>

On 2020/7/27 23:02, Michael Laß wrote:
> Am Samstag, den 25.07.2020, 10:06 +0800 schrieb Chao Yu:
>> On 2020/7/24 16:11, Norbert Lange wrote:
>>>
>>> $ fsck.f2fs -a /dev/mmcblk0p5; echo $?
>>> Info: Fix the reported corruption.
>>> Info: Mounted device!
>>> Info: Check FS only on RO mounted device
>>> Error: Failed to open the device!
>>> 255
>>
>> I tried ext4, it acts the same as f2fs... except different return
>> value.
>>
>> fsck -t ext4 -a /dev/zram1; echo $?
>> fsck 1.45.0 (6-Mar-2019)
>> /dev/zram1 is mounted.
>> e2fsck: Cannot continue, aborting.
>>
>>
>> 8
>>
>> fsck -t ext4 -a -f /dev/zram1; echo $?
>> fsck 1.45.0 (6-Mar-2019)
>> Warning!  /dev/zram1 is mounted.
>> /dev/zram1: 11/1179648 files (0.0% non-contiguous), 118065/4718592
>> blocks
>> 0
>>
>> I'd like to know what behavior of fsck does systemd expect?
>> fsck -a should work (check & report or check & report & repaire)
>> on readonly mounted device?
> 
> I think the return value is exactly the problem here. See fsck(8) (
> https://linux.die.net/man/8/fsck) which specifies the return values.
> Systemd looks at these and decides how to proceed:
> 
> https://github.com/systemd/systemd/blob/a859abf062cef1511e4879c4ee39c6036ebeaec8/src/fsck/fsck.c#L407
> 
> That means, if fsck.f2fs returns 255, then
> the FSCK_SYSTEM_SHOULD_REBOOT bit is set and systemd will reboot.

Thanks for pointing this out, will fix this soon.

Thanks,

> 
> Best regards,
> Michael
> 
> .
> 


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

  reply index

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-02 19:29 Hagbard Celine
2019-04-16 18:53 ` Jaegeuk Kim
2019-04-20  2:34   ` Chao Yu
2019-04-21 10:27     ` Jaegeuk Kim
2019-04-22  2:33       ` Chao Yu
2019-04-22  7:11       ` Hagbard Celine
2019-04-22  7:37         ` Chao Yu
2019-04-22  9:05           ` Hagbard Celine
2019-04-22  9:26             ` Chao Yu
2019-04-22 10:05               ` Hagbard Celine
2019-04-23  2:55                 ` Chao Yu
2019-04-23 11:59                   ` Hagbard Celine
2019-04-23 12:18                     ` Hagbard Celine
2019-04-23 16:17                   ` Hagbard Celine
2019-04-24  7:07                     ` Chao Yu
2020-07-24  8:11                       ` [f2fs-dev] " Norbert Lange
2020-07-25  2:06                         ` Chao Yu
2020-07-27 15:02                           ` Michael Laß
2020-07-31  9:08                             ` Chao Yu [this message]
2019-04-22  2:21 ` 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=f2ccd10d-8a14-be42-d122-0822dc8137bb@huawei.com \
    --to=yuchao0@huawei.com \
    --cc=bevan@bi-co.net \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=nolange79@gmail.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

Linux-f2fs-devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-f2fs-devel/0 linux-f2fs-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-f2fs-devel linux-f2fs-devel/ https://lore.kernel.org/linux-f2fs-devel \
		linux-f2fs-devel@lists.sourceforge.net
	public-inbox-index linux-f2fs-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/net.sourceforge.lists.linux-f2fs-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git