Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp846361ybz; Wed, 22 Apr 2020 09:01:17 -0700 (PDT) X-Google-Smtp-Source: APiQypKVl3pzkVMPmYvQzvWIP8io2KRxTnFRYxXeLx8Q6XsJUrVlRJc0VQLNfFQd6/skQ7SYdRuM X-Received: by 2002:a17:907:4365:: with SMTP id nd5mr24399432ejb.231.1587571277683; Wed, 22 Apr 2020 09:01:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587571277; cv=none; d=google.com; s=arc-20160816; b=GGVG7ZwToqsVujLSxyXUIjXHTFNE4xBOeM8uSDQNlhgpiyGqzUmHeO3s+NWtRG3e84 FSl+ENMwp0BKSob8+jfwWBYCCRrc4F3en3h+DDjEgqYvmxOCCp3tkCfB75KFKEuDVvbh kbV7s0jKuH5DY2B6w355jKXilhk2q61uybTcOEraxj0ZMTtEoGnELRUwxxwLr5pTuyip V50WoXFW5dOQUz2UbGD5HhzwQy4FHo/Y1AXpnHAysev4krsNWp0pe0UYjXYhCtO7tuyL 3EUZDyuj012syrUvJ+/hVGY5yFbqFWf7xi8KTgJef5SEodRgpdGpNr5l0obHHn/Jd3v1 4pyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=kcnQD07CcSiDOpTW4IraaAWSHvqJjfSxJq/JJpBE+Lg=; b=BiHIuvwFln+T1gn7j6/rkF0Z5qzzg+d8L1K+ruNmH4zpMqthCRtthzL04+GtCrKg04 BeN5L2KF0SmTXmUs/7hv2SOV36qs9cHxDqJRz44Yl0GhcDprfg4En6e+pwyWupyqGcZK pW5eFqTjGra0f1Rssd/rhIf/99rSFypvjPoKoJ8owcxFFnpqF2VSTSlkFX83B4q3fUvh kLlpNNPa4C+Kg1U8lgOX5d1EXn7LCq1aA4k2pN5TWONoQSVEPbG72F9T3m+sryivmpAO 8D2Mu6ktJAOahV/GeWTXdnwSoTZT4QjWex0qt+h1Mx9UrAl/ZMvH7Em2S47EjrpwsTar bDow== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id du12si4722980ejc.498.2020.04.22.09.00.49; Wed, 22 Apr 2020 09:01:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725980AbgDVQAs (ORCPT + 99 others); Wed, 22 Apr 2020 12:00:48 -0400 Received: from mx2.suse.de ([195.135.220.15]:59256 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726105AbgDVQAr (ORCPT ); Wed, 22 Apr 2020 12:00:47 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id C067EAC52; Wed, 22 Apr 2020 16:00:45 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id F3FB41E0E56; Wed, 22 Apr 2020 18:00:45 +0200 (CEST) Date: Wed, 22 Apr 2020 18:00:45 +0200 From: Jan Kara To: Josh Triplett Cc: linux-ext4@vger.kernel.org Subject: Re: Inline data with 128-byte inodes? Message-ID: <20200422160045.GC20756@quack2.suse.cz> References: <20200414070207.GA170659@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200414070207.GA170659@localhost> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Tue 14-04-20 00:02:07, Josh Triplett wrote: > Is there a fundamental reason that ext4 *can't* or *shouldn't* support > inline data with 128-byte inodes? Well, where would we put it on disk? ext4 on-disk inode fills 128-bytes with 'osd2' union... Or do you mean we should put inline data in an external xattr block? Honza > As far as I can tell, the kernel ext4 implementation only allows inline > data with 256-byte or larger inodes, because it requires the system.data > xattr to exist, even if the actual data requires 60 bytes or less. (The > implementation in debugfs, on the other hand, handles inline data in > 128-byte inodes just fine. And it seems like it'd be fairly > straightforward to change the kernel implementation to support it as > well.) > > For filesystems that don't need to store xattrs in general, and can live > with the other limitations of 128-byte inodes, using a 128-byte inode > can save substantial space compared to a 256-byte inode (many megabytes > worth of inode tables, versus 4k for each file between 61-160 bytes), > and many small files or small directories would still fit in 60 bytes. -- Jan Kara SUSE Labs, CR