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=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS autolearn=ham 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 7717EC282C0 for ; Wed, 23 Jan 2019 10:47:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3CB2120861 for ; Wed, 23 Jan 2019 10:47:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726772AbfAWKrt (ORCPT ); Wed, 23 Jan 2019 05:47:49 -0500 Received: from lithops.sigma-star.at ([195.201.40.130]:57636 "EHLO lithops.sigma-star.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726359AbfAWKrt (ORCPT ); Wed, 23 Jan 2019 05:47:49 -0500 Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id 1AE38608A380; Wed, 23 Jan 2019 11:47:47 +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 8qlaZFEaaxiu; Wed, 23 Jan 2019 11:47:46 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id BA7D9608A398; Wed, 23 Jan 2019 11:47:46 +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 jiGaM0Ya-Vi6; Wed, 23 Jan 2019 11:47:46 +0100 (CET) Received: from blindfold.localnet (unknown [82.150.214.1]) by lithops.sigma-star.at (Postfix) with ESMTPSA id 597B8608A380; Wed, 23 Jan 2019 11:47:46 +0100 (CET) From: Richard Weinberger To: Sascha Hauer Cc: Richard Weinberger , Jan Kara , Christoph Hellwig , linux-fsdevel , Dongsheng Yang , linux-mtd@lists.infradead.org, kernel@pengutronix.de Subject: Re: UBIFS quota support Date: Wed, 23 Jan 2019 11:47:45 +0100 Message-ID: <1822599.pa7TLGMi6j@blindfold> In-Reply-To: <20190123095535.itwduropd2moqs3n@pengutronix.de> References: <20190110114448.vcx6w76ibmxwvlh3@pengutronix.de> <3682938.yUD6jHpT9R@blindfold> <20190123095535.itwduropd2moqs3n@pengutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org Sascha, Am Mittwoch, 23. Januar 2019, 10:55:35 CET schrieb Sascha Hauer: > > > S_SYNC won't help us. We need to make sure that a change of an inode and > > > the corresponding update to the quota file is done atomically. Otherwise > > > it may happen that we only change the size of an inode, but miss the > > > corresponding quota updates, or depending on the implementation, maybe > > > the other way round. > > > > This is why I said yesterday you need to touch the UBIFS journal replay code too. > > So, S_SYNC is not to keep the quota file consistent with UBIFS' state, it is > > to make sure we don't lose quota updates. > > But how we handle a power cut between the update to the quota file and > the actual inode change then? During replay we'll find quota updates and > inode updates, but we do not have any information which quota update > belongs to which inode change. In worst case we need to store more info in the journal to get this infos. That's why I asked Jan for more info. I don't know what exactly quota expects from the filesystem in terms of consistency. Maybe there are already some helpers, etc... Thanks, //richard