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=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no 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 9FF5DC6379D for ; Fri, 27 Nov 2020 15:00:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 579002223F for ; Fri, 27 Nov 2020 15:00:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731096AbgK0PAJ (ORCPT ); Fri, 27 Nov 2020 10:00:09 -0500 Received: from mx2.suse.de ([195.135.220.15]:51778 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729913AbgK0PAI (ORCPT ); Fri, 27 Nov 2020 10:00:08 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id C7D12ABD7; Fri, 27 Nov 2020 15:00:07 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id D670FDA7D9; Fri, 27 Nov 2020 15:58:36 +0100 (CET) Date: Fri, 27 Nov 2020 15:58:36 +0100 From: David Sterba To: Nikolay Borisov Cc: dsterba@suse.cz, linux-btrfs@vger.kernel.org Subject: Re: [PATCH 0/3] Remove deprecated inode cache feature Message-ID: <20201127145836.GZ6430@twin.jikos.cz> Reply-To: dsterba@suse.cz Mail-Followup-To: dsterba@suse.cz, Nikolay Borisov , linux-btrfs@vger.kernel.org References: <20201126131039.3441290-1-nborisov@suse.com> <20201126153135.GY6430@twin.jikos.cz> <90b5646b-cd53-f5bd-7214-44387c523203@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <90b5646b-cd53-f5bd-7214-44387c523203@suse.com> User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org On Thu, Nov 26, 2020 at 06:00:24PM +0200, Nikolay Borisov wrote: > > > On 26.11.20 г. 17:31 ч., David Sterba wrote: > > There's still the remaining issue what to do with the space occupied by > > the cache inode if the feature was enabled. I haven't researched that, > > eg. how big the inode is if it's worth removing it at all or if we > > should do some lightweight scan to remove them at some appropriate time. > > I'd rather implement this in btrfs-progs. I did a quick check, 1M empty files created then every 7th deleted (so there are no large ranges to free), resulting in ~140K files and that occupied about 680KiB. So for 1M files it's about 5M of space, where metadata part is small (<1KiB), the bitmaps are stored in hidden data inodes. All in all it does not sound like a terrible waste of space.