Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1295688ybl; Thu, 22 Aug 2019 12:15:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqxJkHkW+PfgqQs/TjMUZVrP/w7NqdvzPRucpLbllu8hvpO0R6WWr0DR0TD8MPrP0i2bObU1 X-Received: by 2002:a17:902:ba0c:: with SMTP id j12mr355627pls.231.1566501309331; Thu, 22 Aug 2019 12:15:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566501309; cv=none; d=google.com; s=arc-20160816; b=SPWK32VtTzDbmZq/0nr1MhcjEBPLgqnhQU7LsVCHlDVuf77JYkMbtjGlgEHPrN/zRh FiiXdNtnpcxnA+8LmVGkmkkZVSJIvBbm5eCavQq707MYPZ8FMbUoUtLTbiOi96/PAZqB RO7y27DQ4uMPxE4C9aI1B7QImb9s5EfB9rfMeBHg7y92PgrLeDZDCCw6giKVi131FwFD vZTwvS0arMOk4OmdpjAgWmnR7KDZVMcw+B5vImH8p7qtMDTDn7wo9/0zUa1HbmN6jBUK SIuC4clY8B49l7ILD7wX1BHaZdji0ZdoIbVV14ZWeRsUOcYPJ+LM35UNli4cFxkTJMJP A6Lw== 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=DuG7ZFovF3iTA05ZNjTEynz4wJzqVt98vxXqn3O70Fo=; b=kYm2xs8tBafhlxsj0mhbhSaRbb5yjHnyVZxNx0T50LYzbqDRH4g0kSwGuxYb2uQp1+ aHkLozLjj09Cp7suOlz4WaVZjPvkcFHoMrzO3iId4hc0ukD6PtiywPT5/fTcbNqGnPrZ lXXc6iDM0clav5dXcEp/lXrrBtpNvnD0yA0pKnY1Ra5KtcVfX7sgNs04PrwKZxhY4kn/ pYvouXVGX1vaYRFsF3K/dmEfFOwqtp4Ty0ltiX2AdigG05Eeyab15lrLLooabeyKfxOf SlnqK82mofBEe8UPJuJ04ZUt5Osyy26Pq5TF9V8jxKO1P5NUKJgLPFAqzq0gIc4DTvNq 6NVQ== 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 j14si139370pgk.107.2019.08.22.12.14.54; Thu, 22 Aug 2019 12:15:09 -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 S2389203AbfHVOfQ (ORCPT + 99 others); Thu, 22 Aug 2019 10:35:16 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:3973 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726693AbfHVOfQ (ORCPT ); Thu, 22 Aug 2019 10:35:16 -0400 Received: from DGGEMM405-HUB.china.huawei.com (unknown [172.30.72.57]) by Forcepoint Email with ESMTP id 8DCA9D90A3DC820CA5CD; Thu, 22 Aug 2019 22:35:12 +0800 (CST) Received: from dggeme762-chm.china.huawei.com (10.3.19.108) by DGGEMM405-HUB.china.huawei.com (10.3.20.213) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 22 Aug 2019 22:35:12 +0800 Received: from architecture4 (10.140.130.215) by dggeme762-chm.china.huawei.com (10.3.19.108) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Thu, 22 Aug 2019 22:35:11 +0800 Date: Thu, 22 Aug 2019 22:34:32 +0800 From: Gao Xiang To: "Theodore Y. Ts'o" CC: Richard Weinberger , Gao Xiang , Richard Weinberger , linux-fsdevel , , linux-kernel Subject: Re: erofs: Question on unused fields in on-disk structs Message-ID: <20190822143432.GB195034@architecture4> References: <1323459733.69859.1566234633793.JavaMail.zimbra@nod.at> <20190819204504.GB10075@hsiangkao-HP-ZHAN-66-Pro-G1> <20190821220251.GA3954@hsiangkao-HP-ZHAN-66-Pro-G1> <20190822142142.GB2730@mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20190822142142.GB2730@mit.edu> User-Agent: Mutt/1.9.4 (2018-02-28) X-Originating-IP: [10.140.130.215] X-ClientProxiedBy: dggeme709-chm.china.huawei.com (10.1.199.105) To dggeme762-chm.china.huawei.com (10.3.19.108) X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Ted, On Thu, Aug 22, 2019 at 10:21:42AM -0400, Theodore Y. Ts'o wrote: > 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. Thanks for your detailed explanation, thanks a lot! Thanks, Gao Xiang > > Cheers, > > - Ted