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=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 031FFC3A5A1 for ; Thu, 22 Aug 2019 14:35:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D79A52082F for ; Thu, 22 Aug 2019 14:35:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388403AbfHVOfQ (ORCPT ); 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-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@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