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=-2.3 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT 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 44E33C282C8 for ; Mon, 28 Jan 2019 08:09:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1660E217D8 for ; Mon, 28 Jan 2019 08:09:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="S4aaTi1u" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726744AbfA1IJm (ORCPT ); Mon, 28 Jan 2019 03:09:42 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:35754 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726638AbfA1IJm (ORCPT ); Mon, 28 Jan 2019 03:09:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding: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=iO4e3887f7H19/fQ5e/3fqf57brFIkglooC0vsmJdIw=; b=S4aaTi1uCVQp/rJUun++zrw4L lREkSb161u3cXCaIueQOEw0p53lVMRddlDM3/PToJj3GP+dOjvsFIotar7pA7bM2gxsV9OsXl2kp5 D6UolIpbExCOjWy4G1nk2OJP5kp9XP91uhgX82/YMovWQmSSm+y32h+1IdI1PoUDr3UuwcVQIK8Ed 3zL6Zap/lL6w7DPTJnH/OB2JX5clwjmDjY6Lxqaw0Nq2AfNJvZg9lf/ncEPf4wr1BGoiHPqLFwNf8 YDutd/IwPGQ7D6gjMss8146eg11+0wrnDCZxTTQt2jo4xgkZu3tDJtXLiN/dNYn13mi5udz1272qB DmGrJJ6Ww==; Received: from hch by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1go1z9-0002HZ-02; Mon, 28 Jan 2019 08:09:39 +0000 Date: Mon, 28 Jan 2019 00:09:38 -0800 From: Christoph Hellwig To: Sascha Hauer Cc: Jan Kara , Richard Weinberger , Christoph Hellwig , linux-fsdevel , Dongsheng Yang , Richard Weinberger , linux-mtd@lists.infradead.org, kernel@pengutronix.de Subject: Re: UBIFS quota support Message-ID: <20190128080938.GA1076@infradead.org> References: <20190110114448.vcx6w76ibmxwvlh3@pengutronix.de> <20190123154743.GL13149@quack2.suse.cz> <20190125092156.ck77sdqainmmewuz@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190125092156.ck77sdqainmmewuz@pengutronix.de> User-Agent: Mutt/1.9.2 (2017-12-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org FYI, the main reason (well, besides history) that XFS uses its own quota code is so that it can have full integration with the transaction subsystem and the on-disk data structures. While it is going to be a lot more code you might want to look into implementing quota accounting in ubifs itself and only use the standard interfaces to report and adminstrate the quota values. That way you might not even have to maintain a separate quota file and could instead maintain usage statistics in the btree nodes, and only summarize them in memory, possibly with a periodical full state dump. 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=-2.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, URIBL_BLOCKED,USER_AGENT_MUTT 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 5DAEFC282C8 for ; Mon, 28 Jan 2019 08:09:50 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 2403C20880 for ; Mon, 28 Jan 2019 08:09:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="AqCiFg6I" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2403C20880 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=27yp4RlA3lznpIfLD/04pUowTKB3QWLSGaUcfvkxJyQ=; b=AqCiFg6IIIsRbd QnIwGUTgy6Sld0CYcUz5saFjlUUwd63xi+giIFBb0k17CIx+A8XaJDSbp+fb6EZREnyAk6xIte7cJ OSzeSZK0jMadhzpHNYaUWFctvdFIaxalhNi/kNV7HsZ4rJQcd7M/2SrlJCgLuydLNXv/ja5TR9R2K FRocwzXv8lQUHRxbjOgriwXkDKPDRvCZnD1xYEGexidNcyi1+pdrdLSe8lwB4x1QasSR+kV/ZCguM SmGvVf9MO9+QuxBRH9PUId4zBrMBG4XHXB5NaTmSn+5ShYJafL7u6Qj+ESjD2xenbEF5qEGp0A9rN AhuZNHrFVFMKGNzAZ0+w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1go1zC-0002Lx-WC; Mon, 28 Jan 2019 08:09:43 +0000 Received: from hch by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1go1z9-0002HZ-02; Mon, 28 Jan 2019 08:09:39 +0000 Date: Mon, 28 Jan 2019 00:09:38 -0800 From: Christoph Hellwig To: Sascha Hauer Subject: Re: UBIFS quota support Message-ID: <20190128080938.GA1076@infradead.org> References: <20190110114448.vcx6w76ibmxwvlh3@pengutronix.de> <20190123154743.GL13149@quack2.suse.cz> <20190125092156.ck77sdqainmmewuz@pengutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190125092156.ck77sdqainmmewuz@pengutronix.de> User-Agent: Mutt/1.9.2 (2017-12-15) X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Dongsheng Yang , Jan Kara , Richard Weinberger , Richard Weinberger , Christoph Hellwig , linux-mtd@lists.infradead.org, kernel@pengutronix.de, linux-fsdevel Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-mtd" Errors-To: linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.org FYI, the main reason (well, besides history) that XFS uses its own quota code is so that it can have full integration with the transaction subsystem and the on-disk data structures. While it is going to be a lot more code you might want to look into implementing quota accounting in ubifs itself and only use the standard interfaces to report and adminstrate the quota values. That way you might not even have to maintain a separate quota file and could instead maintain usage statistics in the btree nodes, and only summarize them in memory, possibly with a periodical full state dump. ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/