Skip to contentSkip to conversation

linux-next: manual merge of the btrfs tree with the mm tree

DISCUSSION Stephen Rothwell 2 participants 3 messages Sep 14, 2023 – Sep 15, 2023 Linux-next tree

lore
Share & tools
lore
#0 lore raw

Hi all,

Today's linux-next merge of the btrfs tree got a conflict in:

fs/btrfs/super.c

between commit:

c0824542e4d1 ("fs: super: dynamically allocate the s_shrink")

from the mm tree and commit:

2ebed4689ba2 ("btrfs: open block devices after superblock creation")

from the btrfs tree.

I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.

Signature · 2 lines
Cheers,
Stephen Rothwell
#1 lore raw

Hi all,

[Forgot the diff ...]

Quoted 21 lines · On Fri, 15 Sep 2023 09:14:21 +1000 Stephen Rothwell <[email protected]>…

Today's linux-next merge of the btrfs tree got a conflict in:

fs/btrfs/super.c

between commit:

c0824542e4d1 ("fs: super: dynamically allocate the s_shrink")

from the mm tree and commit:

2ebed4689ba2 ("btrfs: open block devices after superblock creation")

from the btrfs tree.

I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.

Signature · 33 lines
Cheers,
Stephen Rothwell

diff --cc fs/btrfs/super.c
index 3b165d9967bb,3eff75e06a57..000000000000
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@@ -1518,8 -1459,23 +1459,23 @@@ static struct dentry *btrfs_mount_root(
  		if ((flags ^ s->s_flags) & SB_RDONLY)
  			error = -EBUSY;
  	} else {
- 		snprintf(s->s_id, sizeof(s->s_id), "%pg", bdev);
+ 		struct btrfs_fs_devices *fs_devices = fs_info->fs_devices;
+ 
+ 		mutex_lock(&uuid_mutex);
+ 		error = btrfs_open_devices(fs_devices, sb_open_mode(flags),
+ 					   fs_type);
+ 		mutex_unlock(&uuid_mutex);
+ 		if (error)
+ 			goto error_deactivate;
+ 
+ 		if (!(flags & SB_RDONLY) && fs_devices->rw_devices == 0) {
+ 			error = -EACCES;
+ 			goto error_deactivate;
+ 		}
+ 
+ 		snprintf(s->s_id, sizeof(s->s_id), "%pg",
+ 			 fs_devices->latest_dev->bdev);
 -		shrinker_debugfs_rename(&s->s_shrink, "sb-%s:%s", fs_type->name,
 +		shrinker_debugfs_rename(s->s_shrink, "sb-%s:%s", fs_type->name,
  					s->s_id);
  		btrfs_sb(s)->bdev_holder = fs_type;
  		error = btrfs_fill_super(s, fs_devices, data);
#2 lore raw

Hi Stephen,

The diff looks good to me.

Thanks,
Qi

Quoted 27 lines · Stephen Rothwell

Hi all,

[Forgot the diff ...]

Quoted 21 lines · On Fri, 15 Sep 2023 09:14:21 +1000 Stephen Rothwell <[email protected]>…

Today's linux-next merge of the btrfs tree got a conflict in:

fs/btrfs/super.c

between commit:

c0824542e4d1 ("fs: super: dynamically allocate the s_shrink")

from the mm tree and commit:

2ebed4689ba2 ("btrfs: open block devices after superblock creation")

from the btrfs tree.

I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.