Skip to contentSkip to conversation

linux-next: manual merge of the block tree with the gfs2 tree

DISCUSSION Stephen Rothwell 1 participant 1 message May 8, 2025 Linux-next tree

lore
Share & tools
lore
#0 lore raw

Hi all,

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

fs/gfs2/ops_fstype.c

between commit:

2abc01ae2685 ("gfs2: Use SECTOR_SIZE and SECTOR_SHIFT")

from the gfs2 tree and commit:

65f8e62593e6 ("gfs2: use bdev_rw_virt in gfs2_read_super")

from the block 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 · 46 lines
Cheers,
Stephen Rothwell

diff --cc fs/gfs2/ops_fstype.c
index 4856188c0dfe,7c1014ba7ac7..000000000000
--- a/fs/gfs2/ops_fstype.c
+++ b/fs/gfs2/ops_fstype.c
@@@ -214,28 -226,22 +214,22 @@@ static void gfs2_sb_in(struct gfs2_sbd 
  
  static int gfs2_read_super(struct gfs2_sbd *sdp, sector_t sector, int silent)
  {
- 	struct super_block *sb = sdp->sd_vfs;
- 	struct page *page;
- 	struct bio_vec bvec;
- 	struct bio bio;
+ 	struct gfs2_sb *sb;
  	int err;
  
- 	page = alloc_page(GFP_KERNEL);
- 	if (unlikely(!page))
+ 	sb = kmalloc(PAGE_SIZE, GFP_KERNEL);
+ 	if (unlikely(!sb))
  		return -ENOMEM;
- 
- 	bio_init(&bio, sb->s_bdev, &bvec, 1, REQ_OP_READ | REQ_META);
- 	bio.bi_iter.bi_sector = sector * (sb->s_blocksize >> SECTOR_SHIFT);
- 	__bio_add_page(&bio, page, PAGE_SIZE, 0);
- 
- 	err = submit_bio_wait(&bio);
+ 	err = bdev_rw_virt(sdp->sd_vfs->s_bdev,
 -			sector * (sdp->sd_vfs->s_blocksize >> 9), sb, PAGE_SIZE,
 -			REQ_OP_READ | REQ_META);
++			sector * (sdp->sd_vfs->s_blocksize >> SECTOR_SHIFT),
++			sb, PAGE_SIZE, REQ_OP_READ | REQ_META);
  	if (err) {
  		pr_warn("error %d reading superblock\n", err);
- 		__free_page(page);
+ 		kfree(sb);
  		return err;
  	}
- 	gfs2_sb_in(sdp, page_address(page));
- 	__free_page(page);
+ 	gfs2_sb_in(sdp, sb);
+ 	kfree(sb);
  	return gfs2_check_sb(sdp, silent);
  }