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.3 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 203CFC433ED for ; Thu, 13 May 2021 17:24:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E71B161421 for ; Thu, 13 May 2021 17:24:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230213AbhEMRZR (ORCPT ); Thu, 13 May 2021 13:25:17 -0400 Received: from mx2.suse.de ([195.135.220.15]:36340 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229877AbhEMRZQ (ORCPT ); Thu, 13 May 2021 13:25:16 -0400 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 62493B124; Thu, 13 May 2021 17:24:05 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id DEAB7DAF1B; Thu, 13 May 2021 19:21:34 +0200 (CEST) Date: Thu, 13 May 2021 19:21:34 +0200 From: David Sterba To: Boris Burkov Cc: Anand Jain , linux-btrfs@vger.kernel.org, kernel-team@fb.com, linux-fscrypt@vger.kernel.org Subject: Re: [PATCH v3 1/5] btrfs: add compat_flags to btrfs_inode_item Message-ID: <20210513172134.GJ7604@twin.jikos.cz> Reply-To: dsterba@suse.cz Mail-Followup-To: dsterba@suse.cz, Boris Burkov , Anand Jain , linux-btrfs@vger.kernel.org, kernel-team@fb.com, linux-fscrypt@vger.kernel.org References: <7fd3068c977de9dd25eb98fa2b9d3cd928613138.1617900170.git.boris@bur.io> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) Precedence: bulk List-ID: X-Mailing-List: linux-fscrypt@vger.kernel.org On Fri, Apr 09, 2021 at 11:20:32AM -0700, Boris Burkov wrote: > On Fri, Apr 09, 2021 at 07:40:44AM +0800, Anand Jain wrote: > > On 09/04/2021 02:33, Boris Burkov wrote: > > Why not update the tree checker (need to fix stable kernel as well) and > > inode flags, so that we spare u64 space in the btrfs_inode_item? > > I don't understand this suggestion, could you be more specific? That's probably the same suggestion I made regarding the existing inode flags split, with some minimal backport to recognize the compat flags. > > Also, I think we need the incompt flags to check during mount. > > Same for this one, sorry. What do you think I should check? The flag is read-only compat, and once it's added to the set BTRFS_FEATURE_COMPAT_RO_SUPP it's already checked in open_ctree 3290 /* 3291 * Needn't use the lock because there is no other task which will 3292 * update the flag. 3293 */ 3294 btrfs_set_super_incompat_flags(disk_super, features); 3295 3296 features = btrfs_super_compat_ro_flags(disk_super) & 3297 ~BTRFS_FEATURE_COMPAT_RO_SUPP; 3298 if (!sb_rdonly(sb) && features) { 3299 btrfs_err(fs_info, 3300 "cannot mount read-write because of unsupported optional features (%llx)", 3301 features); 3302 err = -EINVAL; 3303 goto fail_alloc; 3304 } So the mount check is there.