Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp7124240rdb; Wed, 3 Jan 2024 05:34:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IFk/6bqKFDEKUsR9UuYcjlvxTQIaaZz1q5hUWm2R9WAEhCw51FmQTM5KtADofePgif7fPhw X-Received: by 2002:ac2:410d:0:b0:50e:aa1c:d224 with SMTP id b13-20020ac2410d000000b0050eaa1cd224mr4208lfi.69.1704288842663; Wed, 03 Jan 2024 05:34:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704288842; cv=none; d=google.com; s=arc-20160816; b=RjEgnyoaVpC4GTqPAS4ZZK2S0IlACE0TNNruWtv8P+e9mdmZg9IBmpVaxGmzVY6qQt mabyv7IPOZWNLoQ8fVy1dhI3yuxIBQEAOJz+NHGPJOWD9J3bPOLSgsX/Iz9xbLD0Zypa 6t9nozwOjYUQvqot0bGw6YMAFl6Ns1cnrMk0fGNsdvei3qVK0s6TmHjCKNBJx+GbscUJ 5A97/I+NwUMXXpybvzZE7UforJEbkJ/+ZT5U9AEquHDthdgCtbGtB8X053fVFXt0p6/P DuKQb6Q8ZOpfTUY/G/20ssD5bnh02X+voerOPI0mxCr1Kp1mbsxHADRYO+oXzzAQbH27 yjmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=thread-index:thread-topic:content-transfer-encoding:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:subject :references:in-reply-to:message-id:cc:to:from:date; bh=ZcVHxo5hNgR0RntWutOA8ojtQptjNQgOSy5y/PQvXWo=; fh=K5fi08nvyvjTHbs3fG9A/wz537YMGgjcx5VBWchWW8k=; b=J/MGdq2yCrn5FtP++TfdLxhnaelOqA+GA18xzN8+XgRL2oxfVrumI+rsJtrTzbrFs1 HKIGoxKk7AMpQOsxByT7W7PmA4pDZ9JiFLXgtnfvEYI7ibF5z72gV9I2yu75H/2Xa1ww npY1xiupXjEi/bQ2ckAexhyhR9o7tKgbxGLhAwTEc4bd5zjPKg8fvEdncKb8ugbCOsP1 VKc3DhxP/dm4bGysrmaS0Ny0+ZwMjshn2ER++BxXTEqUqfVktcNfy63M3epWtZMq3j69 jgmqJ0IqcZbWFLb+tycIZ9demy9++Bqqdbp4+aiO8C2SR4MwI2vgSnKC8FH3OzRDZzo/ 8zfw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-15586-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-15586-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id m8-20020a509308000000b005560ea8deecsi3460987eda.228.2024.01.03.05.34.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jan 2024 05:34:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-15586-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-15586-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-15586-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 5FD2E1F24573 for ; Wed, 3 Jan 2024 13:34:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 305D11A58E; Wed, 3 Jan 2024 13:33:07 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from lithops.sigma-star.at (lithops.sigma-star.at [195.201.40.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2317F19BCD for ; Wed, 3 Jan 2024 13:33:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=nod.at Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nod.at Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id 0BD30626FAF6; Wed, 3 Jan 2024 14:33:02 +0100 (CET) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 6YkfTO33uBbK; Wed, 3 Jan 2024 14:33:01 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id 409A5626FB0F; Wed, 3 Jan 2024 14:33:01 +0100 (CET) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 07_AODx7p-p6; Wed, 3 Jan 2024 14:33:01 +0100 (CET) Received: from lithops.sigma-star.at (lithops.sigma-star.at [195.201.40.130]) by lithops.sigma-star.at (Postfix) with ESMTP id 1DDD6626FAF6; Wed, 3 Jan 2024 14:33:01 +0100 (CET) Date: Wed, 3 Jan 2024 14:33:00 +0100 (CET) From: Richard Weinberger To: chengzhihao1 Cc: david oberhollenzer , Miquel Raynal , Sascha Hauer , Tudor Ambarus , linux-kernel , linux-mtd Message-ID: <391060208.195010.1704288780905.JavaMail.zimbra@nod.at> In-Reply-To: <460eb02e-8937-282c-62c5-6ea606324b0e@huawei.com> References: <20231228014112.2836317-1-chengzhihao1@huawei.com> <1145531757.175508.1703844362355.JavaMail.zimbra@nod.at> <13b259ca-b32f-a8d6-5e11-8bb38df72f5c@huawei.com> <642239519.177270.1703884138999.JavaMail.zimbra@nod.at> <535616666.192239.1704228332389.JavaMail.zimbra@nod.at> <460eb02e-8937-282c-62c5-6ea606324b0e@huawei.com> Subject: Re: [PATCH RFC 00/17] ubifs: Add filesystem repair support Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Mailer: Zimbra 8.8.12_GA_3807 (ZimbraWebClient - FF97 (Linux)/8.8.12_GA_3809) Thread-Topic: ubifs: Add filesystem repair support Thread-Index: DNjwXo0bUvQvI/5CY/TMFyMnZ1D/4Q== ----- Urspr=C3=BCngliche Mail ----- > Von: "chengzhihao1" >> 2. Journal replay is also needed after a clean umount. The reason is tha= t >> UBIFS does no commit at umount time. >=20 > I agree, there exists one situation that UBIFS replays journal even > after clean umount. > P1 ubifs_bgt umount > mkdir > run_bg_commit > c->cmt_state =3D COMMIT_RUNNING_BACKGROUND > do_commit > ubifs_log_start_commit(c, &new_ltail_lnum) // log start > up_write(&c->commit_sem) > touch > ubifs_jnl_update // new buds added > cleanup_mnt > deactivate_super > fs->kill_sb > generic_shutdown_super > sync_filesystem > ubifs_sync_fs > ubifs_run_commit > wait_for_commit // wait bg commit, > 'touch' won't be commited, it will be replayed in next mount BTW: I was imprecise, sorry for that. The issue is that even after a commit you need to replay the journal. Thanks, //richard