lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 15 Dec 2020 07:09:56 +1100
From:   Stephen Rothwell <sfr@...b.auug.org.au>
To:     Jens Axboe <axboe@...nel.dk>, David Sterba <dsterba@...e.com>
Cc:     Damien Le Moal <damien.lemoal@....com>,
        Naohiro Aota <naohiro.aota@....com>,
        Christoph Hellwig <hch@....de>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux Next Mailing List <linux-next@...r.kernel.org>
Subject: Re: linux-next: build failure after merge of the block tree

Hi all,

On Wed, 2 Dec 2020 15:01:49 +1100 Stephen Rothwell <sfr@...b.auug.org.au> wrote:
>
> 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_partno
> 
> Caused 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 <sfr@...b.auug.org.au>
> Date: Wed, 2 Dec 2020 14:55:04 +1100
> Subject: [PATCH] fixup for "block: merge struct block_device and struct
>  hd_struct"
> 
> Signed-off-by: Stephen Rothwell <sfr@...b.auug.org.au>
> ---
>  fs/btrfs/zoned.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/fs/btrfs/zoned.c b/fs/btrfs/zoned.c
> index 155545180046..c38846659019 100644
> --- a/fs/btrfs/zoned.c
> +++ b/fs/btrfs/zoned.c
> @@ -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);

Just a reminder that I am still applying the above merge fix.

-- 
Cheers,
Stephen Rothwell

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ