Re: [PATCH v11 08/40] btrfs: emulated zoned mode on non-zoned devices

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

 



On Tue, Dec 22, 2020 at 12:49:01PM +0900, Naohiro Aota wrote:
> @@ -296,12 +383,22 @@ int btrfs_get_dev_zone_info(struct btrfs_device *device)
>  
>  	device->zone_info = zone_info;
>  
> -	/* device->fs_info is not safe to use for printing messages */
> -	btrfs_info_in_rcu(NULL,

NULL instead of fs_info

> -			"host-%s zoned block device %s, %u zones of %llu bytes",
> -			bdev_zoned_model(bdev) == BLK_ZONED_HM ? "managed" : "aware",
> -			rcu_str_deref(device->name), zone_info->nr_zones,
> -			zone_info->zone_size);
> +	if (bdev_zoned_model(bdev) == BLK_ZONED_HM) {
> +		model = "host-managed zoned";
> +		emulated = "";
> +	} else if (bdev_zoned_model(bdev) == BLK_ZONED_HA) {
> +		model = "host-aware zoned";
> +		emulated = "";
> +	} else if (bdev_zoned_model(bdev) == BLK_ZONED_NONE &&
> +		 device->force_zoned) {
> +		model = "regular";
> +		emulated = "emulated ";
> +	}
> +
> +	btrfs_info_in_rcu(device->fs_info,

so what changed that it's fine to use device->fs_info now while it was
not before?

> +		"%s block device %s, %u %szones of %llu bytes",
> +		model, rcu_str_deref(device->name), zone_info->nr_zones,
> +		emulated, zone_info->zone_size);
>  
>  	return 0;



[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