From: Jan Kara <jack@suse.cz>
To: Nathan Chancellor <nathan@kernel.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
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: Wed, 29 Nov 2023 12:09:30 +0100 [thread overview]
Message-ID: <20231129110930.qncvzm63xjg4ucky@quack3> (raw)
In-Reply-To: <20231128213344.GA3423530@dev-arch.thelio-3990X>
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 <jack@suse.com>
SUSE Labs, CR
next prev parent reply other threads:[~2023-11-29 11:09 UTC|newest]
Thread overview: 29+ 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
2023-11-29 11:09 ` Jan Kara [this message]
2023-11-29 20:50 ` Stephen Rothwell
2024-01-08 20:53 ` Stephen Rothwell
-- strict thread matches above, loose matches on Subject: below --
2025-11-02 21:58 Stephen Rothwell
2025-12-02 0:58 ` Stephen Rothwell
2024-10-31 22:22 Stephen Rothwell
2024-10-15 21:51 Stephen Rothwell
2024-11-18 22:16 ` Stephen Rothwell
2024-06-18 11:41 Mark Brown
2024-07-16 0:58 ` Stephen Rothwell
2024-05-03 1:00 Stephen Rothwell
2024-05-14 1:38 ` 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=20231129110930.qncvzm63xjg4ucky@quack3 \
--to=jack@suse.cz \
--cc=brauner@kernel.org \
--cc=dsterba@suse.com \
--cc=dsterba@suse.cz \
--cc=josef@toxicpanda.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=nathan@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox