Re: [PATCH 10/17] btrfs: remove stripe boundary calculation for compressed I/O

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01.09.22 09:43, Christoph Hellwig wrote:
> +	if (bio_op(bio) == REQ_OP_ZONE_APPEND) {
> +		struct btrfs_fs_info *fs_info = btrfs_sb(cb->inode->i_sb);
> +		struct extent_map *em;
>  
> -	if (bio_op(bio) == REQ_OP_ZONE_APPEND)
> -		bio_set_dev(bio, em->map_lookup->stripes[0].dev->bdev);
> +		em = btrfs_get_chunk_map(fs_info, disk_bytenr,
> +					 fs_info->sectorsize);
> +		if (IS_ERR(em)) {
> +			bio_put(bio);
> +			return ERR_CAST(em);
> +		}

Please use btrfs_get_zoned_device() instead of open coding it.




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux