linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
From: Chao Yu <yuchao0@huawei.com>
To: 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: Sat, 25 Jul 2020 10:06:48 +0800	[thread overview]
Message-ID: <c05c0e81-ea55-99e0-0060-df803b3586b6@huawei.com> (raw)
In-Reply-To: <20200724081125.3376-1-nolange79@gmail.com>

On 2020/7/24 16:11, Norbert Lange wrote:
> Hello,
> 
> I ran into this problem with fsck.f2fs 1.13.0, it seems that problem is not
> fixed in master either.
> 
> My setup is an embedded device with systemd and I did nothing but swap the
> filesystem from ext4 to f2fs. The result was that the init system would
> try to fsck the ro mounted root partition, fsck.f2fs would fail (as noted),
> and the init system would reboot (rinse, repeat) with no real chance to
> interact remotely (headless system).
> 
> Thats pretty much as bad as it gets for an unwanted sideffect ;)
> 
> I first reported it to systemd, quite reasonably they expect fsck tools
> to behave the same [1].
> 
> The systemd-fsck tool will end up calling fsck.f2fs with the parameter below,
> and will fail as this device is mounted (tries to open it in exclusive mode).
> 
> $ 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?

Thanks,

> 
> A workaround would be to force or skip the check
> 
> fsck.f2fs -a -f /dev/mmcblk0p5; echo $?
> Info: Fix the reported corruption.
> .....
> Done: 0.232165 secs
> 0
> 
> So, Id consider this a critical issue, and I dont see whats the conclusion
> of this discussion is.
> 
> Norbert
> 
> 
> [1] - https://github.com/systemd/systemd/issues/15106
> .
> 


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

  reply	other threads:[~2020-07-25  2:07 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-02 19:29 Possible issues with fsck of f2fs root 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 [this message]
2020-07-27 15:02                           ` Michael Laß
2020-07-31  9:08                             ` Chao Yu
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=c05c0e81-ea55-99e0-0060-df803b3586b6@huawei.com \
    --to=yuchao0@huawei.com \
    --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
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).