From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B8305C433E4 for ; Mon, 27 Jul 2020 15:28:09 +0000 (UTC) Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 85B7320729; Mon, 27 Jul 2020 15:28:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sourceforge.net header.i=@sourceforge.net header.b="CcUou4Sz"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sf.net header.i=@sf.net header.b="Ijbo8IUd" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 85B7320729 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bi-co.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linux-f2fs-devel-bounces@lists.sourceforge.net Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1k052t-0005lV-Hw; Mon, 27 Jul 2020 15:28:07 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k052s-0005lO-MU for linux-f2fs-devel@lists.sourceforge.net; Mon, 27 Jul 2020 15:28:06 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:Content-Type :References:In-Reply-To:Date:Cc:To:From:Subject:Message-ID:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=1897gRpuDRhCayoLAHbvsJmka5u5Fyietxk26kYdxeE=; b=CcUou4SzgyG9tyO2tgfcSawDBC AYhIvR8ihnmQJHY9RBeocEB25maAkXGFIuggIp4AUf9gJ7nDmIgaKvDkVMCx9uerEsTtLx/VPkT+g iLqEFxsiw8lTK6k5NHdtPLHeCS4up59Nf57tp5NuAtI7YfTZmVH63t6uQLvdOCehH+e0=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:Content-Type:References: In-Reply-To:Date:Cc:To:From:Subject:Message-ID:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=1897gRpuDRhCayoLAHbvsJmka5u5Fyietxk26kYdxeE=; b=Ijbo8IUd/eD78h7SEHN5ytvO10 udOBNKgcSnyiKGH63qBwDBoQBVxDVHRsMfy3fTWn7FURVOwX+Opa8Mh26CuFZ/HhA8qOdyLFqmEu5 phAHEpsnM6xm7Tal6V3wO2eD9rlWJDnIpBnanuaoFUH6/bIMhRIgZegU0unWJ7nRBgBg=; Received: from voltaic.bi-co.net ([134.119.3.22]) by sfi-mx-4.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.2) id 1k052n-004C8P-Vy for linux-f2fs-devel@lists.sourceforge.net; Mon, 27 Jul 2020 15:28:06 +0000 Received: from zenpad (aftr-95-222-27-128.unity-media.net [95.222.27.128]) by voltaic.bi-co.net (Postfix) with ESMTPSA id C7D5220937; Mon, 27 Jul 2020 17:02:54 +0200 (CEST) Message-ID: <8e0c3d4372c46ba587e26f5633d3eadf21fb648c.camel@bi-co.net> From: Michael =?ISO-8859-1?Q?La=DF?= To: Chao Yu , Norbert Lange Date: Mon, 27 Jul 2020 17:02:54 +0200 In-Reply-To: References: <20200724081125.3376-1-nolange79@gmail.com> User-Agent: Evolution 3.36.4 MIME-Version: 1.0 X-Headers-End: 1k052n-004C8P-Vy Subject: Re: [f2fs-dev] Possible issues with fsck of f2fs root X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: jaegeuk@kernel.org, linux-f2fs-devel@lists.sourceforge.net Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net 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. Best regards, Michael _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel