linux-next: build failure after merge of the block tree
Subsystems (2)
Hi all,
After merging the block tree, today's linux-next build (x86_64 allmodconfig) failed like this:
fs/btrfs/zoned.c: In function 'btrfs_get_dev_zone_info':fs/btrfs/zoned.c:168:21: error: 'struct block_device' has no member named 'bd_part'; did you mean 'bd_partno'?
168 | nr_sectors = bdev->bd_part->nr_sects;
| ^~~~~~~
| bd_partno
fs/btrfs/zoned.c: In function 'btrfs_sb_log_location_bdev':
fs/btrfs/zoned.c:508:21: error: 'struct block_device' has no member named 'bd_part'; did you mean 'bd_partno'?
508 | nr_sectors = bdev->bd_part->nr_sects;
| ^~~~~~~
| bd_partno
fs/btrfs/zoned.c: In function 'btrfs_reset_sb_log_zones':
fs/btrfs/zoned.c:606:21: error: 'struct block_device' has no member named 'bd_part'; did you mean 'bd_partno'?
606 | nr_sectors = bdev->bd_part->nr_sects;
| ^~~~~~~
| bd_partnoCaused by commits
a782483cc1f8 ("block: remove the nr_sects field in struct hd_struct") 0d02129e76ed ("block: merge struct block_device and struct hd_struct")
interacting with commits
ab3ea6d0e65c ("btrfs: get zone information of zoned block devices") 1a4b440a1c2b ("btrfs: implement log-structured superblock for ZONED mode")
from the btrfs tree.
I applied the following merge fix patch (which may, or may not, be correct but fixes the build).
From: Stephen Rothwell <[email protected]>
Date: Wed, 2 Dec 2020 14:55:04 +1100
Subject: [PATCH] fixup for "block: merge struct block_device and struct
hd_struct"
--- fs/btrfs/zoned.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
fs/btrfs/zoned.c +3 -3
@@ -165,7 +165,7 @@ int btrfs_get_dev_zone_info(struct btrfs_device *device)if (!zone_info)return -ENOMEM ; - nr_sectors = bdev->bd_part->nr_sects; + nr_sectors =bdev_nr_sectors (bdev); zone_sectors =bdev_zone_sectors (bdev);/* Check if it's power of 2 (see is_power_of_2) */ ASSERT (zone_sectors !=0 && (zone_sectors & (zone_sectors -1 )) ==0 );
@@ -505,7 +505,7 @@ int btrfs_sb_log_location_bdev(struct block_device *bdev, int mirror, int rw,return -EINVAL ; zone_size = zone_sectors <<SECTOR_SHIFT ; zone_sectors_shift =ilog2 (zone_sectors); - nr_sectors = bdev->bd_part->nr_sects; + nr_sectors =bdev_nr_sectors (bdev); nr_zones = nr_sectors >> zone_sectors_shift; sb_zone =sb_zone_number (zone_sectors_shift +SECTOR_SHIFT , mirror);
@@ -603,7 +603,7 @@ int btrfs_reset_sb_log_zones(struct block_device *bdev, int mirror) zone_sectors =bdev_zone_sectors (bdev); zone_sectors_shift =ilog2 (zone_sectors); - nr_sectors = bdev->bd_part->nr_sects; + nr_sectors =bdev_nr_sectors (bdev); nr_zones = nr_sectors >> zone_sectors_shift; sb_zone =sb_zone_number (zone_sectors_shift +SECTOR_SHIFT , mirror);
Signature · 5 lines
2.29.2 -- Cheers, Stephen Rothwell
Quoted 2 lines · Stephen Rothwell
I applied the following merge fix patch (which may, or may not, be correct but fixes the build).
The fixes are exactly what I would have done. Thanks!
Quoted 80 lines · Stephen Rothwell
Hi all,
Quoted 77 lines · On Wed, 2 Dec 2020 15:01:49 +1100 Stephen Rothwell <[email protected]> wrote:
Hi all,
After merging the block tree, today's linux-next build (
x86_64allmodconfig) failed like this:
fs/btrfs/zoned.c: In function 'btrfs_get_dev_zone_info':fs/btrfs/zoned.c:168:21: error: 'structblock_device' has no member named 'bd_part'; did you mean 'bd_partno'?168 | nr_sectors = bdev->bd_part->nr_sects; | ^~~~~~~ | bd_partno fs/btrfs/zoned.c: In function 'btrfs_sb_log_location_bdev': fs/btrfs/zoned.c:508:21: error: 'struct block_device' has no member named 'bd_part'; did you mean 'bd_partno'? 508 | nr_sectors = bdev->bd_part->nr_sects; | ^~~~~~~ | bd_partno fs/btrfs/zoned.c: In function 'btrfs_reset_sb_log_zones': fs/btrfs/zoned.c:606:21: error: 'struct block_device' has no member named 'bd_part'; did you mean 'bd_partno'? 606 | nr_sectors = bdev->bd_part->nr_sects; | ^~~~~~~ | bd_partnoCaused by commits
a782483cc1f8("block: remove thenr_sectsfield in structhd_struct")0d02129e76ed("block: merge structblock_deviceand structhd_struct")interacting with commits
ab3ea6d0e65c("btrfs: get zone information of zoned block devices")1a4b440a1c2b("btrfs: implement log-structured superblock for ZONED mode")from the btrfs tree.
I applied the following merge fix patch (which may, or may not, be correct but fixes the build).
From: Stephen Rothwell <[email protected]>
Date: Wed, 2 Dec 2020 14:55:04 +1100
Subject: [PATCH] fixup for "block: merge structblock_deviceand struct
hd_struct"Signed-off-by Stephen Rothwell <[email protected]>--- fs/btrfs/zoned.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)fs/btrfs/zoned.c +3
-3@@ -165,7 +165,7 @@ int btrfs_get_dev_zone_info(struct btrfs_device *device)if (!zone_info)return -ENOMEM ; - nr_sectors = bdev->bd_part->nr_sects; + nr_sectors =bdev_nr_sectors (bdev); zone_sectors =bdev_zone_sectors (bdev);/* Check if it's power of 2 (see is_power_of_2) */ ASSERT (zone_sectors !=0 && (zone_sectors & (zone_sectors -1 )) ==0 );@@ -505,7 +505,7 @@ int btrfs_sb_log_location_bdev(struct block_device *bdev, int mirror, int rw,return -EINVAL ; zone_size = zone_sectors <<SECTOR_SHIFT ; zone_sectors_shift =ilog2 (zone_sectors); - nr_sectors = bdev->bd_part->nr_sects; + nr_sectors =bdev_nr_sectors (bdev); nr_zones = nr_sectors >> zone_sectors_shift; sb_zone =sb_zone_number (zone_sectors_shift +SECTOR_SHIFT , mirror);@@ -603,7 +603,7 @@ int btrfs_reset_sb_log_zones(struct block_device *bdev, int mirror) zone_sectors =bdev_zone_sectors (bdev); zone_sectors_shift =ilog2 (zone_sectors); - nr_sectors = bdev->bd_part->nr_sects; + nr_sectors =bdev_nr_sectors (bdev); nr_zones = nr_sectors >> zone_sectors_shift;
Quoted 3 lines
fs/btrfs/zoned.c int btrfs_reset_sb_log_zones(struct block_device *bdev, int mirror) · line 609
Quoted 1 line
fs/btrfs/zoned.c +0
-0sb_zone =sb_zone_number (zone_sectors_shift +SECTOR_SHIFT , mirror);Just a reminder that I am still applying the above merge fix.
I sent in my core changes, but they haven't been pulled yet. So I guess we're dealing with a timing situation... David, did you send in the btrfs pull yet?
Signature · 1 line
Jens Axboe
Hi all,
Quoted 70 lines · On Wed, 2 Dec 2020 15:01:49 +1100 Stephen Rothwell <[email protected]> wrote:
Hi all,
After merging the block tree, today's linux-next build (
x86_64allmodconfig) failed like this:
fs/btrfs/zoned.c: In function 'btrfs_get_dev_zone_info':fs/btrfs/zoned.c:168:21: error: 'structblock_device' has no member named 'bd_part'; did you mean 'bd_partno'?168 | nr_sectors = bdev->bd_part->nr_sects; | ^~~~~~~ | bd_partno fs/btrfs/zoned.c: In function 'btrfs_sb_log_location_bdev': fs/btrfs/zoned.c:508:21: error: 'struct block_device' has no member named 'bd_part'; did you mean 'bd_partno'? 508 | nr_sectors = bdev->bd_part->nr_sects; | ^~~~~~~ | bd_partno fs/btrfs/zoned.c: In function 'btrfs_reset_sb_log_zones': fs/btrfs/zoned.c:606:21: error: 'struct block_device' has no member named 'bd_part'; did you mean 'bd_partno'? 606 | nr_sectors = bdev->bd_part->nr_sects; | ^~~~~~~ | bd_partnoCaused by commits
a782483cc1f8("block: remove thenr_sectsfield in structhd_struct")0d02129e76ed("block: merge structblock_deviceand structhd_struct")interacting with commits
ab3ea6d0e65c("btrfs: get zone information of zoned block devices")1a4b440a1c2b("btrfs: implement log-structured superblock for ZONED mode")from the btrfs tree.
I applied the following merge fix patch (which may, or may not, be correct but fixes the build).
From: Stephen Rothwell <[email protected]>
Date: Wed, 2 Dec 2020 14:55:04 +1100
Subject: [PATCH] fixup for "block: merge structblock_deviceand struct
hd_struct"Signed-off-by Stephen Rothwell <[email protected]>--- fs/btrfs/zoned.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)fs/btrfs/zoned.c +2
-2@@ -165,7 +165,7 @@ int btrfs_get_dev_zone_info(struct btrfs_device *device)if (!zone_info)return -ENOMEM ; - nr_sectors = bdev->bd_part->nr_sects; + nr_sectors =bdev_nr_sectors (bdev); zone_sectors =bdev_zone_sectors (bdev);/* Check if it's power of 2 (see is_power_of_2) */ ASSERT (zone_sectors !=0 && (zone_sectors & (zone_sectors -1 )) ==0 );@@ -505,7 +505,7 @@ int btrfs_sb_log_location_bdev(struct block_device *bdev, int mirror, int rw,return -EINVAL ; zone_size = zone_sectors <<SECTOR_SHIFT ; zone_sectors_shift =ilog2 (zone_sectors); - nr_sectors = bdev->bd_part->nr_sects; + nr_sectors =bdev_nr_sectors (bdev); nr_zones = nr_sectors >> zone_sectors_shift; sb_zone =sb_zone_number (zone_sectors_shift +SECTOR_SHIFT , mirror);
fs/btrfs/zoned.c int btrfs_reset_sb_log_zones(struct block_device *bdev, int mirror) · line 609
Quoted 8 lines
fs/btrfs/zoned.c +1
-1@@ -603,7 +603,7 @@ int btrfs_reset_sb_log_zones(struct block_device *bdev, int mirror) zone_sectors =bdev_zone_sectors (bdev); zone_sectors_shift =ilog2 (zone_sectors); - nr_sectors = bdev->bd_part->nr_sects; + nr_sectors =bdev_nr_sectors (bdev); nr_zones = nr_sectors >> zone_sectors_shift; sb_zone =sb_zone_number (zone_sectors_shift +SECTOR_SHIFT , mirror);
Just a reminder that I am still applying the above merge fix.
Signature · 2 lines
Cheers, Stephen Rothwell
Quoted 6 lines · Jens Axboe
Quoted 1 line · Stephen Rothwell
Just a reminder that I am still applying the above merge fix.
I sent in my core changes, but they haven't been pulled yet. So I guess we're dealing with a timing situation... David, did you send in the btrfs pull yet?
Hi David,
Quoted 11 lines · On Mon, 14 Dec 2020 22:36:12 +0100 David Sterba <[email protected]> wrote:
Quoted 6 lines · Jens Axboe
Quoted 1 line · Stephen Rothwell
Just a reminder that I am still applying the above merge fix.
I sent in my core changes, but they haven't been pulled yet. So I guess we're dealing with a timing situation... David, did you send in the btrfs pull yet?
I would expect you *both* to at least mention this conflict to Linus ...
Signature · 2 lines
Cheers, Stephen Rothwell
Quoted 8 lines · Stephen Rothwell
Hi David,
Quoted 5 lines · On Mon, 14 Dec 2020 22:36:12 +0100 David Sterba <[email protected]> wrote:
Quoted 3 lines · Jens Axboe
Quoted 1 line · Stephen Rothwell
Just a reminder that I am still applying the above merge fix.
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
I sent in my core changes, but they haven't been pulled yet. So I guess we're dealing with a timing situation... David, did you send in the btrfs pull yet?
I would expect you *both* to at least mention this conflict to Linus ...
2nd paragraph in the mail
"There are no merge conflicts against current master branch, in past
weeks some conflicts emerged in linux-next but IIRC were trivial."
Hi David,
Quoted 16 lines · On Mon, 14 Dec 2020 22:54:46 +0100 David Sterba <[email protected]> wrote:
Quoted 14 lines · Stephen Rothwell
Quoted 11 lines · On Mon, 14 Dec 2020 22:36:12 +0100 David Sterba <[email protected]> wrote:
Quoted 6 lines · Jens Axboe
Quoted 1 line · Stephen Rothwell
Just a reminder that I am still applying the above merge fix.
I sent in my core changes, but they haven't been pulled yet. So I guess we're dealing with a timing situation... David, did you send in the btrfs pull yet?
Quoted 6 lines
Quoted 1 line
I would expect you *both* to at least mention this conflict to Linus ...
2nd paragraph in the mail
"There are no merge conflicts against current master branch, in past
weeks some conflicts emerged in linux-next but IIRC were trivial."
No worries then, thanks.
Signature · 2 lines
Cheers, Stephen Rothwell