Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4496203rdh; Wed, 29 Nov 2023 03:12:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IECzdK3Pq8rvkwMIfJhflG9l6W8iCG+kXR+vBQnXazYBpG+S/5kSlMcdsji3qCh32jnv6y9 X-Received: by 2002:a17:90b:80b:b0:285:8673:450d with SMTP id bk11-20020a17090b080b00b002858673450dmr18251077pjb.40.1701256365287; Wed, 29 Nov 2023 03:12:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701256365; cv=none; d=google.com; s=arc-20160816; b=GjzYGctMp5MfmCS4H9c+iYvi9Gy4OC7ExRbHeUmKpgEcPh8RyyEWMmiQDJdZUJGzot NZdaTTP8+cC8u1BnRhlm9jhzSuyS7DXoNDjpm1Oy+oW36wSURlClpt8TzfEKD/cVEK/E Ypb37KM5nJf60zyIXrsWd+3lfRXJxW2SjXh3SgdR0aMA3YXrPP5+MSFgsd3w8sMB7dQ5 mlB03Pvf75B3e50Y63jJHZoB+yd8J0CD8MKjwBXLyoRZFFo+1CYVarWjdStKUVS5UPrD GtRm54MBCIcTnGkX4Kc18XSAZzJnbdY/TUDMjX+9l7QhexZhcPj0ibJXSJh71dLXUoDM xJbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=gLKfadMZ1Fc/qfBINyFvXg2up8K3BbA/f16xvNkC1j4=; fh=HTXPQHogfgVl+RM2b79WDUO5LUpMMlYJBsd7lXr/vKk=; b=lJP+FaMTiLLEA8U6hrdTqnLvNiMUrLFsYQI/QRDPtREZlK1azE1SDx8LsmhKVhUOsD uRr/XmnYPggzpk3tSGUbdndm1kzanEYo3GyzMr7YRo216tyKIbDjuJHIXhPzJnIZXo/k OkDoXUOeRXlQMM79Wa5jdoylyhcHe/7I2Nkfuolm0s9V4vCNGRqfqKVW2yWonMze2W52 nmIopPp16RMnfj4eIsQISAqWCflxiz6bKrf43fPiKSgGWKTxWYsVvmmpzyLt/4zKsYeZ 1+TkqdcPRX1kGzK42mp55OSF16t5mO29j/r26utGvczqK6MdtbYvzQ1k4Q8f4YWAb95R AUzw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id mn23-20020a17090b189700b002774985e8b7si1082476pjb.168.2023.11.29.03.12.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 03:12:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id F06F7803BAAE; Wed, 29 Nov 2023 03:12:42 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231737AbjK2LM1 (ORCPT + 99 others); Wed, 29 Nov 2023 06:12:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231693AbjK2LMB (ORCPT ); Wed, 29 Nov 2023 06:12:01 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F37053270; Wed, 29 Nov 2023 03:09:32 -0800 (PST) Received: from imap2.dmz-prg2.suse.org (imap2.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:98]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id AE1501F8B3; Wed, 29 Nov 2023 11:09:30 +0000 (UTC) Received: from imap2.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap2.dmz-prg2.suse.org (Postfix) with ESMTPS id A36581376F; Wed, 29 Nov 2023 11:09:30 +0000 (UTC) Received: from dovecot-director2.suse.de ([10.150.64.162]) by imap2.dmz-prg2.suse.org with ESMTPSA id RTDeJ+obZ2VXcQAAn2gu4w (envelope-from ); Wed, 29 Nov 2023 11:09:30 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id 51515A07DC; Wed, 29 Nov 2023 12:09:30 +0100 (CET) Date: Wed, 29 Nov 2023 12:09:30 +0100 From: Jan Kara To: Nathan Chancellor Cc: Stephen Rothwell , Christian Brauner , David Sterba , David Sterba , Jan Kara , Josef Bacik , Linux Kernel Mailing List , Linux Next Mailing List Subject: Re: linux-next: manual merge of the vfs-brauner tree with the btrfs tree Message-ID: <20231129110930.qncvzm63xjg4ucky@quack3> References: <20231127092001.54a021e8@canb.auug.org.au> <20231128213344.GA3423530@dev-arch.thelio-3990X> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231128213344.GA3423530@dev-arch.thelio-3990X> X-Spam-Level: X-Rspamd-Server: rspamd1 Authentication-Results: smtp-out2.suse.de; none X-Rspamd-Queue-Id: AE1501F8B3 X-Spam-Score: -4.00 X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Wed, 29 Nov 2023 03:12:43 -0800 (PST) On Tue 28-11-23 14:33:44, Nathan Chancellor wrote: > Hi Stephen (and other maintainers), > > On Mon, Nov 27, 2023 at 09:20:01AM +1100, Stephen Rothwell wrote: > > Hi all, > > > > Today's linux-next merge of the vfs-brauner tree got a conflict in: > > > > fs/btrfs/super.c > > > > between commit: > > > > 2f2cfead5107 ("btrfs: remove old mount API code") > > > > from the btrfs tree and commit: > > > > ead622674df5 ("btrfs: Do not restrict writes to btrfs devices") > > > > from the vfs-brauner tree. > > > > I fixed it up (the former removed the funtion updated by the latter, but > > a further fix may be required to implement the intent of the latter?) > > Yes, the lack of ead622674df5 appears to cause issues with mounting > btrfs volumes on at least next-20231128 due to the presence of commit > 6f861765464f ("fs: Block writes to mounted block devices"). In QEMU, I > can see: > > :: running early hook [udev] > Warning: /lib/modules/6.7.0-rc3-next-20231128/modules.devname not found - ignoring > Starting systemd-udevd version 252.5-1-arch > :: running hook [udev] > :: Triggering uevents... > :: running hook [keymap] > :: Loading keymap...kbd_mode: KDSKBMODE: Inappropriate ioctl for device > done. > :: performing fsck on '/dev/vda2' > :: mounting '/dev/vda2' on real root > mount: /new_root: wrong fs type, bad option, bad superblock on /dev/vda2, missing codepage or helper program, or other error. > dmesg(1) may have more information after failed mount system call. > You are now being dropped into an emergency shell. > sh: can't access tty; job control turned off > [rootfs ]# > > The following diff allows my VM to boot properly but I am not sure if > there is a better or more proper fix (I am already out of my element > heh). If a proper merge solution cannot be found quickly, can > 6f861765464f be reverted in the meantime so that all my machines with > btrfs can boot properly? :) > > diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c > index 99d10a25a579..23db0306b8ef 100644 > --- a/fs/btrfs/super.c > +++ b/fs/btrfs/super.c > @@ -299,6 +299,7 @@ static int btrfs_parse_param(struct fs_context *fc, > case Opt_device: { > struct btrfs_device *device; > blk_mode_t mode = sb_open_mode(fc->sb_flags); > + mode &= ~BLK_OPEN_RESTRICT_WRITES; > > mutex_lock(&uuid_mutex); > device = btrfs_scan_one_device(param->string, mode, false); > @@ -1801,6 +1802,8 @@ static int btrfs_get_tree_super(struct fs_context *fc) > blk_mode_t mode = sb_open_mode(fc->sb_flags); > int ret; > > + mode &= ~BLK_OPEN_RESTRICT_WRITES; > + > btrfs_ctx_to_info(fs_info, ctx); > mutex_lock(&uuid_mutex); This looks like the proper resolution. Basically btrfs needs to strip BLK_OPEN_RESTRICT_WRITES from the mode provided by sb_open_mode(). Thanks for writing it! Honza -- Jan Kara SUSE Labs, CR