Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1055352ybl; Thu, 22 Aug 2019 08:43:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqzl9bq58TO2vDQ5g5RjoVOi43fGAv5WqhBmXxHidTptWGf9/ziS0OKWC5itBMkiE5CWiFTA X-Received: by 2002:a17:90a:e38e:: with SMTP id b14mr267041pjz.125.1566488613664; Thu, 22 Aug 2019 08:43:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566488613; cv=none; d=google.com; s=arc-20160816; b=TyLsWeQvH09ge/27ke3rT0JM+A+BzioFFehfQwRjDhVztNRJjQBA/HvJWBo0FcEPzA LaZt7RRdyzhHaUfvrb2dZkV3064OvI35WKZzqe9gJX9x1Tu8oO4+L6Ao2sxo/fj4ayNK zZtZYdWv9hDgV4uhLKN+qf6s5D2V3LaiSsJC1Hl7J/grz38fAoszuESkIXnNHYBmzUOE mbpVZ6bl/vlh2ayVUOdrSF5Fv5mZ0Zckk3iNb9zPoSpGFFh3IjwMt2fY6x1tr+Tgrutw ixiuRsVqmHQccp3GHw2YFWsMcwyP1gcG6Ah6tKS58Jd/cIYcuPr3CG2EiNvwzSjv/Ddb coGA== 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:mail-followup-to :message-id:subject:cc:to:from:date; bh=W0UFInQ8eqplCRia7+hWEmUKLSNfSXekSkFxa5VDjiM=; b=uqcTatWckcRE1SzudkA3+vZNFE+LKWj9KnbuLJgN0ZhQe0cprcszwSVQaB1txTNxZt FxAZbl4cQNvg3bLSvh+lR8E2XJjJ6DJyOJlBv+eSSixi6KZeY6eE5f71+PutWRis6m/h Fv8m7T5za5CF6OthOi75uysh0ew0Wa5DcETeypJKOfd1Y4bhA5vAO5rcnOrYF4nFHtaD iClyUi3bplTZwqxhd4jcLlP8MJzpusRP9AQDA8nljfSHweVEWrhNh8B0sXZQos2cbhGA hh2VX4F81XYqDQdSyOJWKdpZlBoSVfx24VSgDgNdkiuJqqTobp92yllpfybYkXC2ey1A SVUQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v21si16920161pgb.209.2019.08.22.08.43.17; Thu, 22 Aug 2019 08:43:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387900AbfHVOWE (ORCPT + 99 others); Thu, 22 Aug 2019 10:22:04 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:49646 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728042AbfHVOWE (ORCPT ); Thu, 22 Aug 2019 10:22:04 -0400 Received: from callcc.thunk.org (guestnat-104-133-0-111.corp.google.com [104.133.0.111] (may be forged)) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id x7MELgVm006640 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 22 Aug 2019 10:21:43 -0400 Received: by callcc.thunk.org (Postfix, from userid 15806) id 7F9C942049E; Thu, 22 Aug 2019 10:21:42 -0400 (EDT) Date: Thu, 22 Aug 2019 10:21:42 -0400 From: "Theodore Y. Ts'o" To: Richard Weinberger Cc: Gao Xiang , Richard Weinberger , linux-fsdevel , linux-erofs@lists.ozlabs.org, linux-kernel Subject: Re: erofs: Question on unused fields in on-disk structs Message-ID: <20190822142142.GB2730@mit.edu> Mail-Followup-To: "Theodore Y. Ts'o" , Richard Weinberger , Gao Xiang , Richard Weinberger , linux-fsdevel , linux-erofs@lists.ozlabs.org, linux-kernel References: <1323459733.69859.1566234633793.JavaMail.zimbra@nod.at> <20190819204504.GB10075@hsiangkao-HP-ZHAN-66-Pro-G1> <20190821220251.GA3954@hsiangkao-HP-ZHAN-66-Pro-G1> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 22, 2019 at 10:33:01AM +0200, Richard Weinberger wrote: > > super block chksum could be a compatible feature right? which means > > new kernel can support it (maybe we can add a warning if such image > > doesn't have a chksum then when mounting) but old kernel doesn't > > care it. > > Yes. But you need some why to indicate that the chksum field is now > valid and must be used. > > The features field can be used for that, but you don't use it right now. > I recommend to check it for being 0, 0 means then "no features". > If somebody creates in future a erofs with more features this code > can refuse to mount because it does not support these features. The whole point of "compat" features is that the kernel can go ahead and mount the file system even if there is some new "compat" feature which it doesn't understand. So the fact that right now erofs doesn't have any "compat" features means it's not surprising, and perfectly OK, if it's not referenced by the kernel. For ext4, we have some more complex feature bitmasks, "compat", "ro_compat" (OK to mount read-only if there are features you don't understand) and "incompat" (if there are any bits you don't understand, fail the mount). But since erofs is a read-only file system, things are much simpler. It might make life easier for other kernel developers if "features" was named "compat_features" and "requirements" were named "incompat_features", just because of the long-standing use of that in ext2, ext3, ext4, ocfs2, etc. But that naming scheme really is a legacy of ext2 and its descendents, and there's no real reason why it has to be that way on other file systems. Cheers, - Ted