All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Christian Brauner <brauner@kernel.org>,
	David Sterba <dsterba@suse.cz>, David Sterba <dsterba@suse.com>,
	Jan Kara <jack@suse.cz>, Josef Bacik <josef@toxicpanda.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>
Subject: Re: linux-next: manual merge of the vfs-brauner tree with the btrfs tree
Date: Tue, 28 Nov 2023 14:33:44 -0700	[thread overview]
Message-ID: <20231128213344.GA3423530@dev-arch.thelio-3990X> (raw)
In-Reply-To: <20231127092001.54a021e8@canb.auug.org.au>

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? :)

Cheers,
Nathan

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);
 

  reply	other threads:[~2023-11-28 21:33 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-26 22:20 linux-next: manual merge of the vfs-brauner tree with the btrfs tree Stephen Rothwell
2023-11-28 21:33 ` Nathan Chancellor [this message]
2023-11-29 11:09   ` Jan Kara
2023-11-29 20:50     ` Stephen Rothwell
2024-01-08 20:53       ` Stephen Rothwell
  -- strict thread matches above, loose matches on Subject: below --
2024-05-03  1:00 Stephen Rothwell
2024-04-30 23:42 Stephen Rothwell
2023-12-06 23:32 Stephen Rothwell
2024-01-08 20:56 ` Stephen Rothwell
2023-11-26 22:14 Stephen Rothwell
2023-10-08 23:48 Stephen Rothwell
2023-10-09 16:15 ` Christian Brauner
2023-10-10 21:37   ` Stephen Rothwell
2023-10-11  0:24     ` Stephen Rothwell
2023-10-11  9:20     ` David Sterba
2023-10-12 15:42       ` David Sterba
2023-10-23 17:55         ` David Sterba
2023-10-23 21:25           ` Stephen Rothwell
2023-10-24 15:32             ` David Sterba
2023-10-25  0:09               ` Stephen Rothwell
2023-08-15  1:20 Stephen Rothwell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231128213344.GA3423530@dev-arch.thelio-3990X \
    --to=nathan@kernel.org \
    --cc=brauner@kernel.org \
    --cc=dsterba@suse.com \
    --cc=dsterba@suse.cz \
    --cc=jack@suse.cz \
    --cc=josef@toxicpanda.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=sfr@canb.auug.org.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.