Skip to contentSkip to conversation

linux-next: build failure after merge of the block tree

PATCH Stephen Rothwell 2 participants 4 messages Feb 2, 2021 – Feb 14, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

Hi all,

After merging the block tree, today's linux-next build (powerpc ppc64_defconfig) failed like this:

block/bio.c: In function 'bio_add_zone_append_page':
block/bio.c:860:31: error: 'struct bio' has no member named 'bi_disk'
860 | struct request_queue *q = bio->bi_disk->queue;
| ^~

Caused by commit

309dca309fc3 ("block: store a block_device pointer in struct bio")

interacting with commit

9f678097f3de ("block: add bio_add_zone_append_page")

from the btrfs tree.

I applied the following merge fix up for today.

From: Stephen Rothwell <[email protected]>
Date: Tue, 2 Feb 2021 13:54:29 +1100
Subject: [PATCH] block: bio: fix up for bi_disk removal

---
 block/bio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
block/bio.c +1 -1
index bf3ab1b5c844..e3b9d3e0a196 100644
@@ -857,7 +857,7 @@ EXPORT_SYMBOL(bio_add_pc_page);
 int bio_add_zone_append_page(struct bio *bio, struct page *page,
 			     unsigned int len, unsigned int offset)
 {
-	struct request_queue *q = bio->bi_disk->queue;
+	struct request_queue *q = bio->bi_bdev->bd_disk->queue;
 	bool same_page = false;
 
 	if (WARN_ON_ONCE(bio_op(bio) != REQ_OP_ZONE_APPEND))
Signature · 5 lines
2.29.2

-- 
Cheers,
Stephen Rothwell
#1 lore raw

Hi all,

Quoted 45 lines · On Tue, 2 Feb 2021 13:57:14 +1100 Stephen Rothwell <[email protected]> wrote:

After merging the block tree, today's linux-next build (powerpc ppc64_defconfig) failed like this:

block/bio.c: In function 'bio_add_zone_append_page':
block/bio.c:860:31: error: 'struct bio' has no member named 'bi_disk'
860 | struct request_queue *q = bio->bi_disk->queue;
| ^~

Caused by commit

309dca309fc3 ("block: store a block_device pointer in struct bio")

interacting with commit

9f678097f3de ("block: add bio_add_zone_append_page")

from the btrfs tree.

I applied the following merge fix up for today.

From: Stephen Rothwell <[email protected]>
Date: Tue, 2 Feb 2021 13:54:29 +1100
Subject: [PATCH] block: bio: fix up for bi_disk removal

---
 block/bio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
block/bio.c +1 -1
index bf3ab1b5c844..e3b9d3e0a196 100644
@@ -857,7 +857,7 @@ EXPORT_SYMBOL(bio_add_pc_page);
 int bio_add_zone_append_page(struct bio *bio, struct page *page,
 			     unsigned int len, unsigned int offset)
 {
-	struct request_queue *q = bio->bi_disk->queue;
+	struct request_queue *q = bio->bi_bdev->bd_disk->queue;
 	bool same_page = false;
 
 	if (WARN_ON_ONCE(bio_op(bio) != REQ_OP_ZONE_APPEND))
Signature · 1 line
2.29.2

This then lead to the following in my x86_64 allmodconfig build:

fs/btrfs/zoned.c: In function 'btrfs_record_physical_zoned':
fs/btrfs/zoned.c:1286:21: error: 'struct bio' has no member named 'bi_disk'
1286 | ordered->disk = bio->bi_disk;
| ^~
fs/btrfs/zoned.c:1287:23: error: 'struct bio' has no member named 'bi_partno'
1287 | ordered->partno = bio->bi_partno;
| ^~

Do to the above block tree commit interacting with commit

bccc13e5fe0c ("btrfs: use ZONE_APPEND write for ZONED btrfs")

from the btrfs tree.

For which I applied the following merge fix patch:

From: Stephen Rothwell <[email protected]>
Date: Tue, 2 Feb 2021 14:08:44 +1100
Subject: [PATCH] block: btrfs: another fix up for bi_disk removal

---
 fs/btrfs/zoned.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
fs/btrfs/zoned.c +2 -2
index 334a54be587d..4829ffc5275b 100644
@@ -1283,8 +1283,8 @@ void btrfs_record_physical_zoned(struct inode *inode, u64 file_offset,
 		return;
 
 	ordered->physical = physical;
-	ordered->disk = bio->bi_disk;
-	ordered->partno = bio->bi_partno;
+	ordered->disk = bio->bi_bdev->bd_disk;
+	ordered->partno = bio->bi_bdev->bd_partno;
 
 	btrfs_put_ordered_extent(ordered);
 }
Signature · 5 lines
2.29.2

-- 
Cheers,
Stephen Rothwell
#3 lore raw
In reply to Stephen Rothwell

Hi all,

Quoted 11 lines · On Tue, 2 Feb 2021 14:16:18 +1100 Stephen Rothwell <[email protected]> wrote:
Quoted 9 lines · On Tue, 2 Feb 2021 13:57:14 +1100 Stephen Rothwell <[email protected]> wrote:

After merging the block tree, today's linux-next build (powerpc ppc64_defconfig) failed like this:

block/bio.c: In function 'bio_add_zone_append_page':
block/bio.c:860:31: error: 'struct bio' has no member named 'bi_disk'
860 | struct request_queue *q = bio->bi_disk->queue;
| ^~

Quoted 7 lines
Quoted 7 lines

Caused by commit

309dca309fc3 ("block: store a block_device pointer in struct bio")

interacting with commit

9f678097f3de ("block: add bio_add_zone_append_page")

Now

ae29333fa644 ("block: add bio_add_zone_append_page")

Quoted 40 lines
Quoted 29 lines

from the btrfs tree.

I applied the following merge fix up for today.

From: Stephen Rothwell <[email protected]>
Date: Tue, 2 Feb 2021 13:54:29 +1100
Subject: [PATCH] block: bio: fix up for bi_disk removal

---
 block/bio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
block/bio.c +1 -1
index bf3ab1b5c844..e3b9d3e0a196 100644
@@ -857,7 +857,7 @@ EXPORT_SYMBOL(bio_add_pc_page);
 int bio_add_zone_append_page(struct bio *bio, struct page *page,
 			     unsigned int len, unsigned int offset)
 {
-	struct request_queue *q = bio->bi_disk->queue;
+	struct request_queue *q = bio->bi_bdev->bd_disk->queue;
 	bool same_page = false;
 
 	if (WARN_ON_ONCE(bio_op(bio) != REQ_OP_ZONE_APPEND))
Signature · 1 line
2.29.2  

This then lead to the following in my x86_64 allmodconfig build:

fs/btrfs/zoned.c: In function 'btrfs_record_physical_zoned':
fs/btrfs/zoned.c:1286:21: error: 'struct bio' has no member named 'bi_disk'
1286 | ordered->disk = bio->bi_disk;
| ^~
fs/btrfs/zoned.c:1287:23: error: 'struct bio' has no member named 'bi_partno'
1287 | ordered->partno = bio->bi_partno;
| ^~

Quoted 3 lines

Do to the above block tree commit interacting with commit

bccc13e5fe0c ("btrfs: use ZONE_APPEND write for ZONED btrfs")

Now

d8e3fb106f39 ("btrfs: zoned: use ZONE_APPEND write for zoned mode")

Quoted 31 lines

from the btrfs tree.

For which I applied the following merge fix patch:

From: Stephen Rothwell <[email protected]>
Date: Tue, 2 Feb 2021 14:08:44 +1100
Subject: [PATCH] block: btrfs: another fix up for bi_disk removal

---
 fs/btrfs/zoned.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
fs/btrfs/zoned.c +2 -2
index 334a54be587d..4829ffc5275b 100644
@@ -1283,8 +1283,8 @@ void btrfs_record_physical_zoned(struct inode *inode, u64 file_offset,
 		return;
 
 	ordered->physical = physical;
-	ordered->disk = bio->bi_disk;
-	ordered->partno = bio->bi_partno;
+	ordered->disk = bio->bi_bdev->bd_disk;
+	ordered->partno = bio->bi_bdev->bd_partno;
 
 	btrfs_put_ordered_extent(ordered);
 }
Signature · 1 line
2.29.2

With the merge window about to open, this is a reminder that this conflict still exists.

I am still applying both these merge fix ups.

Signature · 2 lines
Cheers,
Stephen Rothwell